From 94f26acfe0c4dca7ea7c98928f24fca9dbffbe42 Mon Sep 17 00:00:00 2001 From: Craig Drummond Date: Tue, 19 Jul 2016 19:44:51 +0100 Subject: [PATCH] Use FontAwesome icons for all action icons. --- ChangeLog | 1 + cantata.qrc | 4 ---- context/albumview.cpp | 3 ++- context/artistview.cpp | 3 ++- context/songview.cpp | 10 ++++++---- devices/devicespage.cpp | 4 ++-- dynamic/dynamicpage.cpp | 2 +- gui/folderpage.cpp | 5 ++++- gui/mainwindow.cpp | 26 +++++++++++++------------ gui/playlistspage.cpp | 2 +- gui/preferencesdialog.cpp | 2 +- gui/searchpage.cpp | 3 ++- gui/stdactions.cpp | 19 ++++++++++-------- icons/radiostream-add16.png | Bin 975 -> 0 bytes icons/radiostream-add22.png | Bin 1419 -> 0 bytes icons/radiostream-add32.png | Bin 2017 -> 0 bytes icons/radiostream-add48.png | Bin 3955 -> 0 bytes models/playlistsmodel.cpp | 2 +- models/playqueuemodel.cpp | 7 +++++-- streams/streamspage.cpp | 8 +++++--- support/monoicon.cpp | 37 +++++++++++------------------------- widgets/icons.cpp | 10 ++++------ widgets/icons.h | 8 ++++---- widgets/itemview.cpp | 2 +- widgets/playqueueview.cpp | 2 +- widgets/treeview.cpp | 2 +- 26 files changed, 80 insertions(+), 82 deletions(-) delete mode 100644 icons/radiostream-add16.png delete mode 100644 icons/radiostream-add22.png delete mode 100644 icons/radiostream-add32.png delete mode 100644 icons/radiostream-add48.png diff --git a/ChangeLog b/ChangeLog index 2b3cd4872..34d599b30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -31,6 +31,7 @@ 20. Don't show custom actions menu entry if there are no actions. 21. Fix add/set priority menus. 22. Match view mono icons to text colour. +23. Use FontAwesome icons for all action icons. 2.0.1 ----- diff --git a/cantata.qrc b/cantata.qrc index 6a2bdc832..513a722de 100644 --- a/cantata.qrc +++ b/cantata.qrc @@ -34,10 +34,6 @@ icons/view-radiostream22.png icons/view-radiostream32.png icons/view-radiostream48.png -icons/radiostream-add16.png -icons/radiostream-add22.png -icons/radiostream-add32.png -icons/radiostream-add48.png diff --git a/context/albumview.cpp b/context/albumview.cpp index c1d881e8d..a3e56054a 100644 --- a/context/albumview.cpp +++ b/context/albumview.cpp @@ -30,6 +30,7 @@ #include "qtiocompressor/qtiocompressor.h" #include "contextengine.h" #include "widgets/textbrowser.h" +#include "widgets/icons.h" #include "support/actioncollection.h" #include "support/action.h" #include "models/mpdlibrarymodel.h" @@ -61,7 +62,7 @@ AlbumView::AlbumView(QWidget *p) , detailsReceived(0) { engine=ContextEngine::create(this); - refreshAction = ActionCollection::get()->createAction("refreshalbum", i18n("Refresh Album Information"), "view-refresh"); + refreshAction = ActionCollection::get()->createAction("refreshalbum", i18n("Refresh Album Information"), Icons::self()->refreshIcon); connect(refreshAction, SIGNAL(triggered()), this, SLOT(refresh())); connect(engine, SIGNAL(searchResult(QString,QString)), this, SLOT(searchResponse(QString,QString))); connect(Covers::self(), SIGNAL(cover(Song,QImage,QString)), SLOT(coverRetrieved(Song,QImage,QString))); diff --git a/context/artistview.cpp b/context/artistview.cpp index 9571c02d9..d6ffbd2b1 100644 --- a/context/artistview.cpp +++ b/context/artistview.cpp @@ -28,6 +28,7 @@ #include "network/networkaccessmanager.h" #include "qtiocompressor/qtiocompressor.h" #include "widgets/textbrowser.h" +#include "widgets/icons.h" #include "contextengine.h" #include "support/actioncollection.h" #include "support/action.h" @@ -111,7 +112,7 @@ ArtistView::ArtistView(QWidget *parent) , currentSimilarJob(0) { engine=ContextEngine::create(this); - refreshAction = ActionCollection::get()->createAction("refreshartist", i18n("Refresh Artist Information"), "view-refresh"); + refreshAction = ActionCollection::get()->createAction("refreshartist", i18n("Refresh Artist Information"), Icons::self()->refreshIcon); connect(refreshAction, SIGNAL(triggered()), this, SLOT(refresh())); connect(engine, SIGNAL(searchResult(QString,QString)), this, SLOT(searchResponse(QString,QString))); connect(Covers::self(), SIGNAL(artistImage(Song,QImage,QString)), SLOT(artistImage(Song,QImage,QString))); diff --git a/context/songview.cpp b/context/songview.cpp index cfa062d5e..4ef1e2fed 100644 --- a/context/songview.cpp +++ b/context/songview.cpp @@ -32,6 +32,7 @@ #include "support/utils.h" #include "support/messagebox.h" #include "support/localize.h" +#include "support/monoicon.h" #ifdef TAGLIB_FOUND #include "tags/tags.h" #endif @@ -133,10 +134,11 @@ SongView::SongView(QWidget *p) , infoNeedsUpdating(true) , metadataNeedsUpdating(true) { - scrollAction = ActionCollection::get()->createAction("scrolllyrics", i18n("Scroll Lyrics"), "go-down"); - refreshAction = ActionCollection::get()->createAction("refreshlyrics", i18n("Refresh Lyrics"), "view-refresh"); + QColor iconCol=Icons::calcIconColor(); + scrollAction = ActionCollection::get()->createAction("scrolllyrics", i18n("Scroll Lyrics"), MonoIcon::icon(FontAwesome::chevrondown, iconCol)); + refreshAction = ActionCollection::get()->createAction("refreshlyrics", i18n("Refresh Lyrics"), Icons::self()->refreshIcon); editAction = ActionCollection::get()->createAction("editlyrics", i18n("Edit Lyrics"), Icons::self()->editIcon); - delAction = ActionCollection::get()->createAction("dellyrics", i18n("Delete Lyrics File"), "edit-delete"); + delAction = ActionCollection::get()->createAction("dellyrics", i18n("Delete Lyrics File"), Icons::self()->removeIcon); scrollAction->setCheckable(true); scrollAction->setChecked(Settings::self()->contextAutoScroll()); @@ -147,7 +149,7 @@ SongView::SongView(QWidget *p) connect(UltimateLyrics::self(), SIGNAL(lyricsReady(int, QString)), SLOT(lyricsReady(int, QString))); engine=ContextEngine::create(this); - refreshInfoAction = ActionCollection::get()->createAction("refreshtrack", i18n("Refresh Track Information"), "view-refresh"); + refreshInfoAction = ActionCollection::get()->createAction("refreshtrack", i18n("Refresh Track Information"), Icons::self()->refreshIcon); cancelInfoJobAction=new Action(Icons::self()->cancelIcon, i18n("Cancel"), this); cancelInfoJobAction->setEnabled(false); connect(refreshInfoAction, SIGNAL(triggered()), SLOT(refreshInfo())); diff --git a/devices/devicespage.cpp b/devices/devicespage.cpp index c8423b6fa..7cd0e3d74 100644 --- a/devices/devicespage.cpp +++ b/devices/devicespage.cpp @@ -66,7 +66,7 @@ DevicesPage::DevicesPage(QWidget *p) syncAction->setEnabled(false); connect(syncAction, SIGNAL(triggered()), this, SLOT(sync())); #ifdef ENABLE_REMOTE_DEVICES - forgetDeviceAction=new Action(Icon("list-remove"), i18n("Forget Device"), this); + forgetDeviceAction=new Action(i18n("Forget Device"), this); connect(forgetDeviceAction, SIGNAL(triggered()), this, SLOT(forgetRemoteDevice())); #endif connect(DevicesModel::self()->connectAct(), SIGNAL(triggered()), this, SLOT(toggleDevice())); @@ -97,7 +97,7 @@ DevicesPage::DevicesPage(QWidget *p) menu->addAction(DevicesModel::self()->refreshAct()); #ifdef ENABLE_REMOTE_DEVICES menu->addSeparator(); - Action *addRemote=new Action(Icon("network-server"), i18n("Add Device"), this); + Action *addRemote=new Action(i18n("Add Device"), this); connect(addRemote, SIGNAL(triggered()), this, SLOT(addRemoteDevice())); menu->addAction(addRemote); menu->addAction(forgetDeviceAction); diff --git a/dynamic/dynamicpage.cpp b/dynamic/dynamicpage.cpp index fa9369d1e..749fdeb40 100644 --- a/dynamic/dynamicpage.cpp +++ b/dynamic/dynamicpage.cpp @@ -37,7 +37,7 @@ DynamicPage::DynamicPage(QWidget *p) { addAction = new Action(Icons::self()->addNewItemIcon, i18n("Add"), this); editAction = new Action(Icons::self()->editIcon, i18n("Edit"), this); - removeAction = new Action(Icons::self()->removeDynamicIcon, i18n("Remove"), this); + removeAction = new Action(Icons::self()->removeIcon, i18n("Remove"), this); toggleAction = new Action(this); ToolButton *addBtn=new ToolButton(this); diff --git a/gui/folderpage.cpp b/gui/folderpage.cpp index d079ecd37..eb9dec6b5 100644 --- a/gui/folderpage.cpp +++ b/gui/folderpage.cpp @@ -28,8 +28,10 @@ #include "support/messagebox.h" #include "support/action.h" #include "support/utils.h" +#include "support/monoicon.h" #include "models/mpdlibrarymodel.h" #include "widgets/menubutton.h" +#include "widgets/icons.h" #include "stdactions.h" #include "customactions.h" #include @@ -39,7 +41,8 @@ FolderPage::FolderPage(QWidget *p) : SinglePageWidget(p) , model(this) { - browseAction = new Action(Icon("system-file-manager"), i18n("Open In File Manager"), this); + QColor col=Icons::calcIconColor(); + browseAction = new Action(MonoIcon::icon(FontAwesome::folderopen, col), i18n("Open In File Manager"), this); connect(view, SIGNAL(itemsSelected(bool)), this, SLOT(controlActions())); connect(view, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(itemDoubleClicked(const QModelIndex &))); connect(browseAction, SIGNAL(triggered()), this, SLOT(openFileManager())); diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 657cbee6d..7cfa4f05b 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -74,6 +74,7 @@ #include "models/streamsmodel.h" #include "playlistspage.h" #include "support/fancytabwidget.h" +#include "support/monoicon.h" #ifdef QT_QTDBUS_FOUND #include "dbus/mpris.h" #include "cantataadaptor.h" @@ -232,11 +233,12 @@ MainWindow::MainWindow(QWidget *parent) StdActions::self()->stopAfterCurrentTrackAction->setGlobalShortcut(KShortcut()); #else setWindowIcon(Icons::self()->appIcon); + QColor iconCol=Icons::calcIconColor(); prefAction=ActionCollection::get()->createAction("configure", Utils::KDE==Utils::currentDe() ? i18n("Configure Cantata...") : i18n("Preferences"), HIDE_MENU_ICON(Icons::self()->configureIcon)); connect(prefAction, SIGNAL(triggered()),this, SLOT(showPreferencesDialog())); - quitAction = ActionCollection::get()->createAction("quit", i18n("Quit"), HIDE_MENU_ICON_NAME("application-exit")); + quitAction = ActionCollection::get()->createAction("quit", i18n("Quit"), HIDE_MENU_ICON(MonoIcon::icon(FontAwesome::poweroff, MonoIcon::constRed, MonoIcon::constRed))); connect(quitAction, SIGNAL(triggered()), this, SLOT(quit())); quitAction->setShortcut(QKeySequence::Quit); Action *aboutAction=ActionCollection::get()->createAction("about", i18nc("Qt-only", "About Cantata..."), HIDE_MENU_ICON(Icons::self()->appIcon)); @@ -250,15 +252,15 @@ MainWindow::MainWindow(QWidget *parent) restoreAction = new Action(i18n("Show Window"), this); connect(restoreAction, SIGNAL(triggered()), this, SLOT(restoreWindow())); - serverInfoAction=ActionCollection::get()->createAction("mpdinfo", i18n("Server information..."), HIDE_MENU_ICON_NAME("network-server")); + serverInfoAction=ActionCollection::get()->createAction("mpdinfo", i18n("Server information..."), HIDE_MENU_ICON(MonoIcon::icon(FontAwesome::server, iconCol))); connect(serverInfoAction, SIGNAL(triggered()),this, SLOT(showServerInfo())); serverInfoAction->setEnabled(Settings::self()->firstRun()); - refreshDbAction = ActionCollection::get()->createAction("refresh", i18n("Refresh Database"), HIDE_MENU_ICON_NAME("view-refresh")); + refreshDbAction = ActionCollection::get()->createAction("refresh", i18n("Refresh Database"), HIDE_MENU_ICON(Icons::self()->refreshIcon)); doDbRefreshAction = new Action(refreshDbAction->icon(), i18n("Refresh"), this); refreshDbAction->setEnabled(false); connectAction = new Action(Icons::self()->connectIcon, i18n("Connect"), this); - connectionsAction = new Action(HIDE_MENU_ICON(Icon("network-server")), i18n("Collection"), this); - outputsAction = new Action(HIDE_MENU_ICON(Icons::self()->speakerIcon), i18n("Outputs"), this); + connectionsAction = new Action(HIDE_MENU_ICON(MonoIcon::icon(FontAwesome::server, iconCol)), i18n("Collection"), this); + outputsAction = new Action(HIDE_MENU_ICON(MonoIcon::icon(FontAwesome::volumeup, iconCol)), i18n("Outputs"), this); stopAfterTrackAction = ActionCollection::get()->createAction("stopaftertrack", i18n("Stop After Track"), Icons::self()->toolbarStopIcon); fwdAction = new Action(this); revAction = new Action(this); @@ -269,22 +271,22 @@ MainWindow::MainWindow(QWidget *parent) addAction(fwdAction); addAction(revAction); - addPlayQueueToStoredPlaylistAction = new Action(HIDE_MENU_ICON(Icons::self()->playlistFileIcon), i18n("Add To Stored Playlist"), this); + addPlayQueueToStoredPlaylistAction = new Action(HIDE_MENU_ICON(Icons::self()->playlistListIcon), i18n("Add To Stored Playlist"), this); #ifdef ENABLE_DEVICES_SUPPORT copyToDeviceAction = new Action(HIDE_MENU_ICON(StdActions::self()->copyToDeviceAction->icon()), Utils::strippedText(StdActions::self()->copyToDeviceAction->text()), this); copyToDeviceAction->setMenu(DevicesModel::self()->menu()->duplicate(0)); #endif cropPlayQueueAction = ActionCollection::get()->createAction("cropplaylist", i18n("Crop Others")); - addStreamToPlayQueueAction = ActionCollection::get()->createAction("addstreamtoplayqueue", i18n("Add Stream URL"), HIDE_MENU_ICON(Icons::self()->addRadioStreamIcon)); - clearPlayQueueAction = ActionCollection::get()->createAction("clearplaylist", i18n("Clear"), HIDE_MENU_ICON(Icons::self()->clearListIcon)); + addStreamToPlayQueueAction = ActionCollection::get()->createAction("addstreamtoplayqueue", i18n("Add Stream URL")); + clearPlayQueueAction = ActionCollection::get()->createAction("clearplaylist", i18n("Clear"), HIDE_MENU_ICON(Icons::self()->removeIcon)); clearPlayQueueAction->setShortcut(Qt::ControlModifier+Qt::Key_K); centerPlayQueueAction = ActionCollection::get()->createAction("centerplaylist", i18n("Center On Current Track"), Icons::self()->centrePlayQueueOnTrackIcon); - expandInterfaceAction = ActionCollection::get()->createAction("expandinterface", i18n("Expanded Interface"), HIDE_MENU_ICON_NAME("view-media-playlist")); + expandInterfaceAction = ActionCollection::get()->createAction("expandinterface", i18n("Expanded Interface"), HIDE_MENU_ICON(MonoIcon::icon(FontAwesome::expand, iconCol))); expandInterfaceAction->setCheckable(true); songInfoAction = ActionCollection::get()->createAction("showsonginfo", i18n("Show Current Song Information"), Icons::self()->infoIcon); songInfoAction->setShortcut(Qt::Key_F12); songInfoAction->setCheckable(true); - fullScreenAction = ActionCollection::get()->createAction("fullScreen", i18n("Full Screen"), HIDE_MENU_ICON_NAME("view-fullscreen")); + fullScreenAction = ActionCollection::get()->createAction("fullScreen", i18n("Full Screen"), HIDE_MENU_ICON(MonoIcon::icon(FontAwesome::arrowsalt, iconCol))); #ifndef Q_OS_MAC fullScreenAction->setShortcut(Qt::Key_F11); #endif @@ -304,7 +306,7 @@ MainWindow::MainWindow(QWidget *parent) #endif streamPlayButton->setVisible(false); - locateTrackAction = ActionCollection::get()->createAction("locatetrack", i18n("Locate In Library"), "edit-find"); + locateTrackAction = ActionCollection::get()->createAction("locatetrack", i18n("Locate In Library"), Icons::self()->searchIcon); #ifdef TAGLIB_FOUND editPlayQueueTagsAction = ActionCollection::get()->createAction("editpqtags", Utils::strippedText(StdActions::self()->editTagsAction->text()), StdActions::self()->editTagsAction->icon()); #endif @@ -510,7 +512,7 @@ MainWindow::MainWindow(QWidget *parent) streamPlayButton->setIcon(Icons::self()->httpStreamIcon); #endif savePlayQueueButton->setIcon(Icons::self()->savePlayQueueIcon); - clearPlayQueueButton->setIcon(Icons::self()->clearListIcon); + clearPlayQueueButton->setIcon(Icons::self()->removeIcon); } #endif expandedSize=Settings::self()->mainWindowSize(); diff --git a/gui/playlistspage.cpp b/gui/playlistspage.cpp index 69762791e..5094b875c 100644 --- a/gui/playlistspage.cpp +++ b/gui/playlistspage.cpp @@ -61,7 +61,7 @@ public: StoredPlaylistsPage::StoredPlaylistsPage(QWidget *p) : SinglePageWidget(p) { - renamePlaylistAction = new Action(Icon("edit-rename"), i18n("Rename"), this); + renamePlaylistAction = new Action(Icons::self()->editIcon, i18n("Rename"), this); removeDuplicatesAction=new Action(i18n("Remove Duplicates"), this); removeDuplicatesAction->setEnabled(false); diff --git a/gui/preferencesdialog.cpp b/gui/preferencesdialog.cpp index f082851c3..141dd9349 100644 --- a/gui/preferencesdialog.cpp +++ b/gui/preferencesdialog.cpp @@ -75,7 +75,7 @@ PreferencesDialog::PreferencesDialog(QWidget *parent) context->load(); scrobbling->load(); custom->load(); - addPage(QLatin1String("collection"), server, i18n("Collection"), Icons::self()->audioFileIcon, i18n("Collection Settings")); + addPage(QLatin1String("collection"), server, i18n("Collection"), Icon("audio-x-generic"), i18n("Collection Settings")); addPage(QLatin1String("playback"), playback, i18n("Playback"), Icons::self()->speakerIcon, i18n("Playback Settings")); addPage(QLatin1String("files"), files, i18n("Downloaded Files"), Icons::self()->filesIcon, i18n("Downloaded Files Settings")); addPage(QLatin1String("interface"), interface, i18n("Interface"), Icon("preferences-other"), i18n("Interface Settings")); diff --git a/gui/searchpage.cpp b/gui/searchpage.cpp index 9debf176c..047613211 100644 --- a/gui/searchpage.cpp +++ b/gui/searchpage.cpp @@ -32,6 +32,7 @@ #include "plurals.h" #include "widgets/tableview.h" #include "widgets/menubutton.h" +#include "widgets/icons.h" class SearchTableView : public TableView { @@ -53,7 +54,7 @@ SearchPage::SearchPage(QWidget *p) , proxy(this) { statsLabel=new SqueezedTextLabel(this); - locateAction=new Action(Icon("edit-find"), i18n("Locate In Library"), this); + locateAction=new Action(Icons::self()->searchIcon, i18n("Locate In Library"), this); view->allowTableView(new SearchTableView(view)); connect(&model, SIGNAL(searching()), view, SLOT(showSpinner())); diff --git a/gui/stdactions.cpp b/gui/stdactions.cpp index 313a51a8d..eada8bf2e 100644 --- a/gui/stdactions.cpp +++ b/gui/stdactions.cpp @@ -22,9 +22,11 @@ */ #include "stdactions.h" +#include "widgets/icons.h" #include "support/localize.h" #include "support/action.h" #include "support/actioncollection.h" +#include "support/monoicon.h" #include "models/playlistsmodel.h" #ifdef ENABLE_DEVICES_SUPPORT #include "models/devicesmodel.h" @@ -46,6 +48,7 @@ static void setToolTip(Action *act, const QString &tt) StdActions::StdActions() { UNITY_MENU_ICON_CHECK + QColor col=Icons::calcIconColor(); prevTrackAction = ActionCollection::get()->createAction("prevtrack", i18n("Previous Track"), Icons::self()->toolbarPrevIcon); nextTrackAction = ActionCollection::get()->createAction("nexttrack", i18n("Next Track"), Icons::self()->toolbarNextIcon); playPauseTrackAction = ActionCollection::get()->createAction("playpausetrack", i18n("Play/Pause"), Icons::self()->toolbarPlayIcon); @@ -67,29 +70,29 @@ StdActions::StdActions() appendToPlayQueueAction->setShortcut(Qt::ControlModifier+Qt::Key_P); replacePlayQueueAction->setShortcut(Qt::ControlModifier+Qt::Key_R); - addWithPriorityAction = new Action(Icon("favorites"), i18n("Add With Priority"), 0); - setPriorityAction = new Action(Icon("favorites"), i18n("Set Priority"), 0); + addWithPriorityAction = new Action(i18n("Add With Priority"), 0); + setPriorityAction = new Action(i18n("Set Priority"), 0); prioHighestAction = new Action(i18n("Highest Priority (255)"), 0); prioHighAction = new Action(i18n("High Priority (200)"), 0); prioMediumAction = new Action(i18n("Medium Priority (125)"), 0); prioLowAction = new Action(i18n("Low Priority (50)"), 0); prioDefaultAction = new Action(i18n("Default Priority (0)"), 0); prioCustomAction = new Action(i18n("Custom Priority..."), 0); - addToStoredPlaylistAction = new Action(Icons::self()->playlistFileIcon, i18n("Add To Playlist"), 0); + addToStoredPlaylistAction = new Action(Icons::self()->playlistListIcon, i18n("Add To Playlist"), 0); #ifdef TAGLIB_FOUND - organiseFilesAction = new Action(HIDE_MENU_ICON(Icon("inode-directory")), i18n("Organize Files"), 0); + organiseFilesAction = new Action(HIDE_MENU_ICON(MonoIcon::icon(FontAwesome::folderopeno, col)), i18n("Organize Files"), 0); editTagsAction = new Action(i18n("Edit Track Information"), 0); #endif #ifdef ENABLE_REPLAYGAIN_SUPPORT - replaygainAction = new Action(HIDE_MENU_ICON(Icons::self()->audioFileIcon), i18n("ReplayGain"), 0); + replaygainAction = new Action(HIDE_MENU_ICON(MonoIcon::icon(FontAwesome::barchart, col)), i18n("ReplayGain"), 0); #endif #ifdef ENABLE_DEVICES_SUPPORT - copyToDeviceAction = new Action(HIDE_MENU_ICON(Icon("multimedia-player")), i18n("Copy Songs To Device"), 0); + copyToDeviceAction = new Action(HIDE_MENU_ICON(MonoIcon::icon(FontAwesome::mobile, col)), i18n("Copy Songs To Device"), 0); copyToDeviceAction->setMenu(DevicesModel::self()->menu()); - deleteSongsAction = new Action(Icon("edit-delete"), i18n("Delete Songs"), 0); + deleteSongsAction = new Action(MonoIcon::icon(FontAwesome::trash, MonoIcon::constRed), i18n("Delete Songs"), 0); #endif setCoverAction = new Action(i18n("Set Image"), 0); - removeAction = new Action(Icon("list-remove"), i18n("Remove"), 0); + removeAction = new Action(Icons::self()->removeIcon, i18n("Remove"), 0); searchAction = ActionCollection::get()->createAction("search", i18n("Find"), HIDE_MENU_ICON(Icons::self()->searchIcon)); searchAction->setShortcut(Qt::ControlModifier+Qt::Key_F); diff --git a/icons/radiostream-add16.png b/icons/radiostream-add16.png deleted file mode 100644 index 789d5fecb79c125caabcbb228c8d01fa03b461c8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 975 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7*pj^6T^Rm@;DWu&Co?cG za29w(7Bet#3xhBt!>l~~ptgfuL=_J7&Tz`z{i>Eak-aoTrMz0Z_V zhGX{czwiD2^!P#9HwJaB?Hrb=lLTH0Okc#E7HIjuaNEsWYeI|93QZJ{lqfEkke<1H z>A$OCLfK0<=BS>XDXPWIX5Jd9)TMe*R(Aip=hff${dL?lZ~y%B^U|y3I^ADMwBDNf z;76@_+cy3P<|7QEOBA0}h;OZom8oYiwe+6B;&9tHU{Y=dceBJreMgIx@xPx>T75N^ z!OhlbrIKB)?nGAkt(9yIORVx1duFY=Ab!X2u*R}|CreKI#s43Cw*d?Z{hT3uerDxPh^zupYmAZ2JZrs`xeJH9#mp@{c>eebb3nv&m$RT z3~#renyS2aKJyJ(=H5=(#ZzVKJ3J;Xy2}5`%j)W^c{Zz++A<=Zo6X-<9XI=Ht&P1= zL`PnXw~gtp`OdBTqaIJ?jNAR;$KPF(rtxTg5HpSJP?=fS;Iq22fBVBscJ{g(ViLQJ zWh}O=vibDy*Y`iBKTkJ*fA{XmRK3lD*Jf|toU@)ug+rM`VUmvzv&tfN299jew#}Os zzTW)qYMQn$Q}1urwEr5nHpI8^ zeC6_VBS!5Rzbj_1+TWC)m#)5Y(}ZUXED}-&j`+NAx_EK^>B7)@_MEG#u53TH)L-Ia zDF{6?>A<=LH)EY_e(u^Qq2m--n{!HJhV-_JaYjrGIi_qN#!yt(=3;Mb&vm;GAne{EfHeevwgDx7(~ zN6ZqF_s%n%**#T8XHq@nN~8-%kFzDgI}rl0hni zbMN!>1rwj1wDo^B``@;jeg?N2N9AuwD*H0T*vFh}%2&H{f5*#jb01FJa^+O>x1R|| z)D$mXC^WP7%~G=7ds=wvGr2{KTETOY=je+q|FfSZfpOEe(2%K?QT}@ZHx#)tPT*4s kINolOykYtz_XGRSFASY->iu~y0|Nttr>mdKI;Vst0JA*5v;Y7A diff --git a/icons/radiostream-add22.png b/icons/radiostream-add22.png deleted file mode 100644 index 301642bcd6154a154c20209ea125ba5ee87853e1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1419 zcmeAS@N?(olHy`uVBq!ia0y~yU=Rag4mJh`h9g^YtQi;>I14-?iy0WWg+Z8+Vb&Z8 z1_lQ95>H=O_PeY+LK@n9j9YUV7#P@+yxmo`A*=aoe?WK7kba}?J zV`g{%ManD^mS@b=)LyzYqO$YwaWj)NvlfBSAFjNoPX!` z#xpXtziTVMc3+Uec8|aeL8%vt;uo6v1?t=-*wc3K&XE4OKzjDkV=vzy*w0^e!TS0= zpVnE~c^7uov*y;@9@1V=>M0QC5YZLT@$F2&<2s%%C)5kB2>U#Gb!`4Ko>hg_ylE-c z8SAS86ig33e48ehV|TP&v{a_d|Mq@?L>^I-rmoH-(J^-;7&L8t(&TKv@U4ILN}(w3 zh}^U-OB)vbHdyiYt;5%{=2O?Wey^Xhkj1Ge?(L(3t$NDy<#urY`fWUaRfUkP7T@YZ zTfU1{Y3wuem{i_9b!z&P$8s$<(sUy z5%b#x`;XT!?ofp4$CTAQs43nC9QzGW=l*Th&Uqr6;c`5n*DbjlMxc&JunVr-5FW-M6dHxc`r}L2i*2H^1W4Cm$zlv^Ii6x7c9~^jBCFa z7c6~UGT~HRP=5#~XSXlh;mUG423Wdil$??vDJb=Fguu{1KDe_I#D@8kG&3x3YKbKXoMSabWU=ZB8#!zU3UBsd(d} z6!!$y&7yNlFFu`qLN_ujzdkfaVuiY$c2D2rdwo+Kf|l-_#XD`@&gbU#R{vbNmtL!R z|FPo7zRg7~;u|%?%1 zQ(HT0oA(>;K9?IUzFVEXa|rj}-?x>aC^~J?U#3UF9GMEt{2Bt=4y`ipv+#C)8Tfvy z@8z#5&t}M+{O5G^Q(s%ds>usa2>EN4>nl}XZ#b(QpqV9~{OJ4svW@*6KQA5TzaRWjF+(6z zv|^s_Y0bI!e_U?klJB?0oEe`uDY{Fl zoXu!f%3zWbG=4C1kN2I^+I(x>cC8kirxFpDetSalChlpkcAcy$`grqs%hB}Ugw45P z*CfLC>^(Vyz3QB^Mbn8s#RoS#0@@pd130o;YB@e%33J-AV0(RP`IB65BcR3dK*s$Gl_TNd!F<3O$b$F&=+Jty!g zMR0FC#QW%{BJ0N83l6&PVddN`_$WbGu`86V2Bj*7MBkw_&M2@@?Ppj=SMy3W=RALVdrxHgSKj7kpJG kBjd0{V&?=Yj}PWcGzHHanp77tFfcH9y85}Sb4q9e0I}zzUjP6A diff --git a/icons/radiostream-add32.png b/icons/radiostream-add32.png deleted file mode 100644 index 44d46d587d262b6e928fe739f3d3379193d1340b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2017 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}oCO|{#S9GG!XV7ZFl&wk z0|NtliKnkC`(0KZQFex{?~;x(FfgzsdAqwX{0G4WdzVjUU|`Slba4!cIJ`HEJ0SSF z*j>Yf0~%g07rU;#6t+BUe#8Dp?HjYEmU&r+eY|;)e+7q9fREx;78a+5KfWBZn%2($ zWffLVwrx_JG*1gyZmA6I?eLtWuToLXXnR^oO5g7n8-!G*)jK9e>xjh9>3_R@ z<9UWp-uxOymCySORZhu-Ow}*{Q@-Vs5aX@<^u}+}|5fG%?0RRraD)8!qJ6Iz| zZKtc)F~;RLYGx}JmpQzuXPS91@|e9)vW9!%%K4j5mmGF3%c->PnH;s;Kjh)XmDSgI z1)msa9e?ZD_3dp=^nx29vO48of_fiyAGllDxQb2NYFdx=m&eB!{;x~m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$gs9Pv1uW4gmw`zr= z)~CJ2`hVmaEnKzrgCgvcqv{U7S#af6LXVqBDeKoQY;v<1CI?zD{;=i}w9+zrn#$2X zTmOV$?R&9AyM@;>CO1FNjgT`bKb%t~(?6#*+-R22+-dt*CHwswob@IA?6NvEjyQet zygzSZ^{)@@>br`HKhIemuD)zRZ_l9^qvpx+Nl(%hRSwE%@vnH1vgPhyu|Kt{l5USp ncl+;cu@=nSaP9tv|IC-fj?J8N?m;R80|SGntDnm{r-UW|(OJN5 diff --git a/icons/radiostream-add48.png b/icons/radiostream-add48.png deleted file mode 100644 index 3ffa672e67f34a523b1bf23d9e34d58178419bfe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3955 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4mJh`hH$2z?F23CbXgbH!tgIIGdv!>SRrg0cwFMEYT)NhnN1B`8Va*dU3;_la>-`N3q3QQ?2-Jw zLPO!VlCS<%le}b;cT$g~glj!bqCSV0mR`QvZKZ$C`uW}BeZ{}8-Tn9e{=2nV4flh) z)>SwD_!BT8CZSHfC4u$1$D!88#tqTJw`jLKEV+7;p0W|FGA0 zy+4y%j&0HAN(HOCtcQYCIQk|Zc<=gRKGPfVISP&yzc@S2l{7tZGCPsyyJhFU{cAPe z@jK~WU!d^4vA#!eR_o*+e;BS!?I=28<|6xO)76NsEg$6V8^4^2n{c1^$M=kwqI*Af z%m3?RKX}qE_fvJf%N$1$hW|gj&&TxN_fC|1#K>8mXd<-g%RpI5E)k9*_!Csk95G+v*|Z2f z*rK1M0`q>HJM$%4u#toPa>T*T=keDQSU+zwPBMD5Cb71}`{K;i0X50L{#)toIP|zp z{!#JdK<)362lu=0akoEzebI$8GiEfuIqALK%Hc>}dB?5Ctbx_F3PRbd_NH_*XU{2= zn|&tjh;y^|+@0K)vM2kz`?BY#V@cn|KdqTD4?E}Y*fE27|8`k%*?iL*F+ZkSt2;T> z^5kT!ZP;?oxg*cx{T0P28#eA`3z~IW;oF5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>*k!=R_-PDdN)=azuMKl%%sjJ;jQ4W1v8ai8AU!`$+BpHJeO1w`$CTg z8XbWdoQFJAq}H7k$rb+n?9H^pzXdo1=LqopuybLwUf`Zu!dKl7FBt1*=)!_-BHr9nNfO88VkFqde@*^cuwb~RPTHEEbBD<&l=o!7CJOyu|!pW9{b zy=sliL-m_qBe%2_iwI8;jOQz8k`B&KofoX)CCFv0%`vlK+m@!r1NmV_U*n_wuQz7D zj$Ovtx9)ehlkJo&eT|EUF6%g{b40#$pQg7YFncmj@&l>0ftrtBbGhB-S{9p=#>#s6 zTzbpdq(>@ed8A)TRD9d79n59D`PqppkHvDsE^oiey7XJ8%~vf!)`K(NvvLSJop7>v zRc#xyq*Xti^y%>o*-Z~ZU6V7uvk!n`Bdvu!Q+7e8zYI&}L-PF?4- z*161=f1VYV3I1EMOu<~JqxJOu_x*Nf-XC+$^+=lhyFO*h9%IY(m%o(0<(>H|UQJ+1 z0ZUpZkNo+2>n>FLJleXR!%JiKAWM5lQx=4zUO3?s`eFjl+YZN+$I5+>^?aJYqH1PEc)9-(PcCZcabt zHeTQ0ewoP&W%%c7{r0=)|50mVOL%9}W)UsZ*k^GTjN&Y%1-vdjPj*za722|&VG>{e zQ@&nEv6rX+z4zihGMm<{Nz(4CzI#x)!0ftp2A73J&~o$A^$Y)9EHsTZ)?fHpWrsw&&{LN_k$U(?gm;b$c5YAn9$C)cO(m|koCwdmZMgG){K2wm??&s*%q zRAbd!$NxY7RMroP_&4$j9#R`WaD+Mj*u3no@EQMt=-vNjd|+T;VDNPHb6Mw<&;$TJ C;)%`x diff --git a/models/playlistsmodel.cpp b/models/playlistsmodel.cpp index acfac0f6d..c6d908b3f 100644 --- a/models/playlistsmodel.cpp +++ b/models/playlistsmodel.cpp @@ -80,7 +80,7 @@ PlaylistsModel::PlaylistsModel(QObject *parent) , dropAdjust(0) #endif { - icn=Icons::self()->playlistFileIcon; + icn=Icon(QStringList() << "playlist" << "view-media-playlist" << "audio-x-mp3-playlist" << "audio-x-generic"); connect(MPDConnection::self(), SIGNAL(stateChanged(bool)), SLOT(mpdConnectionStateChanged(bool))); connect(MPDConnection::self(), SIGNAL(playlistsRetrieved(const QList &)), this, SLOT(setPlaylists(const QList &))); connect(MPDConnection::self(), SIGNAL(playlistInfoRetrieved(const QString &, const QList &)), this, SLOT(playlistInfoRetrieved(const QString &, const QList &))); diff --git a/models/playqueuemodel.cpp b/models/playqueuemodel.cpp index 0a7a5bdc0..0402bee4c 100644 --- a/models/playqueuemodel.cpp +++ b/models/playqueuemodel.cpp @@ -36,6 +36,7 @@ #include "http/httpserver.h" #include "gui/settings.h" #include "support/icon.h" +#include "support/monoicon.h" #include "support/utils.h" #include "config.h" #include "support/action.h" @@ -43,6 +44,7 @@ #include "support/globalstatic.h" #include "gui/covers.h" #include "widgets/groupedview.h" +#include "widgets/icons.h" #include "roles.h" #ifdef ENABLE_DEVICES_SUPPORT #include "devicesmodel.h" @@ -243,9 +245,10 @@ PlayQueueModel::PlayQueueModel(QObject *parent) UNITY_MENU_ICON_CHECK removeDuplicatesAction=new Action(i18n("Remove Duplicates"), this); removeDuplicatesAction->setEnabled(false); - undoAction=ActionCollection::get()->createAction("playqueue-undo", i18n("Undo"), HIDE_MENU_ICON_NAME("edit-undo")); + QColor col=Icons::calcIconColor(); + undoAction=ActionCollection::get()->createAction("playqueue-undo", i18n("Undo"), HIDE_MENU_ICON(MonoIcon::icon(FontAwesome::undo, col))); undoAction->setShortcut(Qt::ControlModifier+Qt::Key_Z); - redoAction=ActionCollection::get()->createAction("playqueue-redo", i18n("Redo"), HIDE_MENU_ICON_NAME("edit-redo")); + redoAction=ActionCollection::get()->createAction("playqueue-redo", i18n("Redo"), HIDE_MENU_ICON(MonoIcon::icon(FontAwesome::repeat, col))); redoAction->setShortcut(Qt::ControlModifier+Qt::ShiftModifier+Qt::Key_Z); connect(undoAction, SIGNAL(triggered()), this, SLOT(undo())); connect(redoAction, SIGNAL(triggered()), this, SLOT(redo())); diff --git a/streams/streamspage.cpp b/streams/streamspage.cpp index ccfd1de6b..7a2d884cd 100644 --- a/streams/streamspage.cpp +++ b/streams/streamspage.cpp @@ -32,6 +32,7 @@ #include "support/actioncollection.h" #include "network/networkaccessmanager.h" #include "support/configuration.h" +#include "support/monoicon.h" #include "gui/settings.h" #include "widgets/menubutton.h" #include "widgets/itemview.h" @@ -105,9 +106,10 @@ StreamsBrowsePage::StreamsBrowsePage(QWidget *p) : SinglePageWidget(p) , settings(0) { - importAction = new Action(Icon("document-import"), i18n("Import Streams Into Favorites"), this); - exportAction = new Action(Icon("document-export"), i18n("Export Favorite Streams"), this); - addAction = ActionCollection::get()->createAction("addstream", i18n("Add New Stream To Favorites"), Icons::self()->addRadioStreamIcon); + QColor iconCol=Icons::calcIconColor(); + importAction = new Action(MonoIcon::icon(FontAwesome::arrowright, iconCol), i18n("Import Streams Into Favorites"), this); + exportAction = new Action(MonoIcon::icon(FontAwesome::arrowleft, iconCol), i18n("Export Favorite Streams"), this); + addAction = ActionCollection::get()->createAction("addstream", i18n("Add New Stream To Favorites")); editAction = new Action(Icons::self()->editIcon, i18n("Edit"), this); searchAction = new Action(Icons::self()->searchIcon, i18n("Seatch For Streams"), this); connect(searchAction, SIGNAL(triggered()), this, SIGNAL(searchForStreams())); diff --git a/support/monoicon.cpp b/support/monoicon.cpp index d57626e9f..ab48024c1 100644 --- a/support/monoicon.cpp +++ b/support/monoicon.cpp @@ -77,7 +77,6 @@ public: if (fileName.isEmpty()) { QString fontName; - double scale=0.9; if (FontAwesome::ex_one==fontAwesomeIcon) { fontName="serif"; } else { @@ -88,38 +87,24 @@ public: fontAwesomeFontName= loadedFontFamilies.at(0); } } - - switch (fontAwesomeIcon) { - case FontAwesome::lastfmsquare: - case FontAwesome::lastfm: - scale=1.1; - break; - case FontAwesome::list: - if (!Utils::isHighDpi()) { - scale=1.05; - } - break; - case FontAwesome::bars: - if (rect.height()>18 && !Utils::isHighDpi()) { - scale=0.95; - } - break; - default: - break; - } fontName=fontAwesomeFontName; } QFont font(fontName); - int pixelSize=qRound(rect.height()*scale); + int pixelSize=rect.height(); if (FontAwesome::ex_one==fontAwesomeIcon) { font.setBold(true); - } else if (!Utils::isHighDpi()) { - if (pixelSize>=12 && pixelSize<=16 && rect.height()>14) { - pixelSize=14; - } else if (pixelSize>=24 && pixelSize<=32 && rect.height()>28) { - pixelSize=28; + } else if (pixelSize>10) { + static const int constScale=14; + static const int constHalfScale=constScale/2; + pixelSize=((pixelSize/constScale)*constScale)+((pixelSize%constScale)>=constHalfScale ? constScale : 0); + pixelSize=qMin(pixelSize, rect.height()); + if (FontAwesome::bars==fontAwesomeIcon && pixelSize%constHalfScale) { + pixelSize-=1; + } else if (FontAwesome::list==fontAwesomeIcon && pixelSize%constHalfScale) { + pixelSize+=1; } + } font.setPixelSize(pixelSize); diff --git a/widgets/icons.cpp b/widgets/icons.cpp index 490d65e71..40b0478cf 100644 --- a/widgets/icons.cpp +++ b/widgets/icons.cpp @@ -67,7 +67,7 @@ static QColor clampColor(const QColor &color, int darkLimit=constDarkLimit, int : color; } -static QColor calcIconColor() +QColor Icons::calcIconColor() { QColor bgnd=QApplication::palette().color(QPalette::Active, QPalette::Background); QColor text=QApplication::palette().color(QPalette::Active, QPalette::WindowText); @@ -99,7 +99,6 @@ Icons::Icons() } podcastIcon=Icon("inode-directory"); audioFileIcon=Icon("audio-x-generic"); - playlistFileIcon=Icon(QStringList() << "playlist" << "view-media-playlist" << "audio-x-mp3-playlist" << "audio-x-generic"); folderIcon=Icon("inode-directory"); dynamicRuleIcon=Icon(QStringList() << "dynamic-playlist" << "media-playlist-shuffle" << "text-x-generic"); speakerIcon=Icon(QStringList() << "speaker" << "audio-speakers" << "gnome-volume-control"); @@ -107,7 +106,6 @@ Icons::Icons() shuffleIcon=MonoIcon::icon(FontAwesome::random, stdColor); filesIcon=Icon(QStringList() << "folder-downloads" << "folder-download" << "folder" << "go-down"); radioStreamIcon=Icon::create("radio", constStdSizes); - addRadioStreamIcon=Icon::create("addradio", constStdSizes); albumIconSmall.addFile(":album32.svg"); albumIconLarge.addFile(":album.svg"); albumMonoIcon=MonoIcon::icon(":mono-album.svg", stdColor); @@ -122,10 +120,9 @@ Icons::Icons() appendToPlayQueueIcon=MonoIcon::icon(FontAwesome::plus, stdColor); centrePlayQueueOnTrackIcon=MonoIcon::icon(Qt::RightToLeft==QApplication::layoutDirection() ? FontAwesome::chevronleft : FontAwesome::chevronright, stdColor); savePlayQueueIcon=MonoIcon::icon(FontAwesome::save, stdColor); - clearListIcon=MonoIcon::icon(FontAwesome::remove, MonoIcon::constRed, MonoIcon::constRed); + cutIcon=MonoIcon::icon(FontAwesome::remove, MonoIcon::constRed, MonoIcon::constRed); addNewItemIcon=MonoIcon::icon(FontAwesome::plussquare, stdColor); editIcon=MonoIcon::icon(FontAwesome::edit, stdColor); - removeDynamicIcon=MonoIcon::icon(FontAwesome::minussquare, stdColor); stopDynamicIcon=MonoIcon::icon(FontAwesome::stop, MonoIcon::constRed, MonoIcon::constRed); searchIcon=MonoIcon::icon(FontAwesome::search, stdColor); addToFavouritesIcon=MonoIcon::icon(FontAwesome::heart, MonoIcon::constRed, MonoIcon::constRed); @@ -134,7 +131,7 @@ Icons::Icons() connectIcon=MonoIcon::icon(FontAwesome::plug, stdColor); disconnectIcon=MonoIcon::icon(FontAwesome::eject, stdColor); downloadIcon=MonoIcon::icon(FontAwesome::download, stdColor); - removeIcon=MonoIcon::icon(FontAwesome::minus, MonoIcon::constRed, MonoIcon::constRed); + removeIcon=MonoIcon::icon(FontAwesome::trash, MonoIcon::constRed, MonoIcon::constRed); addIcon=MonoIcon::icon(FontAwesome::plus, stdColor); addBookmarkIcon=MonoIcon::icon(FontAwesome::bookmark, stdColor); audioListIcon=MonoIcon::icon(FontAwesome::music, stdColor); @@ -144,6 +141,7 @@ Icons::Icons() savedRssListIcon=MonoIcon::icon(FontAwesome::rsssquare, stdColor); clockIcon=MonoIcon::icon(FontAwesome::clocko, stdColor); folderListIcon=MonoIcon::icon(FontAwesome::foldero, stdColor); + refreshIcon=MonoIcon::icon(FontAwesome::refresh, stdColor); streamListIcon=audioListIcon; streamCategoryIcon=folderListIcon; #ifdef ENABLE_HTTP_STREAM_PLAYBACK diff --git a/widgets/icons.h b/widgets/icons.h index 37f207d96..99b36a676 100644 --- a/widgets/icons.h +++ b/widgets/icons.h @@ -34,6 +34,8 @@ class Icons public: static Icons *self(); + static QColor calcIconColor(); + Icons(); void initSidebarIcons(); void initToolbarIcons(const QColor &toolbarText); @@ -49,14 +51,12 @@ public: Icon podcastIcon; Icon folderIcon; Icon audioFileIcon; - Icon playlistFileIcon; Icon dynamicRuleIcon; // Also used for Mopidy smart playlists... Icon singleIcon; Icon consumeIcon; Icon repeatIcon; Icon shuffleIcon; Icon radioStreamIcon; - Icon addRadioStreamIcon; Icon streamIcon; Icon speakerIcon; Icon menuIcon; @@ -87,10 +87,9 @@ public: QIcon appendToPlayQueueIcon; QIcon centrePlayQueueOnTrackIcon; QIcon savePlayQueueIcon; - QIcon clearListIcon; + QIcon cutIcon; QIcon addNewItemIcon; QIcon editIcon; - QIcon removeDynamicIcon; QIcon stopDynamicIcon; QIcon searchIcon; QIcon addToFavouritesIcon; @@ -119,6 +118,7 @@ public: QIcon upIcon; QIcon downIcon; QIcon cancelIcon; + QIcon refreshIcon; }; #endif diff --git a/widgets/itemview.cpp b/widgets/itemview.cpp index ac6e97c50..f806e7362 100644 --- a/widgets/itemview.cpp +++ b/widgets/itemview.cpp @@ -602,7 +602,7 @@ ItemView::ItemView(QWidget *p) { setupUi(this); if (!backAction) { - backAction=ActionCollection::get()->createAction("itemview-goback", i18n("Go Back"), Icon("go-previous")); + backAction=ActionCollection::get()->createAction("itemview-goback", i18n("Go Back")); backAction->setShortcut(Qt::AltModifier+(Qt::LeftToRight==layoutDirection() ? Qt::Key_Left : Qt::Key_Right)); } title->addAction(backAction); diff --git a/widgets/playqueueview.cpp b/widgets/playqueueview.cpp index 0123ac49a..ab9d42320 100644 --- a/widgets/playqueueview.cpp +++ b/widgets/playqueueview.cpp @@ -90,7 +90,7 @@ PlayQueueView::PlayQueueView(QWidget *parent) , backgroundOpacity(15) , backgroundBlur(0) { - removeFromAction = new Action(Icon("list-remove"), i18n("Remove"), this); + removeFromAction = new Action(Icons::self()->removeIcon, i18n("Remove"), this); setMode(ItemView::Mode_GroupedTree); animator.setPropertyName("fade"); animator.setTargetObject(this); diff --git a/widgets/treeview.cpp b/widgets/treeview.cpp index 4085ea8b4..b4e02acc6 100644 --- a/widgets/treeview.cpp +++ b/widgets/treeview.cpp @@ -164,7 +164,7 @@ void TreeView::drag(Qt::DropActions supportedActions, QAbstractItemView *view, c QDrag *drag = new QDrag(view); drag->setMimeData(data); int pixSize=Icon::stdSize(Utils::scaleForDpi(32)); - drag->setPixmap(Icons::self()->audioFileIcon.pixmap(pixSize, pixSize)); + drag->setPixmap(Icon("audio-x-generic").pixmap(pixSize, pixSize)); drag->start(supportedActions); } }