Always use monochrome sidebar icons
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
4. Use SQLite for Jamendo and Magnatune libraries.
|
||||
5. Rename Online view to Internet.
|
||||
6. Place Streams view within Internet.
|
||||
7. Place stored playlists and dynamic playlists within Playlists.
|
||||
8. Remove option for non-mono sidebar icons.
|
||||
.....
|
||||
|
||||
1. If connected to MPD>=0.19 using address 127.0.0.1 or localhost, then pass
|
||||
|
||||
@@ -281,11 +281,9 @@ InterfaceSettings::InterfaceSettings(QWidget *p)
|
||||
viewsLayout->addWidget(otherViewGroupBox, 0, 1, 3, 1);
|
||||
viewsLayout->addItem(new QSpacerItem(0, 2, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2, 1, 1);
|
||||
styleLayout->removeWidget(sbIconsOnly);
|
||||
styleLayout->removeWidget(sbMonoIcons);
|
||||
styleLayout->removeWidget(sbAutoHide);
|
||||
QVBoxLayout *sbOther = new QVBoxLayout();
|
||||
sbOther->addWidget(sbIconsOnly);
|
||||
sbOther->addWidget(sbMonoIcons);
|
||||
sbOther->addWidget(sbAutoHide);
|
||||
sbLayout->addItem(new QSpacerItem(Utils::layoutSpacing(this)*8, 2, QSizePolicy::Fixed, QSizePolicy::Fixed));
|
||||
sbLayout->addLayout(sbOther);
|
||||
@@ -377,7 +375,6 @@ void InterfaceSettings::load()
|
||||
selectEntry(sbStyle, sidebar&FancyTabWidget::Style_Mask);
|
||||
selectEntry(sbPosition, sidebar&FancyTabWidget::Position_Mask);
|
||||
sbIconsOnly->setChecked(sidebar&FancyTabWidget::IconOnly);
|
||||
sbMonoIcons->setChecked(Settings::self()->monoSidebarIcons());
|
||||
sbAutoHide->setChecked(Settings::self()->splitterAutoHide());
|
||||
sbAutoHideChanged();
|
||||
viewItemChanged(views->item(0));
|
||||
@@ -472,7 +469,6 @@ void InterfaceSettings::save()
|
||||
sidebar|=FancyTabWidget::IconOnly;
|
||||
}
|
||||
Settings::self()->saveSidebar(sidebar);
|
||||
Settings::self()->saveMonoSidebarIcons(sbMonoIcons->isChecked());
|
||||
Settings::self()->saveSplitterAutoHide(sbAutoHide->isChecked());
|
||||
}
|
||||
|
||||
|
||||
@@ -110,13 +110,6 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="sbMonoIcons">
|
||||
<property name="text">
|
||||
<string>Use monochrome icons</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="sbAutoHide">
|
||||
<property name="text">
|
||||
<string>Auto-hide</string>
|
||||
|
||||
@@ -1472,7 +1472,6 @@ void MainWindow::readSettings()
|
||||
searchPlayQueueAction->setVisible(Settings::self()->playQueueSearch());
|
||||
nowPlaying->readConfig();
|
||||
setCollapsedSize();
|
||||
toggleMonoIcons();
|
||||
toggleSplitterAutoHide();
|
||||
if (contextSwitchTime!=Settings::self()->contextSwitchTime()) {
|
||||
contextSwitchTime=Settings::self()->contextSwitchTime();
|
||||
@@ -2189,33 +2188,6 @@ void MainWindow::toggleSplitterAutoHide()
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::toggleMonoIcons()
|
||||
{
|
||||
if (Settings::self()->monoSidebarIcons()!=Icons::self()->monoSidebarIcons()) {
|
||||
Icons::self()->initSidebarIcons();
|
||||
showPlayQueueAction->setIcon(Icons::self()->playqueueIcon);
|
||||
tabWidget->setIcon(PAGE_PLAYQUEUE, showPlayQueueAction->icon());
|
||||
libraryTabAction->setIcon(Icons::self()->libraryIcon);
|
||||
tabWidget->setIcon(PAGE_LIBRARY, libraryTabAction->icon());
|
||||
foldersTabAction->setIcon(Icons::self()->foldersIcon);
|
||||
tabWidget->setIcon(PAGE_FOLDERS, foldersTabAction->icon());
|
||||
playlistsTabAction->setIcon(Icons::self()->playlistsIcon);
|
||||
tabWidget->setIcon(PAGE_PLAYLISTS, playlistsTabAction->icon());
|
||||
#ifdef ENABLE_ONLINE_SERVICES
|
||||
onlineTabAction->setIcon(Icons::self()->onlineIcon);
|
||||
tabWidget->setIcon(PAGE_ONLINE, onlineTabAction->icon());
|
||||
#endif
|
||||
tabWidget->setIcon(PAGE_CONTEXT, Icons::self()->infoSidebarIcon);
|
||||
#ifdef ENABLE_DEVICES_SUPPORT
|
||||
devicesTabAction->setIcon(Icons::self()->devicesIcon);
|
||||
tabWidget->setIcon(PAGE_DEVICES, devicesTabAction->icon());
|
||||
#endif
|
||||
searchTabAction->setIcon(Icons::self()->searchTabIcon);
|
||||
tabWidget->setIcon(PAGE_SEARCH, searchTabAction->icon());
|
||||
tabWidget->recreate();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::locateTracks(const QList<Song> &songs)
|
||||
{
|
||||
if (!songs.isEmpty() && tabWidget->isEnabled(PAGE_LIBRARY)) {
|
||||
|
||||
@@ -227,7 +227,6 @@ public Q_SLOTS:
|
||||
}
|
||||
void showSearchTab() { showTab(PAGE_SEARCH); }
|
||||
void toggleSplitterAutoHide();
|
||||
void toggleMonoIcons();
|
||||
void locateTracks(const QList<Song> &songs);
|
||||
void locateTrack() { locateTracks(playQueue->selectedSongs()); }
|
||||
void locateArtist(const QString &artist);
|
||||
|
||||
@@ -671,15 +671,6 @@ bool Settings::startHidden()
|
||||
return cfg.get("startHidden", false);
|
||||
}
|
||||
|
||||
bool Settings::monoSidebarIcons()
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
return cfg.get("monoSidebarIcons", false);
|
||||
#else
|
||||
return cfg.get("monoSidebarIcons", true);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool Settings::showTimeRemaining()
|
||||
{
|
||||
return cfg.get("showTimeRemaining", false);
|
||||
@@ -1278,11 +1269,6 @@ void Settings::saveStartHidden(bool v)
|
||||
cfg.set("startHidden", v);
|
||||
}
|
||||
|
||||
void Settings::saveMonoSidebarIcons(bool v)
|
||||
{
|
||||
cfg.set("monoSidebarIcons", v);
|
||||
}
|
||||
|
||||
void Settings::saveShowTimeRemaining(bool v)
|
||||
{
|
||||
cfg.set("showTimeRemaining", v);
|
||||
|
||||
@@ -145,7 +145,6 @@ public:
|
||||
#endif
|
||||
bool forceSingleClick();
|
||||
bool startHidden();
|
||||
bool monoSidebarIcons();
|
||||
bool showTimeRemaining();
|
||||
QStringList hiddenStreamCategories();
|
||||
QStringList hiddenOnlineProviders();
|
||||
@@ -267,7 +266,6 @@ public:
|
||||
#endif
|
||||
void saveForceSingleClick(bool v);
|
||||
void saveStartHidden(bool v);
|
||||
void saveMonoSidebarIcons(bool v);
|
||||
void saveShowTimeRemaining(bool v);
|
||||
void saveHiddenStreamCategories(const QStringList &v);
|
||||
void saveHiddenOnlineProviders(const QStringList &v);
|
||||
|
||||
@@ -474,55 +474,27 @@ Icons::Icons()
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool monoSb=true;
|
||||
bool Icons::monoSidebarIcons()
|
||||
{
|
||||
return monoSb;
|
||||
}
|
||||
|
||||
void Icons::initSidebarIcons()
|
||||
{
|
||||
if (Settings::self()->monoSidebarIcons()) {
|
||||
monoSb=true;
|
||||
#ifdef Q_OS_MAC
|
||||
QColor textCol=OSXStyle::self()->monoIconColor();
|
||||
QColor highlightedTexCol=OSXStyle::self()->viewPalette().highlightedText().color();
|
||||
#else
|
||||
QColor textCol=QApplication::palette().color(QPalette::Active, QPalette::WindowText);
|
||||
QColor highlightedTexCol=QApplication::palette().color(QPalette::Active, QPalette::HighlightedText);
|
||||
#endif
|
||||
playqueueIcon=loadSidebarIcon(QLatin1String("playqueue"), textCol, highlightedTexCol);
|
||||
libraryIcon=loadSidebarIcon(QLatin1String("library"), textCol, highlightedTexCol);
|
||||
foldersIcon=loadSidebarIcon(QLatin1String("folders"), textCol, highlightedTexCol);
|
||||
playlistsIcon=loadSidebarIcon(QLatin1String("playlists"), textCol, highlightedTexCol);
|
||||
#ifdef ENABLE_ONLINE_SERVICES
|
||||
onlineIcon=loadSidebarIcon(QLatin1String("online"), textCol, highlightedTexCol);
|
||||
#endif
|
||||
infoSidebarIcon=loadSidebarIcon(QLatin1String("info"), textCol, highlightedTexCol);
|
||||
#ifdef ENABLE_DEVICES_SUPPORT
|
||||
devicesIcon=loadSidebarIcon(QLatin1String("devices"), textCol, highlightedTexCol);
|
||||
#endif
|
||||
searchTabIcon=loadSidebarIcon(QLatin1String("search"), textCol, highlightedTexCol);
|
||||
} else {
|
||||
monoSb=false;
|
||||
playqueueIcon=Icon("media-playback-start");
|
||||
libraryIcon=audioFileIcon;
|
||||
foldersIcon=Icon("inode-directory");
|
||||
playlistsIcon=playlistIcon;
|
||||
#ifdef ENABLE_ONLINE_SERVICES
|
||||
onlineIcon=Icon("applications-internet");
|
||||
#endif
|
||||
if (QLatin1String("gnome")==Icon::currentTheme().toLower()) {
|
||||
QColor col=QApplication::palette().color(QPalette::Active, QPalette::WindowText);
|
||||
infoSidebarIcon=loadSidebarIcon("info", col, col);
|
||||
} else {
|
||||
infoSidebarIcon=Icon("dialog-information");
|
||||
}
|
||||
#ifdef ENABLE_DEVICES_SUPPORT
|
||||
devicesIcon=Icon("multimedia-player");
|
||||
#endif
|
||||
searchTabIcon=searchIcon;
|
||||
}
|
||||
#ifdef Q_OS_MAC
|
||||
QColor textCol=OSXStyle::self()->monoIconColor();
|
||||
QColor highlightedTexCol=OSXStyle::self()->viewPalette().highlightedText().color();
|
||||
#else
|
||||
QColor textCol=QApplication::palette().color(QPalette::Active, QPalette::WindowText);
|
||||
QColor highlightedTexCol=QApplication::palette().color(QPalette::Active, QPalette::HighlightedText);
|
||||
#endif
|
||||
playqueueIcon=loadSidebarIcon(QLatin1String("playqueue"), textCol, highlightedTexCol);
|
||||
libraryIcon=loadSidebarIcon(QLatin1String("library"), textCol, highlightedTexCol);
|
||||
foldersIcon=loadSidebarIcon(QLatin1String("folders"), textCol, highlightedTexCol);
|
||||
playlistsIcon=loadSidebarIcon(QLatin1String("playlists"), textCol, highlightedTexCol);
|
||||
#ifdef ENABLE_ONLINE_SERVICES
|
||||
onlineIcon=loadSidebarIcon(QLatin1String("online"), textCol, highlightedTexCol);
|
||||
#endif
|
||||
infoSidebarIcon=loadSidebarIcon(QLatin1String("info"), textCol, highlightedTexCol);
|
||||
#ifdef ENABLE_DEVICES_SUPPORT
|
||||
devicesIcon=loadSidebarIcon(QLatin1String("devices"), textCol, highlightedTexCol);
|
||||
#endif
|
||||
searchTabIcon=loadSidebarIcon(QLatin1String("search"), textCol, highlightedTexCol);
|
||||
}
|
||||
|
||||
void Icons::initToolbarIcons(const QColor &toolbarText)
|
||||
|
||||
@@ -35,7 +35,6 @@ public:
|
||||
static Icons *self();
|
||||
|
||||
Icons();
|
||||
bool monoSidebarIcons();
|
||||
void initSidebarIcons();
|
||||
void initToolbarIcons(const QColor &toolbarText);
|
||||
#ifndef ENABLE_KDE_SUPPORT
|
||||
|
||||
Reference in New Issue
Block a user