Enable system theme icons, add iconmapper and rename some icon names

This commit is contained in:
Jonas Kvinge 2019-10-20 00:17:28 +02:00
parent cf5198ac64
commit 7c9fc91af9
52 changed files with 353 additions and 188 deletions

View File

@ -6,7 +6,7 @@
<file>icons/128x128/applications-internet.png</file>
<file>icons/128x128/bluetooth.png</file>
<file>icons/128x128/cdcase.png</file>
<file>icons/128x128/cd.png</file>
<file>icons/128x128/media-optical.png</file>
<file>icons/128x128/configure.png</file>
<file>icons/128x128/device-ipod-nano.png</file>
<file>icons/128x128/device-ipod.png</file>
@ -57,9 +57,9 @@
<file>icons/128x128/mcintosh-player.png</file>
<file>icons/128x128/mcintosh-text.png</file>
<file>icons/128x128/media-eject.png</file>
<file>icons/128x128/media-pause.png</file>
<file>icons/128x128/media-play.png</file>
<file>icons/128x128/media-stop.png</file>
<file>icons/128x128/media-playback-pause.png</file>
<file>icons/128x128/media-playback-start.png</file>
<file>icons/128x128/media-playback-stop.png</file>
<file>icons/128x128/media-skip-forward.png</file>
<file>icons/128x128/media-skip-backward.png</file>
<file>icons/128x128/media-seek-forward.png</file>
@ -79,7 +79,7 @@
<file>icons/128x128/view-media-playlist.png</file>
<file>icons/128x128/view-media-visualization.png</file>
<file>icons/128x128/view-refresh.png</file>
<file>icons/128x128/vinyl.png</file>
<file>icons/128x128/library-music.png</file>
<file>icons/128x128/vlc.png</file>
<file>icons/128x128/xine.png</file>
<file>icons/128x128/zoom-in.png</file>
@ -97,7 +97,7 @@
<file>icons/64x64/applications-internet.png</file>
<file>icons/64x64/bluetooth.png</file>
<file>icons/64x64/cdcase.png</file>
<file>icons/64x64/cd.png</file>
<file>icons/64x64/media-optical.png</file>
<file>icons/64x64/configure.png</file>
<file>icons/64x64/device-ipod-nano.png</file>
<file>icons/64x64/device-ipod.png</file>
@ -148,9 +148,9 @@
<file>icons/64x64/mcintosh-player.png</file>
<file>icons/64x64/mcintosh-text.png</file>
<file>icons/64x64/media-eject.png</file>
<file>icons/64x64/media-pause.png</file>
<file>icons/64x64/media-play.png</file>
<file>icons/64x64/media-stop.png</file>
<file>icons/64x64/media-playback-pause.png</file>
<file>icons/64x64/media-playback-start.png</file>
<file>icons/64x64/media-playback-stop.png</file>
<file>icons/64x64/media-skip-forward.png</file>
<file>icons/64x64/media-skip-backward.png</file>
<file>icons/64x64/media-seek-forward.png</file>
@ -171,7 +171,7 @@
<file>icons/64x64/view-media-playlist.png</file>
<file>icons/64x64/view-media-visualization.png</file>
<file>icons/64x64/view-refresh.png</file>
<file>icons/64x64/vinyl.png</file>
<file>icons/64x64/library-music.png</file>
<file>icons/64x64/vlc.png</file>
<file>icons/64x64/xine.png</file>
<file>icons/64x64/zoom-in.png</file>
@ -189,7 +189,7 @@
<file>icons/48x48/applications-internet.png</file>
<file>icons/48x48/bluetooth.png</file>
<file>icons/48x48/cdcase.png</file>
<file>icons/48x48/cd.png</file>
<file>icons/48x48/media-optical.png</file>
<file>icons/48x48/configure.png</file>
<file>icons/48x48/device-ipod-nano.png</file>
<file>icons/48x48/device-ipod.png</file>
@ -241,11 +241,11 @@
<file>icons/48x48/mcintosh.png</file>
<file>icons/48x48/mcintosh-text.png</file>
<file>icons/48x48/media-eject.png</file>
<file>icons/48x48/media-pause.png</file>
<file>icons/48x48/media-playback-pause.png</file>
<file>icons/48x48/media-playlist-repeat.png</file>
<file>icons/48x48/media-playlist-shuffle.png</file>
<file>icons/48x48/media-play.png</file>
<file>icons/48x48/media-stop.png</file>
<file>icons/48x48/media-playback-start.png</file>
<file>icons/48x48/media-playback-stop.png</file>
<file>icons/48x48/media-skip-forward.png</file>
<file>icons/48x48/media-skip-backward.png</file>
<file>icons/48x48/media-seek-forward.png</file>
@ -266,7 +266,7 @@
<file>icons/48x48/view-media-playlist.png</file>
<file>icons/48x48/view-media-visualization.png</file>
<file>icons/48x48/view-refresh.png</file>
<file>icons/48x48/vinyl.png</file>
<file>icons/48x48/library-music.png</file>
<file>icons/48x48/vlc.png</file>
<file>icons/48x48/xine.png</file>
<file>icons/48x48/zoom-in.png</file>
@ -284,7 +284,7 @@
<file>icons/32x32/applications-internet.png</file>
<file>icons/32x32/bluetooth.png</file>
<file>icons/32x32/cdcase.png</file>
<file>icons/32x32/cd.png</file>
<file>icons/32x32/media-optical.png</file>
<file>icons/32x32/configure.png</file>
<file>icons/32x32/device-ipod-nano.png</file>
<file>icons/32x32/device-ipod.png</file>
@ -336,11 +336,11 @@
<file>icons/32x32/mcintosh.png</file>
<file>icons/32x32/mcintosh-text.png</file>
<file>icons/32x32/media-eject.png</file>
<file>icons/32x32/media-pause.png</file>
<file>icons/32x32/media-playback-pause.png</file>
<file>icons/32x32/media-playlist-repeat.png</file>
<file>icons/32x32/media-playlist-shuffle.png</file>
<file>icons/32x32/media-play.png</file>
<file>icons/32x32/media-stop.png</file>
<file>icons/32x32/media-playback-start.png</file>
<file>icons/32x32/media-playback-stop.png</file>
<file>icons/32x32/media-skip-forward.png</file>
<file>icons/32x32/media-skip-backward.png</file>
<file>icons/32x32/media-seek-forward.png</file>
@ -361,7 +361,7 @@
<file>icons/32x32/view-media-playlist.png</file>
<file>icons/32x32/view-media-visualization.png</file>
<file>icons/32x32/view-refresh.png</file>
<file>icons/32x32/vinyl.png</file>
<file>icons/32x32/library-music.png</file>
<file>icons/32x32/vlc.png</file>
<file>icons/32x32/xine.png</file>
<file>icons/32x32/zoom-in.png</file>
@ -379,7 +379,7 @@
<file>icons/22x22/applications-internet.png</file>
<file>icons/22x22/bluetooth.png</file>
<file>icons/22x22/cdcase.png</file>
<file>icons/22x22/cd.png</file>
<file>icons/22x22/media-optical.png</file>
<file>icons/22x22/configure.png</file>
<file>icons/22x22/device-ipod-nano.png</file>
<file>icons/22x22/device-ipod.png</file>
@ -431,11 +431,11 @@
<file>icons/22x22/mcintosh.png</file>
<file>icons/22x22/mcintosh-text.png</file>
<file>icons/22x22/media-eject.png</file>
<file>icons/22x22/media-pause.png</file>
<file>icons/22x22/media-playback-pause.png</file>
<file>icons/22x22/media-playlist-repeat.png</file>
<file>icons/22x22/media-playlist-shuffle.png</file>
<file>icons/22x22/media-play.png</file>
<file>icons/22x22/media-stop.png</file>
<file>icons/22x22/media-playback-start.png</file>
<file>icons/22x22/media-playback-stop.png</file>
<file>icons/22x22/media-skip-forward.png</file>
<file>icons/22x22/media-skip-backward.png</file>
<file>icons/22x22/media-seek-forward.png</file>
@ -456,7 +456,7 @@
<file>icons/22x22/view-media-playlist.png</file>
<file>icons/22x22/view-media-visualization.png</file>
<file>icons/22x22/view-refresh.png</file>
<file>icons/22x22/vinyl.png</file>
<file>icons/22x22/library-music.png</file>
<file>icons/22x22/vlc.png</file>
<file>icons/22x22/xine.png</file>
<file>icons/22x22/zoom-in.png</file>

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

View File

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 908 B

After

Width:  |  Height:  |  Size: 908 B

View File

Before

Width:  |  Height:  |  Size: 921 B

After

Width:  |  Height:  |  Size: 921 B

View File

Before

Width:  |  Height:  |  Size: 921 B

After

Width:  |  Height:  |  Size: 921 B

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 162 KiB

BIN
data/icons/full/love.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

View File

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -1,114 +0,0 @@
#!/bin/sh
sizes="128x128 64x64 48x48 32x32 22x22"
#
for i in full/*
do
source=$i
file=`basename $i`
id=`identify "$i"` || exit 1
if [ "$id" = "" ] ; then
echo "ERROR: Cannot determine format and geometry for image: \"$i\"."
continue
fi
g=`echo $id | awk '{print $3}'` || exit 1
if [ "$g" = "" ] ; then
echo "ERROR: Cannot determine geometry for image: \"$i\"."
continue
fi
# Geometry can be 563x144+0+0 or 75x98
# we need to get rid of the plus (+) and the x characters:
w=`echo $g | sed 's/[^0-9]/ /g' | awk '{print $1}'` || exit 1
if [ "$w" = "" ] ; then
echo "ERROR: Cannot determine width for image: \"$x\"."
continue
fi
h=`echo $g | sed 's/[^0-9]/ /g' | awk '{print $2}'` || exit 1
if [ "$h" = "" ] ; then
echo "ERROR: Cannot determine height for image: \"$x\"."
continue
fi
for x in $sizes
do
dest="$x/$file"
if [ -f $dest ]; then
continue
fi
x_w=$(echo $x | cut -d 'x' -f1)
x_h=$(echo $x | cut -d 'x' -f2)
if [ "$w" -lt "$x_w" ] || [ "$h" -lt "$x_h" ]; then
continue
fi
echo "convert -verbose -resize $x $source $dest"
convert -verbose -resize $x $source $dest
done
done
for i in $sizes
do
for x in $i/*
do
file=`basename $x`
if ! [ -f "full/$file" ]; then
echo "Warning: full/$file does not exist, but $x exists."
fi
id=`identify "$x"` || exit 1
if [ "$id" = "" ] ; then
echo "ERROR: Cannot determine format and geometry for image: \"$x\"."
continue
fi
g=`echo $id | awk '{print $3}'` || exit 1
if [ "$g" = "" ] ; then
echo "ERROR: Cannot determine geometry for image: \"$x\"."
continue
fi
# Geometry can be 563x144+0+0 or 75x98
# we need to get rid of the plus (+) and the x characters:
w=`echo $g | sed 's/[^0-9]/ /g' | awk '{print $1}'` || exit 1
if [ "$w" = "" ] ; then
echo "ERROR: Cannot determine width for image: \"$x\"."
continue
fi
h=`echo $g | sed 's/[^0-9]/ /g' | awk '{print $2}'` || exit 1
if [ "$h" = "" ] ; then
echo "ERROR: Cannot determine height for image: \"$x\"."
continue
fi
if ! [ "${h}x${w}" = "$i" ]; then
echo "Warning: $x is not $i, but ${h}x${w}!"
fi
done
done
file="../icons.qrc"
rm -rf "$file"
echo "<RCC>" >>$file
echo "<qresource prefix=\"/\">" >>$file
for i in full $sizes
do
for x in $i/*
do
f=`basename $x`
echo " <file>icons/$i/$f</file>" >>$file
done
done
echo "</qresource>" >>$file
echo "</RCC>" >>$file

137
dist/scripts/verify-icons.sh vendored Executable file
View File

@ -0,0 +1,137 @@
#!/bin/sh
#
# Strawberry Music Player
# Copyright 2019, Jonas Kvinge <jonas@jkvinge.net>
#
# Strawberry is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Strawberry is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
sizes="128x128 64x64 48x48 32x32 22x22"
#
#for i in full/*
#do
# source=$i
# file=`basename $i`
# id=`identify "$i"` || exit 1
# if [ "$id" = "" ] ; then
# echo "ERROR: Cannot determine format and geometry for image: \"$i\"."
# continue
# fi
# g=`echo $id | awk '{print $3}'` || exit 1
# if [ "$g" = "" ] ; then
# echo "ERROR: Cannot determine geometry for image: \"$i\"."
# continue
# fi
# Geometry can be 563x144+0+0 or 75x98
# we need to get rid of the plus (+) and the x characters:
# w=`echo $g | sed 's/[^0-9]/ /g' | awk '{print $1}'` || exit 1
# if [ "$w" = "" ] ; then
# echo "ERROR: Cannot determine width for image: \"$x\"."
# continue
# fi
# h=`echo $g | sed 's/[^0-9]/ /g' | awk '{print $2}'` || exit 1
# if [ "$h" = "" ] ; then
# echo "ERROR: Cannot determine height for image: \"$x\"."
# continue
# fi
# for x in $sizes
# do
# dest="$x/$file"
# if [ -f $dest ]; then
# continue
# fi
# x_w=$(echo $x | cut -d 'x' -f1)
# x_h=$(echo $x | cut -d 'x' -f2)
# if [ "$w" -lt "$x_w" ] || [ "$h" -lt "$x_h" ]; then
# continue
# fi
#echo "convert -verbose -resize $x $source $dest"
#convert -verbose -resize $x $source $dest
# done
#done
for i in $sizes
do
for x in $i/*
do
file=`basename $x`
for y in $sizes
do
if [ "$y" = "$i" ]; then
continue
fi
if ! [ -f "$y/$file" ]; then
echo "Warning: $y/$file does not exist, but $x exists."
fi
done
id=`identify "$x"` || exit 1
if [ "$id" = "" ] ; then
echo "ERROR: Cannot determine format and geometry for image: \"$x\"."
continue
fi
g=`echo $id | awk '{print $3}'` || exit 1
if [ "$g" = "" ] ; then
echo "ERROR: Cannot determine geometry for image: \"$x\"."
continue
fi
# Geometry can be 563x144+0+0 or 75x98
# we need to get rid of the plus (+) and the x characters:
w=`echo $g | sed 's/[^0-9]/ /g' | awk '{print $1}'` || exit 1
if [ "$w" = "" ] ; then
echo "ERROR: Cannot determine width for image: \"$x\"."
continue
fi
h=`echo $g | sed 's/[^0-9]/ /g' | awk '{print $2}'` || exit 1
if [ "$h" = "" ] ; then
echo "ERROR: Cannot determine height for image: \"$x\"."
continue
fi
if ! [ "${h}x${w}" = "$i" ]; then
echo "Warning: $x is not $i, but ${h}x${w}!"
fi
done
done
#file="../icons.qrc"
#rm -rf "$file"
#echo "<RCC>" >>$file
#echo "<qresource prefix=\"/\">" >>$file
#for i in full $sizes
#do
# for x in $i/*
# do
# f=`basename $x`
# echo " <file>icons/$i/$f</file>" >>$file
# done
#done
#echo "</qresource>" >>$file
#echo "</RCC>" >>$file

View File

@ -330,8 +330,8 @@ void CollectionView::contextMenuEvent(QContextMenuEvent *e) {
if (!context_menu_) {
context_menu_ = new QMenu(this);
add_to_playlist_ = context_menu_->addAction(IconLoader::Load("media-play"), tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
load_ = context_menu_->addAction(IconLoader::Load("media-play"), tr("Replace current playlist"), this, SLOT(Load()));
add_to_playlist_ = context_menu_->addAction(IconLoader::Load("media-playback-start"), tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
load_ = context_menu_->addAction(IconLoader::Load("media-playback-start"), tr("Replace current playlist"), this, SLOT(Load()));
open_in_new_playlist_ = context_menu_->addAction(IconLoader::Load("document-new"), tr("Open in new playlist"), this, SLOT(OpenInNewPlaylist()));
context_menu_->addSeparator();

View File

@ -355,8 +355,8 @@ void ContextAlbumsView::contextMenuEvent(QContextMenuEvent *e) {
if (!context_menu_) {
context_menu_ = new QMenu(this);
add_to_playlist_ = context_menu_->addAction(IconLoader::Load("media-play"), tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
load_ = context_menu_->addAction(IconLoader::Load("media-play"), tr("Replace current playlist"), this, SLOT(Load()));
add_to_playlist_ = context_menu_->addAction(IconLoader::Load("media-playback-start"), tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
load_ = context_menu_->addAction(IconLoader::Load("media-playback-start"), tr("Replace current playlist"), this, SLOT(Load()));
open_in_new_playlist_ = context_menu_->addAction(IconLoader::Load("document-new"), tr("Open in new playlist"), this, SLOT(OpenInNewPlaylist()));
context_menu_->addSeparator();

View File

@ -29,6 +29,7 @@
#include <QSettings>
#include "core/logging.h"
#include "iconmapper.h"
#include "settings/appearancesettingspage.h"
#include "iconloader.h"
@ -37,12 +38,10 @@ bool IconLoader::custom_icons_ = false;
void IconLoader::Init() {
// TODO: Fix use system icons option properly.
//QSettings s;
//s.beginGroup(AppearanceSettingsPage::kSettingsGroup);
//system_icons_ = s.value("system_icons", false).toBool();
//s.endGroup();
QSettings s;
s.beginGroup(AppearanceSettingsPage::kSettingsGroup);
system_icons_ = s.value("system_icons", false).toBool();
s.endGroup();
QDir dir;
if (dir.exists(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + "/icons")) {
@ -66,7 +65,17 @@ QIcon IconLoader::Load(const QString &name, const int size) {
else sizes << size;
if (system_icons_) {
IconMapper::IconProperties icon_prop;
if (IconMapper::iconmapper_.contains(name)) {
icon_prop = IconMapper::iconmapper_[name];
}
ret = QIcon::fromTheme(name);
if (ret.isNull()) {
for (QString alt_name : icon_prop.names) {
ret = QIcon::fromTheme(alt_name);
if (!ret.isNull()) break;
}
}
if (!ret.isNull()) return ret;
qLog(Warning) << "Couldn't load icon" << name << "from system theme icons.";
}

135
src/core/iconmapper.h Normal file
View File

@ -0,0 +1,135 @@
/*
* Strawberry Music Player
* Copyright 2019, Jonas Kvinge <jonas@jkvinge.net>
*
* Strawberry is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Strawberry is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "config.h"
#include <QtGlobal>
#include <QMap>
namespace IconMapper {
struct IconProperties {
IconProperties() : min_size(0), max_size(0) {}
IconProperties(const QStringList &_names, const int _min_size, const int _max_size) : names(_names), min_size(_min_size), max_size(_max_size) {}
QStringList names;
int min_size;
int max_size;
};
static const QMap<QString, IconProperties> iconmapper_ = {
{ "albums", { {"media-optical"}, 0, 0 } },
{ "alsa", { {}, 0, 0 } },
{ "application-exit", { {}, 0, 0 } },
{ "applications-internet", { {}, 0, 0 } },
{ "bluetooth", { {}, 0, 0 } },
{ "cdcase", { {"cdcover", "media-optical"}, 0, 0 } },
{ "media-optical", { {"cd"}, 0, 0 } },
{ "configure", { {}, 0, 0 } },
{ "device-ipod-nano", { {}, 0, 0 } },
{ "device-ipod", { {}, 0, 0 } },
{ "device-phone", { {}, 0, 0 } },
{ "device", { {"drive-removable-media-usb-pendrive"}, 0, 0 } },
{ "device-usb-drive", { {}, 0, 0 } },
{ "device-usb-flash", { {}, 0, 0 } },
{ "dialog-error", { {}, 0, 0 } },
{ "dialog-information", { {}, 0, 0 } },
{ "dialog-ok-apply", { {}, 0, 0 } },
{ "dialog-password", { {}, 0, 0 } },
{ "dialog-warning", { {}, 0, 0 } },
{ "document-download", { {}, 0, 0 } },
{ "document-new", { {}, 0, 0 } },
{ "document-open-folder", { {}, 0, 0 } },
{ "document-open", { {}, 0, 0 } },
{ "document-save", { {}, 0, 0 } },
{ "document-search", { {}, 0, 0 } },
{ "download", { {}, 0, 0 } },
{ "edit-clear-list", { {}, 0, 0 } },
{ "edit-clear-locationbar-ltr", { {}, 0, 0 } },
{ "edit-copy", { {}, 0, 0 } },
{ "edit-delete", { {}, 0, 0 } },
{ "edit-find", { {}, 0, 0 } },
{ "edit-redo", { {}, 0, 0 } },
{ "edit-rename", { {}, 0, 0 } },
{ "edit-undo", { {}, 0, 0 } },
{ "electrocompaniet", { {}, 0, 0 } },
{ "equalizer", { {}, 0, 0 } },
{ "folder-new", { {}, 0, 0 } },
{ "folder", { {}, 0, 0 } },
{ "folder-sound", { {"folder-music"}, 0, 0 } },
{ "footsteps", { {}, 0, 0 } },
{ "go-down", { {}, 0, 0 } },
{ "go-home", { {}, 0, 0 } },
{ "go-jump", { {}, 0, 0 } },
{ "go-next", { {}, 0, 0 } },
{ "go-previous", { {}, 0, 0 } },
{ "go-up", { {}, 0, 0 } },
{ "gstreamer", { {}, 0, 0 } },
{ "headset", { {}, 0, 0 } },
{ "help-hint", { {}, 0, 0 } },
{ "intel", { {}, 0, 0 } },
{ "jack", { {}, 0, 0 } },
{ "keyboard", { {}, 0, 0 } },
{ "list-add", { {}, 0, 0 } },
{ "list-remove", { {}, 0, 0 } },
{ "love", { {"heart", "emblem-favorite"}, 0, 0 } },
{ "mcintosh-player", { {}, 0, 0 } },
{ "mcintosh", { {}, 0, 0 } },
{ "mcintosh-text", { {}, 0, 0 } },
{ "media-eject", { {}, 0, 0 } },
{ "media-playback-pause", { {"media-pause"}, 0, 0 } },
{ "media-playlist-repeat", { {}, 0, 0 } },
{ "media-playlist-shuffle", { {""}, 0, 0 } },
{ "media-playback-start", { {"media-play", "media-playback-playing"}, 0, 0 } },
{ "media-seek-backward", { {}, 0, 0 } },
{ "media-seek-forward", { {}, 0, 0 } },
{ "media-skip-backward", { {}, 0, 0 } },
{ "media-skip-forward", { {}, 0, 0 } },
{ "media-playback-stop", { {"media-stop"}, 0, 0 } },
{ "moodbar", { {"preferences-desktop-icons"}, 0, 0 } },
{ "nvidia", { {}, 0, 0 } },
{ "pulseaudio", { {}, 0, 0 } },
{ "qobuz", { {}, 0, 0 } },
{ "realtek", { {}, 0, 0 } },
{ "scrobble-disabled", { {}, 0, 0 } },
{ "scrobble", { {}, 0, 0 } },
{ "search", { {}, 0, 0 } },
{ "soundcard", { {"audiocard", "audio-card"}, 0, 0 } },
{ "speaker", { {}, 0, 0 } },
{ "star-grey", { {}, 0, 0 } },
{ "star", { {}, 0, 0 } },
{ "strawberry", { {}, 0, 0 } },
{ "subsonic", { {}, 0, 0 } },
{ "tidal", { {}, 0, 0 } },
{ "tools-wizard", { {}, 0, 0 } },
{ "view-choose", { {}, 0, 0 } },
{ "view-fullscreen", { {}, 0, 0 } },
{ "view-media-lyrics", { {}, 0, 0 } },
{ "view-media-playlist", { {}, 0, 0 } },
{ "view-media-visualization", { {"preferences-desktop-theme"}, 0, 0 } },
{ "view-refresh", { {}, 0, 0 } },
{ "library-music", { {"vinyl"}, 0, 0 } },
{ "vlc", { {}, 0, 0 } },
{ "xine", { {}, 0, 0 } },
{ "zoom-in", { {}, 0, 0 } },
{ "zoom-out", { {}, 0, 0 } }
};
} // namespace

View File

@ -273,7 +273,7 @@ MainWindow::MainWindow(Application *app, SystemTrayIcon *tray_icon, OSD *osd, co
// Add tabs to the fancy tab widget
ui_->tabs->AddTab(context_view_, "context", IconLoader::Load("strawberry"), tr("Context"));
ui_->tabs->AddTab(collection_view_, "collection", IconLoader::Load("vinyl"), tr("Collection"));
ui_->tabs->AddTab(collection_view_, "collection", IconLoader::Load("library-music"), tr("Collection"));
ui_->tabs->AddTab(file_view_, "files", IconLoader::Load("document-open"), tr("Files"));
ui_->tabs->AddTab(playlist_list_, "playlists", IconLoader::Load("view-media-playlist"), tr("Playlists"));
ui_->tabs->AddTab(queue_view_, "queue", IconLoader::Load("footsteps"), tr("Queue"));
@ -346,11 +346,11 @@ MainWindow::MainWindow(Application *app, SystemTrayIcon *tray_icon, OSD *osd, co
// Music menu
ui_->action_open_file->setIcon(IconLoader::Load("document-open"));
ui_->action_open_cd->setIcon(IconLoader::Load("cd"));
ui_->action_open_cd->setIcon(IconLoader::Load("media-optical"));
ui_->action_previous_track->setIcon(IconLoader::Load("media-skip-backward"));
ui_->action_play_pause->setIcon(IconLoader::Load("media-play"));
ui_->action_stop->setIcon(IconLoader::Load("media-stop"));
ui_->action_stop_after_this_track->setIcon(IconLoader::Load("media-stop"));
ui_->action_play_pause->setIcon(IconLoader::Load("media-playback-start"));
ui_->action_stop->setIcon(IconLoader::Load("media-playback-stop"));
ui_->action_stop_after_this_track->setIcon(IconLoader::Load("media-playback-stop"));
ui_->action_next_track->setIcon(IconLoader::Load("media-skip-forward"));
ui_->action_quit->setIcon(IconLoader::Load("application-exit"));
@ -594,7 +594,7 @@ MainWindow::MainWindow(Application *app, SystemTrayIcon *tray_icon, OSD *osd, co
connect(playlist_menu_, SIGNAL(aboutToHide()), SLOT(PlaylistMenuHidden()));
playlist_play_pause_ = playlist_menu_->addAction(tr("Play"), this, SLOT(PlaylistPlay()));
playlist_menu_->addAction(ui_->action_stop);
playlist_stop_after_ = playlist_menu_->addAction(IconLoader::Load("media-stop"), tr("Stop after this track"), this, SLOT(PlaylistStopAfter()));
playlist_stop_after_ = playlist_menu_->addAction(IconLoader::Load("media-playback-stop"), tr("Stop after this track"), this, SLOT(PlaylistStopAfter()));
playlist_queue_ = playlist_menu_->addAction(IconLoader::Load("go-next"), tr("Toggle queue status"), this, SLOT(PlaylistQueue()));
playlist_queue_->setShortcut(QKeySequence("Ctrl+D"));
ui_->playlist->addAction(playlist_queue_);
@ -1040,7 +1040,7 @@ void MainWindow::MediaStopped() {
ui_->action_stop->setEnabled(false);
ui_->action_stop_after_this_track->setEnabled(false);
ui_->action_play_pause->setIcon(IconLoader::Load("media-play"));
ui_->action_play_pause->setIcon(IconLoader::Load("media-playback-start"));
ui_->action_play_pause->setText(tr("Play"));
ui_->action_play_pause->setEnabled(true);
@ -1069,7 +1069,7 @@ void MainWindow::MediaPaused() {
ui_->action_stop->setEnabled(true);
ui_->action_stop_after_this_track->setEnabled(true);
ui_->action_play_pause->setIcon(IconLoader::Load("media-play"));
ui_->action_play_pause->setIcon(IconLoader::Load("media-playback-start"));
ui_->action_play_pause->setText(tr("Play"));
ui_->action_play_pause->setEnabled(true);
@ -1087,7 +1087,7 @@ void MainWindow::MediaPlaying() {
ui_->action_stop->setEnabled(true);
ui_->action_stop_after_this_track->setEnabled(true);
ui_->action_play_pause->setIcon(IconLoader::Load("media-pause"));
ui_->action_play_pause->setIcon(IconLoader::Load("media-playback-pause"));
ui_->action_play_pause->setText(tr("Pause"));
bool enable_play_pause(false);
@ -1527,11 +1527,11 @@ void MainWindow::PlaylistRightClick(const QPoint &global_pos, const QModelIndex
// Is this song currently playing?
if (app_->playlist_manager()->current()->current_row() == source_index.row() && app_->player()->GetState() == Engine::Playing) {
playlist_play_pause_->setText(tr("Pause"));
playlist_play_pause_->setIcon(IconLoader::Load("media-pause"));
playlist_play_pause_->setIcon(IconLoader::Load("media-playback-pause"));
}
else {
playlist_play_pause_->setText(tr("Play"));
playlist_play_pause_->setIcon(IconLoader::Load("media-play"));
playlist_play_pause_->setIcon(IconLoader::Load("media-playback-start"));
}
// Are we allowed to pause?
@ -1644,7 +1644,7 @@ void MainWindow::PlaylistRightClick(const QPoint &global_pos, const QModelIndex
else playlist_queue_->setIcon(IconLoader::Load("go-next"));
if (in_skipped < selected) playlist_skip_->setIcon(IconLoader::Load("media-skip-forward"));
else playlist_skip_->setIcon(IconLoader::Load("media-play"));
else playlist_skip_->setIcon(IconLoader::Load("media-playback-start"));
if (!index.isValid()) {

View File

@ -190,7 +190,7 @@ void QtSystemTrayIcon::SetPaused() {
action_stop_->setEnabled(true);
action_stop_after_this_track_->setEnabled(true);
action_play_pause_->setIcon(IconLoader::Load("media-play"));
action_play_pause_->setIcon(IconLoader::Load("media-playback-start"));
action_play_pause_->setText(tr("Play"));
action_play_pause_->setEnabled(true);
@ -203,7 +203,7 @@ void QtSystemTrayIcon::SetPlaying(bool enable_play_pause) {
action_stop_->setEnabled(true);
action_stop_after_this_track_->setEnabled(true);
action_play_pause_->setIcon(IconLoader::Load("media-pause"));
action_play_pause_->setIcon(IconLoader::Load("media-playback-pause"));
action_play_pause_->setText(tr("Pause"));
action_play_pause_->setEnabled(enable_play_pause);
@ -215,7 +215,7 @@ void QtSystemTrayIcon::SetStopped() {
action_stop_->setEnabled(false);
action_stop_after_this_track_->setEnabled(false);
action_play_pause_->setIcon(IconLoader::Load("media-play"));
action_play_pause_->setIcon(IconLoader::Load("media-playback-start"));
action_play_pause_->setText(tr("Play"));
action_play_pause_->setEnabled(true);

View File

@ -489,8 +489,8 @@ QIcon Song::IconForSource(Source source) {
switch (source) {
case Song::Source_LocalFile: return IconLoader::Load("folder-sound");
case Song::Source_Collection: return IconLoader::Load("vinyl");
case Song::Source_CDDA: return IconLoader::Load("cd");
case Song::Source_Collection: return IconLoader::Load("library-music");
case Song::Source_CDDA: return IconLoader::Load("media-optical");
case Song::Source_Device: return IconLoader::Load("device");
case Song::Source_Stream: return IconLoader::Load("applications-internet");
case Song::Source_Tidal: return IconLoader::Load("tidal");

View File

@ -95,8 +95,8 @@ AlbumCoverManager::AlbumCoverManager(Application *app, CollectionBackend *collec
cover_searcher_(nullptr),
cover_export_(nullptr),
cover_exporter_(new AlbumCoverExporter(this)),
artist_icon_(IconLoader::Load("folder-sound" )),
all_artists_icon_(IconLoader::Load("vinyl" )),
artist_icon_(IconLoader::Load("folder-sound")),
all_artists_icon_(IconLoader::Load("library-music")),
no_cover_icon_(":/pictures/cdcase.png"),
no_cover_image_(GenerateNoCoverImage(no_cover_icon_)),
no_cover_item_icon_(QPixmap::fromImage(no_cover_image_)),
@ -110,12 +110,12 @@ AlbumCoverManager::AlbumCoverManager(Application *app, CollectionBackend *collec
ui_->albums->set_cover_manager(this);
// Icons
ui_->action_fetch->setIcon(IconLoader::Load("download" ));
ui_->export_covers->setIcon(IconLoader::Load("document-save" ));
ui_->view->setIcon(IconLoader::Load("view-choose" ));
ui_->button_fetch->setIcon(IconLoader::Load("download" ));
ui_->action_add_to_playlist->setIcon(IconLoader::Load("media-play" ));
ui_->action_load->setIcon(IconLoader::Load("media-play" ));
ui_->action_fetch->setIcon(IconLoader::Load("download"));
ui_->export_covers->setIcon(IconLoader::Load("document-save"));
ui_->view->setIcon(IconLoader::Load("view-choose"));
ui_->button_fetch->setIcon(IconLoader::Load("download"));
ui_->action_add_to_playlist->setIcon(IconLoader::Load("media-playback-start"));
ui_->action_load->setIcon(IconLoader::Load("media-playback-start"));
album_cover_choice_controller_->Init(app_);

View File

@ -41,7 +41,7 @@ QStringList CddaLister::DeviceUniqueIDs() { return devices_list_; }
QVariantList CddaLister::DeviceIcons(const QString &) {
QVariantList icons;
icons << QString("cd");
icons << QString("media-optical");
return icons;
}

View File

@ -97,7 +97,7 @@ void DeviceProperties::ShowDevice(QModelIndex idx) {
<< "device"
<< "device-usb-drive"
<< "device-usb-flash"
<< "cd"
<< "media-optical"
<< "device-ipod"
<< "device-ipod-nano"
<< "device-phone";

View File

@ -225,8 +225,8 @@ void DeviceView::contextMenuEvent(QContextMenuEvent *e) {
properties_action_ = device_menu_->addAction(IconLoader::Load("configure"), tr("Device properties..."), this, SLOT(Properties()));
// Collection menu
add_to_playlist_action_ = collection_menu_->addAction(IconLoader::Load("media-play"), tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
load_action_ = collection_menu_->addAction(IconLoader::Load("media-play"), tr("Replace current playlist"), this, SLOT(Load()));
add_to_playlist_action_ = collection_menu_->addAction(IconLoader::Load("media-playback-start"), tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
load_action_ = collection_menu_->addAction(IconLoader::Load("media-playback-start"), tr("Replace current playlist"), this, SLOT(Load()));
open_in_new_playlist_ = collection_menu_->addAction(IconLoader::Load("document-new"), tr("Open in new playlist"), this, SLOT(OpenInNewPlaylist()));
collection_menu_->addSeparator();

View File

@ -755,7 +755,7 @@ QVariantList MacOsDeviceLister::DeviceIcons(const QString& serial) {
}
if (IsCDDevice(serial)) {
return QVariantList() << "cd";
return QVariantList() << "media-optical";
}
QString bsd_name = current_devices_[serial];

View File

@ -299,8 +299,8 @@ void InternetCollectionView::contextMenuEvent(QContextMenuEvent *e) {
if (!context_menu_) {
context_menu_ = new QMenu(this);
add_to_playlist_ = context_menu_->addAction(IconLoader::Load("media-play"), tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
load_ = context_menu_->addAction(IconLoader::Load("media-play"), tr("Replace current playlist"), this, SLOT(Load()));
add_to_playlist_ = context_menu_->addAction(IconLoader::Load("media-playback-start"), tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
load_ = context_menu_->addAction(IconLoader::Load("media-playback-start"), tr("Replace current playlist"), this, SLOT(Load()));
open_in_new_playlist_ = context_menu_->addAction(IconLoader::Load("document-new"), tr("Open in new playlist"), this, SLOT(OpenInNewPlaylist()));
context_menu_->addSeparator();

View File

@ -430,8 +430,8 @@ bool InternetSearchView::SearchKeyEvent(QKeyEvent *event) {
bool InternetSearchView::ResultsContextMenuEvent(QContextMenuEvent *event) {
context_menu_ = new QMenu(this);
context_actions_ << context_menu_->addAction( IconLoader::Load("media-play"), tr("Append to current playlist"), this, SLOT(AddSelectedToPlaylist()));
context_actions_ << context_menu_->addAction( IconLoader::Load("media-play"), tr("Replace current playlist"), this, SLOT(LoadSelected()));
context_actions_ << context_menu_->addAction( IconLoader::Load("media-playback-start"), tr("Append to current playlist"), this, SLOT(AddSelectedToPlaylist()));
context_actions_ << context_menu_->addAction( IconLoader::Load("media-playback-start"), tr("Replace current playlist"), this, SLOT(LoadSelected()));
context_actions_ << context_menu_->addAction( IconLoader::Load("document-new"), tr("Open in new playlist"), this, SLOT(OpenSelectedInNewPlaylist()));
context_menu_->addSeparator();

View File

@ -110,8 +110,6 @@ AppearanceSettingsPage::AppearanceSettingsPage(SettingsDialog *dialog)
connect(ui_->select_tabbar_color, SIGNAL(pressed()), SLOT(TabBarSelectBGColor()));
connect(ui_->tabbar_system_color, SIGNAL(toggled(bool)), SLOT(TabBarSystemColor(bool)));
ui_->checkbox_system_icons->hide();
Load();
}

View File

@ -54,7 +54,7 @@ CollectionSettingsPage::CollectionSettingsPage(SettingsDialog *dialog)
ui_->list->setItemDelegate(new NativeSeparatorsDelegate(this));
// Icons
setWindowIcon(IconLoader::Load("vinyl"));
setWindowIcon(IconLoader::Load("library-music"));
ui_->add->setIcon(IconLoader::Load("document-open-folder"));
connect(ui_->add, SIGNAL(clicked()), SLOT(Add()));

View File

@ -40,8 +40,8 @@ FileViewList::FileViewList(QWidget *parent)
menu_(new QMenu(this))
{
menu_->addAction(IconLoader::Load("media-play"), tr("Append to current playlist"), this, SLOT(AddToPlaylistSlot()));
menu_->addAction(IconLoader::Load("media-play"), tr("Replace current playlist"), this, SLOT(LoadSlot()));
menu_->addAction(IconLoader::Load("media-playback-start"), tr("Append to current playlist"), this, SLOT(AddToPlaylistSlot()));
menu_->addAction(IconLoader::Load("media-playback-start"), tr("Replace current playlist"), this, SLOT(LoadSlot()));
menu_->addAction(IconLoader::Load("document-new"), tr("Open in new playlist"), this, SLOT(OpenInNewPlaylistSlot()));
menu_->addSeparator();
menu_->addAction(IconLoader::Load("edit-copy"), tr("Copy to collection..."), this, SLOT(CopyToCollectionSlot()));