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 789d5fecb..000000000
Binary files a/icons/radiostream-add16.png and /dev/null differ
diff --git a/icons/radiostream-add22.png b/icons/radiostream-add22.png
deleted file mode 100644
index 301642bcd..000000000
Binary files a/icons/radiostream-add22.png and /dev/null differ
diff --git a/icons/radiostream-add32.png b/icons/radiostream-add32.png
deleted file mode 100644
index 44d46d587..000000000
Binary files a/icons/radiostream-add32.png and /dev/null differ
diff --git a/icons/radiostream-add48.png b/icons/radiostream-add48.png
deleted file mode 100644
index 3ffa672e6..000000000
Binary files a/icons/radiostream-add48.png and /dev/null differ
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);
}
}