From 21ccb8cd05a5bd1c3ca7114cd065bf679b9ba859 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Thu, 24 Dec 2020 13:16:47 +0100 Subject: [PATCH 1/3] Preferences: refactor addPageWidget(), include createIcons() --- src/controllers/dlgprefcontrollers.cpp | 54 ++-- src/controllers/dlgprefcontrollers.h | 8 +- src/preferences/dialog/dlgpreferences.cpp | 334 ++++++++++------------ src/preferences/dialog/dlgpreferences.h | 16 +- 4 files changed, 190 insertions(+), 222 deletions(-) diff --git a/src/controllers/dlgprefcontrollers.cpp b/src/controllers/dlgprefcontrollers.cpp index c734944bad6..22000c9087a 100644 --- a/src/controllers/dlgprefcontrollers.cpp +++ b/src/controllers/dlgprefcontrollers.cpp @@ -10,20 +10,22 @@ #include "preferences/dialog/dlgpreferences.h" DlgPrefControllers::DlgPrefControllers(DlgPreferences* pPreferences, - UserSettingsPointer pConfig, - ControllerManager* pControllerManager, - QTreeWidgetItem* pControllerTreeItem) + UserSettingsPointer pConfig, + ControllerManager* pControllerManager, + QTreeWidgetItem* pControllersRootItem) : DlgPreferencePage(pPreferences), m_pDlgPreferences(pPreferences), m_pConfig(pConfig), m_pControllerManager(pControllerManager), - m_pControllerTreeItem(pControllerTreeItem) { + m_pControllersRootItem(pControllersRootItem) { setupUi(this); setupControllerWidgets(); const QString presetsPath = userPresetsPath(m_pConfig); - connect(btnOpenUserPresets, &QPushButton::clicked, - this, [this, presetsPath] { slotOpenLocalFile(presetsPath); }); + connect(btnOpenUserPresets, + &QPushButton::clicked, + this, + [this, presetsPath] { slotOpenLocalFile(presetsPath); }); // Connections connect(m_pControllerManager, @@ -76,7 +78,7 @@ bool DlgPrefControllers::handleTreeItemClick(QTreeWidgetItem* clickedItem) { m_pDlgPreferences->switchToPage(controllerWidget); } return true; - } else if (clickedItem == m_pControllerTreeItem) { + } else if (clickedItem == m_pControllersRootItem) { // Switch to the root page and expand the controllers tree item. m_pDlgPreferences->expandTreeItem(clickedItem); m_pDlgPreferences->switchToPage(this); @@ -98,9 +100,9 @@ void DlgPrefControllers::destroyControllerWidgets() { } m_controllerTreeItems.clear(); - while(m_pControllerTreeItem->childCount() > 0) { - QTreeWidgetItem* controllerWindowLink = m_pControllerTreeItem->takeChild(0); - delete controllerWindowLink; + while (m_pControllersRootItem->childCount() > 0) { + QTreeWidgetItem* controllerTreeItem = m_pControllersRootItem->takeChild(0); + delete controllerTreeItem; } } @@ -109,11 +111,12 @@ void DlgPrefControllers::setupControllerWidgets() { // treepane on the left. QList controllerList = m_pControllerManager->getControllerList(false, true); + std::sort(controllerList.begin(), controllerList.end(), controllerCompare); foreach (Controller* pController, controllerList) { DlgPrefController* controllerDlg = new DlgPrefController( - this, pController, m_pControllerManager, m_pConfig); + this, pController, m_pControllerManager, m_pConfig); connect(controllerDlg, &DlgPrefController::mappingStarted, m_pDlgPreferences, @@ -124,7 +127,6 @@ void DlgPrefControllers::setupControllerWidgets() { &DlgPreferences::show); m_controllerWindows.append(controllerDlg); - m_pDlgPreferences->addPageWidget(controllerDlg); connect(pController, &Controller::openChanged, @@ -132,23 +134,23 @@ void DlgPrefControllers::setupControllerWidgets() { slotHighlightDevice(controllerDlg, bOpen); }); - QTreeWidgetItem * controllerWindowLink = new QTreeWidgetItem(QTreeWidgetItem::Type); - controllerWindowLink->setIcon(0, QIcon(":/images/preferences/ic_preferences_controllers.png")); - QString curDeviceName = pController->getName(); - controllerWindowLink->setText(0, curDeviceName); - controllerWindowLink->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); - controllerWindowLink->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - m_pControllerTreeItem->addChild(controllerWindowLink); - m_controllerTreeItems.append(controllerWindowLink); - - // Set the font correctly - QFont temp = controllerWindowLink->font(0); + QTreeWidgetItem* controllerTreeItem = new QTreeWidgetItem( + QTreeWidgetItem::Type); + m_pDlgPreferences->addPageWidget(controllerDlg, + controllerTreeItem, + pController->getName(), + "controllers.svg"); + + m_pControllersRootItem->addChild(controllerTreeItem); + m_controllerTreeItems.append(controllerTreeItem); + + // If controller is open make controller label bold + QFont temp = controllerTreeItem->font(0); temp.setBold(pController->isOpen()); - controllerWindowLink->setFont(0, temp); + controllerTreeItem->setFont(0, temp); } - // If no controllers are available, show the "No controllers available" - // message. + // If no controllers are available, show the "No controllers available" message. txtNoControllersAvailable->setVisible(controllerList.empty()); } diff --git a/src/controllers/dlgprefcontrollers.h b/src/controllers/dlgprefcontrollers.h index 82f1530e808..3126ea9c12f 100644 --- a/src/controllers/dlgprefcontrollers.h +++ b/src/controllers/dlgprefcontrollers.h @@ -18,9 +18,9 @@ class DlgPrefControllers : public DlgPreferencePage, public Ui::DlgPrefControlle Q_OBJECT public: DlgPrefControllers(DlgPreferences* pDlgPreferences, - UserSettingsPointer pConfig, - ControllerManager* pControllerManager, - QTreeWidgetItem* pControllerTreeItem); + UserSettingsPointer pConfig, + ControllerManager* pControllerManager, + QTreeWidgetItem* pControllersRootItem); virtual ~DlgPrefControllers(); bool handleTreeItemClick(QTreeWidgetItem* clickedItem); @@ -48,7 +48,7 @@ class DlgPrefControllers : public DlgPreferencePage, public Ui::DlgPrefControlle DlgPreferences* m_pDlgPreferences; UserSettingsPointer m_pConfig; ControllerManager* m_pControllerManager; - QTreeWidgetItem* m_pControllerTreeItem; + QTreeWidgetItem* m_pControllersRootItem; QList m_controllerWindows; QList m_controllerTreeItems; }; diff --git a/src/preferences/dialog/dlgpreferences.cpp b/src/preferences/dialog/dlgpreferences.cpp index 8297f500d4d..3872e2bd8a3 100644 --- a/src/preferences/dialog/dlgpreferences.cpp +++ b/src/preferences/dialog/dlgpreferences.cpp @@ -16,7 +16,7 @@ #ifdef __VINYLCONTROL__ #include "preferences/dialog/dlgprefvinyl.h" -#else +#else /* __VINYLCONTROL__ */ #include "preferences/dialog/dlgprefnovinyl.h" #endif @@ -34,7 +34,7 @@ #ifdef __BROADCAST__ #include "preferences/dialog/dlgprefbroadcast.h" -#endif +#endif /* __BROADCAST__ */ #include "preferences/dialog/dlgprefrecord.h" #include "preferences/dialog/dlgprefbeats.h" @@ -43,7 +43,7 @@ #ifdef __MODPLUG__ #include "preferences/dialog/dlgprefmodplug.h" -#endif +#endif /* __MODPLUG__ */ #include "controllers/controllermanager.h" #include "library/library.h" @@ -73,80 +73,173 @@ DlgPreferences::DlgPreferences(MixxxMainWindow * mixxx, SkinLoader* pSkinLoader, this, &DlgPreferences::slotButtonPressed); - createIcons(); - while (pagesWidget->count() > 0) { pagesWidget->removeWidget(pagesWidget->currentWidget()); } - // Construct widgets for use in tabs. + // Construct widgets for use in tabs: + // * create the tree view button first (important for 'Controllers' page!) + // * instantiate preferences page + m_pSoundButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); m_soundPage = new DlgPrefSound(this, soundman, m_pConfig); - addPageWidget(m_soundPage); + addPageWidget(m_soundPage, + m_pSoundButton, + tr("Sound Hardware"), + "soundhardware.svg"); + + m_pLibraryButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); m_libraryPage = new DlgPrefLibrary(this, m_pConfig, pLibrary); - addPageWidget(m_libraryPage); + addPageWidget(m_libraryPage, + m_pLibraryButton, + tr("Library"), + "library.svg"); connect(m_libraryPage, &DlgPrefLibrary::scanLibrary, pLibrary->trackCollections(), &TrackCollectionManager::startLibraryScan); - m_controllersPage = new DlgPrefControllers(this, m_pConfig, controllers, - m_pControllerTreeItem); - addPageWidget(m_controllersPage); + + m_pControllersRootButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); + m_controllersPage = new DlgPrefControllers( + this, m_pConfig, controllers, m_pControllersRootButton); + addPageWidget(m_controllersPage, + m_pControllersRootButton, + tr("Controllers"), + "controllers.svg"); #ifdef __VINYLCONTROL__ // It's important for this to be before the connect for wsound. // TODO(rryan) determine why/if this is still true + m_pVinylControlButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); m_vinylControlPage = new DlgPrefVinyl(this, pVCManager, m_pConfig); - addPageWidget(m_vinylControlPage); - Q_UNUSED(m_noVinylControlPage); -#else + addPageWidget(m_vinylControlPage, + m_pVinylControlButton, + tr("Vinyl Control"), + "vinyl.svg"); +#else /* __VINYLCONTROL__ */ + + m_pVinylControlButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); m_noVinylControlPage = new DlgPrefNoVinyl(this, soundman, m_pConfig); - addPageWidget(m_noVinylControlPage); - Q_UNUSED(m_vinylControlPage); + addPageWidget(m_noVinylControlPage, + m_pVinylControlButton, + tr("Vinyl Control"), + "vinyl.svg"); #endif + m_pInterfaceButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); m_interfacePage = new DlgPrefInterface(this, mixxx, pSkinLoader, m_pConfig); - addPageWidget(m_interfacePage); + addPageWidget(m_interfacePage, + m_pInterfaceButton, + tr("Interface"), + "interface.svg"); + + m_pWaveformButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); m_waveformPage = new DlgPrefWaveform(this, mixxx, m_pConfig, pLibrary); - addPageWidget(m_waveformPage); + addPageWidget(m_waveformPage, + m_pWaveformButton, + tr("Waveforms"), + "waveforms.svg"); + + m_pDecksButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); m_deckPage = new DlgPrefDeck(this, m_pConfig); - addPageWidget(m_deckPage); + addPageWidget(m_deckPage, + m_pDecksButton, + tr("Decks"), + "decks.svg"); + + m_pColorsButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); m_colorsPage = new DlgPrefColors(this, m_pConfig, pLibrary); - addPageWidget(m_colorsPage); + addPageWidget(m_colorsPage, + m_pColorsButton, + tr("Colors"), + "colors.svg"); + + m_pEqButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); m_equalizerPage = new DlgPrefEQ(this, pEffectsManager, m_pConfig); - addPageWidget(m_equalizerPage); + addPageWidget(m_equalizerPage, + m_pEqButton, + tr("Equalizers"), + "equalizers.svg"); + + m_pCrossfaderButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); m_crossfaderPage = new DlgPrefCrossfader(this, m_pConfig); - addPageWidget(m_crossfaderPage); + addPageWidget(m_crossfaderPage, + m_pCrossfaderButton, + tr("Crossfader"), + "crossfader.svg"); + + m_pEffectsButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); m_effectsPage = new DlgPrefEffects(this, m_pConfig, pEffectsManager); - addPageWidget(m_effectsPage); + addPageWidget(m_effectsPage, + m_pEffectsButton, + tr("Effects"), + "effects.svg"); + #ifdef __LILV__ + m_pLV2Button = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); m_lv2Page = new DlgPrefLV2(this, pLV2Backend, m_pConfig, pEffectsManager); - addPageWidget(m_lv2Page); + addPageWidget(m_lv2Page, + m_pLV2Button, + tr("LV2 Plugins"), + "lv2.svg"); #endif /* __LILV__ */ + + m_pAutoDJButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); m_autoDjPage = new DlgPrefAutoDJ(this, m_pConfig); - addPageWidget(m_autoDjPage); + addPageWidget(m_autoDjPage, + m_pAutoDJButton, + tr("Auto DJ"), + "autodj.svg"); #ifdef __BROADCAST__ - m_broadcastingPage = new DlgPrefBroadcast(this, - pSettingsManager->broadcastSettings()); - addPageWidget(m_broadcastingPage); -#endif + m_pBroadcastButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); + m_broadcastingPage = new DlgPrefBroadcast(this, pSettingsManager->broadcastSettings()); + addPageWidget(m_broadcastingPage, + m_pBroadcastButton, + tr("Live Broadcasting"), + "broadcast.svg"); +#endif /* __BROADCAST__ */ + m_pRecordingButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); m_recordingPage = new DlgPrefRecord(this, m_pConfig); - addPageWidget(m_recordingPage); + addPageWidget(m_recordingPage, + m_pRecordingButton, + tr("Recording"), + "recording.svg"); + m_pBeatDetectionButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); m_beatgridPage = new DlgPrefBeats(this, m_pConfig); - addPageWidget (m_beatgridPage); + addPageWidget(m_beatgridPage, + m_pBeatDetectionButton, + tr("Beat Detection"), + "bpmdetect.svg"); + m_pKeyDetectionButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); m_musicalKeyPage = new DlgPrefKey(this, m_pConfig); - addPageWidget(m_musicalKeyPage); + addPageWidget(m_musicalKeyPage, + m_pKeyDetectionButton, + tr("Key Detection"), + "keydetect.svg"); + m_pReplayGainButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); m_replayGainPage = new DlgPrefReplayGain(this, m_pConfig); - addPageWidget(m_replayGainPage); + addPageWidget(m_replayGainPage, + m_pReplayGainButton, + tr("Normalization"), + "replaygain.svg"); #ifdef __MODPLUG__ + m_pModplugButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); m_modplugPage = new DlgPrefModplug(this, m_pConfig); - addPageWidget(m_modplugPage); -#endif + addPageWidget(m_modplugPage, + m_pModplugButton, + tr("Modplug Decoder"), + "modplug.svg"); +#endif /* __MODPLUG__ */ + + connect(contentsTreeWidget, + &QTreeWidget::currentItemChanged, + this, + &DlgPreferences::changePage); // Install event handler to generate closeDlg signal installEventFilter(this); @@ -170,145 +263,6 @@ DlgPreferences::~DlgPreferences() { delete m_controllersPage; } -void DlgPreferences::createIcons() { - m_pSoundButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); - m_pSoundButton->setIcon(0, QIcon(":/images/preferences/ic_preferences_soundhardware.svg")); - m_pSoundButton->setText(0, tr("Sound Hardware")); - m_pSoundButton->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); - m_pSoundButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - - m_pLibraryButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); - m_pLibraryButton->setIcon(0, QIcon(":/images/preferences/ic_preferences_library.svg")); - m_pLibraryButton->setText(0, tr("Library")); - m_pLibraryButton->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); - m_pLibraryButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - - m_pControllerTreeItem = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); - m_pControllerTreeItem->setIcon(0, QIcon(":/images/preferences/ic_preferences_controllers.svg")); - m_pControllerTreeItem->setText(0, tr("Controllers")); - m_pControllerTreeItem->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); - m_pControllerTreeItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - -#ifdef __VINYLCONTROL__ - m_pVinylControlButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); - //QT screws up my nice vinyl svg for some reason, so we'll use a PNG version - //instead... - m_pVinylControlButton->setIcon(0, QIcon(":/images/preferences/ic_preferences_vinyl.svg")); - m_pVinylControlButton->setText(0, tr("Vinyl Control")); - m_pVinylControlButton->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); - m_pVinylControlButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); -#else - m_pVinylControlButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); - //QT screws up my nice vinyl svg for some reason, so we'll use a PNG version - //instead... - m_pVinylControlButton->setIcon(0, QIcon(":/images/preferences/ic_preferences_vinyl.svg")); - m_pVinylControlButton->setText(0, tr("Vinyl Control")); - m_pVinylControlButton->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); - m_pVinylControlButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); -#endif - - m_pInterfaceButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); - m_pInterfaceButton->setIcon(0, QIcon(":/images/preferences/ic_preferences_interface.svg")); - m_pInterfaceButton->setText(0, tr("Interface")); - m_pInterfaceButton->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); - m_pInterfaceButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - - m_pWaveformButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); - m_pWaveformButton->setIcon(0, QIcon(":/images/preferences/ic_preferences_waveforms.svg")); - m_pWaveformButton->setText(0, tr("Waveforms")); - m_pWaveformButton->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); - m_pWaveformButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - - m_pDecksButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); - m_pDecksButton->setIcon(0, QIcon(":/images/preferences/ic_preferences_decks.svg")); - m_pDecksButton->setText(0, tr("Decks")); - m_pDecksButton->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); - m_pDecksButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - - m_pColorsButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); - m_pColorsButton->setIcon(0, QIcon(":/images/preferences/ic_preferences_colors.svg")); - m_pColorsButton->setText(0, tr("Colors")); - m_pColorsButton->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); - m_pColorsButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - - m_pEqButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); - m_pEqButton->setIcon(0, QIcon(":/images/preferences/ic_preferences_equalizers.svg")); - m_pEqButton->setText(0, tr("Equalizers")); - m_pEqButton->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); - m_pEqButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - - m_pCrossfaderButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); - m_pCrossfaderButton->setIcon(0, QIcon(":/images/preferences/ic_preferences_crossfader.svg")); - m_pCrossfaderButton->setText(0, tr("Crossfader")); - m_pCrossfaderButton->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); - m_pCrossfaderButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - - m_pEffectsButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); - m_pEffectsButton->setIcon(0, QIcon(":/images/preferences/ic_preferences_effects.svg")); - m_pEffectsButton->setText(0, tr("Effects")); - m_pEffectsButton->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); - m_pEffectsButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - -#ifdef __LILV__ - m_pLV2Button = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); - m_pLV2Button->setIcon(0, QIcon(":/images/preferences/ic_preferences_lv2.svg")); - m_pLV2Button->setText(0, tr("LV2 Plugins")); - m_pLV2Button->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); - m_pLV2Button->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); -#endif /* __LILV__ */ - - m_pAutoDJButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); - m_pAutoDJButton->setIcon(0, QIcon(":/images/preferences/ic_preferences_autodj.svg")); - m_pAutoDJButton->setText(0, tr("Auto DJ")); - m_pAutoDJButton->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); - m_pAutoDJButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - -#ifdef __BROADCAST__ - m_pBroadcastButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); - m_pBroadcastButton->setIcon(0, QIcon(":/images/preferences/ic_preferences_broadcast.svg")); - m_pBroadcastButton->setText(0, tr("Live Broadcasting")); - m_pBroadcastButton->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); - m_pBroadcastButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); -#endif - - m_pRecordingButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); - m_pRecordingButton->setIcon(0, QIcon(":/images/preferences/ic_preferences_recording.svg")); - m_pRecordingButton->setText(0, tr("Recording")); - m_pRecordingButton->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); - m_pRecordingButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - - m_pBeatDetectionButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); - m_pBeatDetectionButton->setIcon(0, QIcon(":/images/preferences/ic_preferences_bpmdetect.svg")); - m_pBeatDetectionButton->setText(0, tr("Beat Detection")); - m_pBeatDetectionButton->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); - m_pBeatDetectionButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - - m_pKeyDetectionButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); - m_pKeyDetectionButton->setIcon(0, QIcon(":/images/preferences/ic_preferences_keydetect.svg")); - m_pKeyDetectionButton->setText(0, tr("Key Detection")); - m_pKeyDetectionButton->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); - m_pKeyDetectionButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - - m_pReplayGainButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); - m_pReplayGainButton->setIcon(0, QIcon(":/images/preferences/ic_preferences_replaygain.svg")); - m_pReplayGainButton->setText(0, tr("Normalization")); - m_pReplayGainButton->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); - m_pReplayGainButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - -#ifdef __MODPLUG__ - m_pModplugButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); - m_pModplugButton->setIcon(0, QIcon(":/images/preferences/ic_preferences_modplug.svg")); - m_pModplugButton->setText(0, tr("Modplug Decoder")); - m_pModplugButton->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); - m_pModplugButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); -#endif - - connect(contentsTreeWidget, - &QTreeWidget::currentItemChanged, - this, - &DlgPreferences::changePage); -} - void DlgPreferences::changePage(QTreeWidgetItem* current, QTreeWidgetItem* previous) { if (!current) { current = previous; @@ -323,7 +277,7 @@ void DlgPreferences::changePage(QTreeWidgetItem* current, QTreeWidgetItem* previ #ifdef __VINYLCONTROL__ } else if (current == m_pVinylControlButton) { switchToPage(m_vinylControlPage); -#else +#else /* __VINYLCONTROL__ */ } else if (current == m_pVinylControlButton) { switchToPage(m_noVinylControlPage); #endif @@ -350,7 +304,7 @@ void DlgPreferences::changePage(QTreeWidgetItem* current, QTreeWidgetItem* previ #ifdef __BROADCAST__ } else if (current == m_pBroadcastButton) { switchToPage(m_broadcastingPage); -#endif +#endif /* __BROADCAST__ */ } else if (current == m_pRecordingButton) { switchToPage(m_recordingPage); } else if (current == m_pBeatDetectionButton) { @@ -362,7 +316,7 @@ void DlgPreferences::changePage(QTreeWidgetItem* current, QTreeWidgetItem* previ #ifdef __MODPLUG__ } else if (current == m_pModplugButton) { switchToPage(m_modplugPage); -#endif +#endif /* __MODPLUG__ */ } } @@ -426,10 +380,11 @@ void DlgPreferences::onShow() { // Update geometry with last values #ifdef __WINDOWS__ resize(m_geometry[2].toInt(), m_geometry[3].toInt()); -#else - // On linux, when the window is opened for the first time by the window manager, QT does not have - // information about the frame size so the offset is zero. As such, the first time it opens the window - // does not include the offset, so it is moved from the last position it had. +#else /* __WINDOWS__ */ + // On linux, when the window is opened for the first time by the window manager, + // QT does not have information about the frame size so the offset is zero. + // As such, the first time it opens the window does not include the offset, + // so it is moved from the last position it had. // Excluding the offset from the saved value tries to fix that. int offsetX = geometry().left() - frameGeometry().left(); int offsetY = geometry().top() - frameGeometry().top(); @@ -483,11 +438,19 @@ void DlgPreferences::slotButtonPressed(QAbstractButton* pButton) { } } -void DlgPreferences::addPageWidget(DlgPreferencePage* pWidget) { +void DlgPreferences::addPageWidget(DlgPreferencePage* pWidget, + QTreeWidgetItem* treeItem, + const QString& pageTitle, + const QString& iconFile) { + // Configure the tree button linked to the page + treeItem->setIcon(0, QIcon(":/images/preferences/ic_preferences_" + iconFile)); + treeItem->setText(0, pageTitle); + treeItem->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); + treeItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); + connect(this, &DlgPreferences::showDlg, pWidget, &DlgPreferencePage::slotShow); connect(this, &DlgPreferences::closeDlg, pWidget, &DlgPreferencePage::slotHide); connect(this, &DlgPreferences::showDlg, pWidget, &DlgPreferencePage::slotUpdate); - connect(this, &DlgPreferences::applyPreferences, pWidget, &DlgPreferencePage::slotApply); connect(this, &DlgPreferences::cancelPreferences, pWidget, &DlgPreferencePage::slotCancel); connect(this, @@ -495,16 +458,15 @@ void DlgPreferences::addPageWidget(DlgPreferencePage* pWidget) { pWidget, &DlgPreferencePage::slotResetToDefaults); + // Add a new scroll area containing the page to the stacked pages widget QScrollArea* sa = new QScrollArea(pagesWidget); sa->setWidgetResizable(true); - sa->setWidget(pWidget); pagesWidget->addWidget(sa); int iframe = 2 * sa->frameWidth(); m_pageSizeHint = m_pageSizeHint.expandedTo( pWidget->sizeHint()+QSize(iframe, iframe)); - } DlgPreferencePage* DlgPreferences::currentPage() { @@ -551,7 +513,7 @@ void DlgPreferences::moveEvent(QMoveEvent* e) { Q_UNUSED(e); m_geometry[0] = QString::number(frameGeometry().left()); m_geometry[1] = QString::number(frameGeometry().top()); -#else +#else /* __WINDOWS__ */ // Warning! geometry does NOT include the frame/title. int offsetX = geometry().left() - frameGeometry().left(); int offsetY = geometry().top() - frameGeometry().top(); diff --git a/src/preferences/dialog/dlgpreferences.h b/src/preferences/dialog/dlgpreferences.h index f19b7b955eb..55b5dac480e 100644 --- a/src/preferences/dialog/dlgpreferences.h +++ b/src/preferences/dialog/dlgpreferences.h @@ -61,7 +61,10 @@ class DlgPreferences : public QDialog, public Ui::DlgPreferencesDlg { Library* pLibrary); virtual ~DlgPreferences(); - void addPageWidget(DlgPreferencePage* pWidget); + void addPageWidget(DlgPreferencePage* pWidget, + QTreeWidgetItem* treeItem, + const QString& pageTitle, + const QString& iconFile); void removePageWidget(DlgPreferencePage* pWidget); void expandTreeItem(QTreeWidgetItem* pItem); void switchToPage(DlgPreferencePage* pWidget); @@ -88,7 +91,6 @@ class DlgPreferences : public QDialog, public Ui::DlgPreferencesDlg { private: DlgPreferencePage* currentPage(); - void createIcons(); void onShow(); void onHide(); QRect getDefaultGeometry(); @@ -98,8 +100,11 @@ class DlgPreferences : public QDialog, public Ui::DlgPreferencesDlg { DlgPrefSound* m_soundPage; DlgPrefLibrary* m_libraryPage; DlgPrefControllers *m_controllersPage; +#ifdef __VINYLCONTROL__ DlgPrefVinyl* m_vinylControlPage; +#else /* __VINYLCONTROL__ */ DlgPrefNoVinyl* m_noVinylControlPage; +#endif DlgPrefInterface* m_interfacePage; DlgPrefWaveform* m_waveformPage; DlgPrefDeck* m_deckPage; @@ -118,11 +123,11 @@ class DlgPreferences : public QDialog, public Ui::DlgPreferencesDlg { #endif /* __LILV__ */ #ifdef __MODPLUG__ DlgPrefModplug* m_modplugPage; -#endif +#endif /* __MODPLUG__ */ QTreeWidgetItem* m_pSoundButton; QTreeWidgetItem* m_pLibraryButton; - QTreeWidgetItem* m_pControllerTreeItem; + QTreeWidgetItem* m_pControllersRootButton; QTreeWidgetItem* m_pVinylControlButton; QTreeWidgetItem* m_pInterfaceButton; QTreeWidgetItem* m_pWaveformButton; @@ -134,7 +139,6 @@ class DlgPreferences : public QDialog, public Ui::DlgPreferencesDlg { #endif /* __LILV__ */ QTreeWidgetItem* m_pEffectsButton; QTreeWidgetItem* m_pCrossfaderButton; - //QTreeWidgetItem* m_pEffectsButton; QTreeWidgetItem* m_pAutoDJButton; QTreeWidgetItem* m_pBroadcastButton; QTreeWidgetItem* m_pRecordingButton; @@ -143,7 +147,7 @@ class DlgPreferences : public QDialog, public Ui::DlgPreferencesDlg { QTreeWidgetItem* m_pReplayGainButton; #ifdef __MODPLUG__ QTreeWidgetItem* m_pModplugButton; -#endif +#endif /* __MODPLUG__ */ QSize m_pageSizeHint; }; From 555ae4ffe8b47ac7904dffab2fce4c38c2ac24af Mon Sep 17 00:00:00 2001 From: ronso0 Date: Thu, 24 Dec 2020 13:41:55 +0100 Subject: [PATCH 2/3] DlgPrefControllers: use more distinct variable names --- src/controllers/dlgprefcontrollers.cpp | 45 +++++++++++++------------- src/controllers/dlgprefcontrollers.h | 2 +- 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/src/controllers/dlgprefcontrollers.cpp b/src/controllers/dlgprefcontrollers.cpp index 22000c9087a..9b9444c3294 100644 --- a/src/controllers/dlgprefcontrollers.cpp +++ b/src/controllers/dlgprefcontrollers.cpp @@ -43,26 +43,26 @@ void DlgPrefControllers::slotOpenLocalFile(const QString& file) { } void DlgPrefControllers::slotUpdate() { - for (DlgPrefController* pControllerWindows : qAsConst(m_controllerWindows)) { - pControllerWindows->slotUpdate(); + for (DlgPrefController* controllerDlg : qAsConst(m_controllerPages)) { + controllerDlg->slotUpdate(); } } void DlgPrefControllers::slotCancel() { - for (DlgPrefController* pControllerWindows : qAsConst(m_controllerWindows)) { - pControllerWindows->slotCancel(); + for (DlgPrefController* controllerDlg : qAsConst(m_controllerPages)) { + controllerDlg->slotCancel(); } } void DlgPrefControllers::slotApply() { - for (DlgPrefController* pControllerWindows : qAsConst(m_controllerWindows)) { - pControllerWindows->slotApply(); + for (DlgPrefController* controllerDlg : qAsConst(m_controllerPages)) { + controllerDlg->slotApply(); } } void DlgPrefControllers::slotResetToDefaults() { - for (DlgPrefController* pControllerWindows : qAsConst(m_controllerWindows)) { - pControllerWindows->slotResetToDefaults(); + for (DlgPrefController* controllerDlg : qAsConst(m_controllerPages)) { + controllerDlg->slotResetToDefaults(); } } @@ -73,9 +73,9 @@ QUrl DlgPrefControllers::helpUrl() const { bool DlgPrefControllers::handleTreeItemClick(QTreeWidgetItem* clickedItem) { int controllerIndex = m_controllerTreeItems.indexOf(clickedItem); if (controllerIndex >= 0) { - DlgPrefController* controllerWidget = m_controllerWindows.value(controllerIndex); - if (controllerWidget) { - m_pDlgPreferences->switchToPage(controllerWidget); + DlgPrefController* controllerDlg = m_controllerPages.value(controllerIndex); + if (controllerDlg) { + m_pDlgPreferences->switchToPage(controllerDlg); } return true; } else if (clickedItem == m_pControllersRootItem) { @@ -93,8 +93,8 @@ void DlgPrefControllers::rescanControllers() { } void DlgPrefControllers::destroyControllerWidgets() { - while (!m_controllerWindows.isEmpty()) { - DlgPrefController* controllerDlg = m_controllerWindows.takeLast(); + while (!m_controllerPages.isEmpty()) { + DlgPrefController* controllerDlg = m_controllerPages.takeLast(); m_pDlgPreferences->removePageWidget(controllerDlg); delete controllerDlg; } @@ -126,7 +126,7 @@ void DlgPrefControllers::setupControllerWidgets() { m_pDlgPreferences, &DlgPreferences::show); - m_controllerWindows.append(controllerDlg); + m_controllerPages.append(controllerDlg); connect(pController, &Controller::openChanged, @@ -154,20 +154,19 @@ void DlgPrefControllers::setupControllerWidgets() { txtNoControllersAvailable->setVisible(controllerList.empty()); } -void DlgPrefControllers::slotHighlightDevice(DlgPrefController* dialog, bool enabled) { - int dialogIndex = m_controllerWindows.indexOf(dialog); - if (dialogIndex < 0) { +void DlgPrefControllers::slotHighlightDevice(DlgPrefController* controllerDlg, bool enabled) { + int controllerPageIndex = m_controllerPages.indexOf(controllerDlg); + if (controllerPageIndex < 0) { return; } - QTreeWidgetItem * controllerWindowLink = - m_controllerTreeItems.at(dialogIndex); - - if (!controllerWindowLink) { + QTreeWidgetItem* controllerTreeItem = + m_controllerTreeItems.at(controllerPageIndex); + if (!controllerTreeItem) { return; } - QFont temp = controllerWindowLink->font(0); + QFont temp = controllerTreeItem->font(0); temp.setBold(enabled); - controllerWindowLink->setFont(0,temp); + controllerTreeItem->setFont(0, temp); } diff --git a/src/controllers/dlgprefcontrollers.h b/src/controllers/dlgprefcontrollers.h index 3126ea9c12f..ea5d5c8596d 100644 --- a/src/controllers/dlgprefcontrollers.h +++ b/src/controllers/dlgprefcontrollers.h @@ -49,6 +49,6 @@ class DlgPrefControllers : public DlgPreferencePage, public Ui::DlgPrefControlle UserSettingsPointer m_pConfig; ControllerManager* m_pControllerManager; QTreeWidgetItem* m_pControllersRootItem; - QList m_controllerWindows; + QList m_controllerPages; QList m_controllerTreeItems; }; From 6fda0a73b3e9d8f6fb27e0b5fcac26431dc2729e Mon Sep 17 00:00:00 2001 From: ronso0 Date: Sat, 26 Dec 2020 22:54:02 +0100 Subject: [PATCH 3/3] Preferences: choose dark or light icons depending to OS theme... dark foreground text color > dark icons, light text > light icons --- res/images/ic_custom.svg | 67 - res/images/ic_mixxx_symbolic.svg | 1308 ----------------- res/images/ic_none.svg | 77 - res/images/preferences/dark/ic_custom.svg | 5 + .../preferences/dark/ic_mixxx_symbolic.svg | 186 +++ res/images/preferences/dark/ic_none.svg | 7 + .../dark/ic_preferences_autodj.svg | 13 + .../dark/ic_preferences_bpmdetect.svg | 7 + .../dark/ic_preferences_broadcast.svg | 12 + .../dark/ic_preferences_colors.svg | 7 + .../dark/ic_preferences_controllers.svg | 4 + .../dark/ic_preferences_crossfader.svg | 8 + .../preferences/dark/ic_preferences_decks.svg | 4 + .../dark/ic_preferences_effects.svg | 6 + .../dark/ic_preferences_equalizers.svg | 15 + .../dark/ic_preferences_interface.svg | 13 + .../dark/ic_preferences_keydetect.svg | 8 + .../dark/ic_preferences_library.svg | 14 + .../preferences/dark/ic_preferences_lv2.svg | 4 + .../dark/ic_preferences_midicontrollers.svg | 13 + .../dark/ic_preferences_modplug.svg | 12 + .../dark/ic_preferences_recording.svg | 4 + .../dark/ic_preferences_replaygain.svg | 9 + .../dark/ic_preferences_sampler.svg | 4 + .../dark/ic_preferences_soundhardware.svg | 13 + .../preferences/dark/ic_preferences_vinyl.svg | 10 + .../dark/ic_preferences_waveforms.svg | 4 + .../preferences/ic_preferences_autodj.svg | 375 ----- .../preferences/ic_preferences_bpmdetect.svg | 365 ----- .../preferences/ic_preferences_broadcast.svg | 419 ------ .../preferences/ic_preferences_colors.svg | 7 - .../ic_preferences_controllers.svg | 405 ----- .../preferences/ic_preferences_crossfader.svg | 487 ------ .../preferences/ic_preferences_decks.svg | 615 -------- .../preferences/ic_preferences_effects.svg | 486 ------ .../preferences/ic_preferences_equalizers.svg | 796 ---------- .../preferences/ic_preferences_interface.svg | 646 -------- .../preferences/ic_preferences_keydetect.svg | 512 ------- .../preferences/ic_preferences_library.svg | 538 ------- res/images/preferences/ic_preferences_lv2.svg | 436 ------ .../ic_preferences_midicontrollers.svg | 560 ------- .../preferences/ic_preferences_modplug.svg | 503 ------- .../preferences/ic_preferences_recording.svg | 438 ------ .../preferences/ic_preferences_replaygain.svg | 610 -------- .../preferences/ic_preferences_sampler.svg | 606 -------- .../ic_preferences_soundhardware.svg | 713 --------- .../preferences/ic_preferences_vinyl.svg | 673 --------- .../preferences/ic_preferences_waveforms.svg | 643 -------- res/images/preferences/light/ic_custom.svg | 5 + .../preferences/light/ic_mixxx_symbolic.svg | 186 +++ res/images/preferences/light/ic_none.svg | 7 + .../light/ic_preferences_autodj.svg | 13 + .../light/ic_preferences_bpmdetect.svg | 7 + .../light/ic_preferences_broadcast.svg | 12 + .../light/ic_preferences_colors.svg | 7 + .../light/ic_preferences_controllers.svg | 4 + .../light/ic_preferences_crossfader.svg | 8 + .../light/ic_preferences_decks.svg | 4 + .../light/ic_preferences_effects.svg | 6 + .../light/ic_preferences_equalizers.svg | 15 + .../light/ic_preferences_interface.svg | 13 + .../light/ic_preferences_keydetect.svg | 8 + .../light/ic_preferences_library.svg | 14 + .../preferences/light/ic_preferences_lv2.svg | 4 + .../light/ic_preferences_midicontrollers.svg | 13 + .../light/ic_preferences_modplug.svg | 12 + .../light/ic_preferences_recording.svg | 4 + .../light/ic_preferences_replaygain.svg | 9 + .../light/ic_preferences_sampler.svg | 4 + .../light/ic_preferences_soundhardware.svg | 13 + .../light/ic_preferences_vinyl.svg | 10 + .../light/ic_preferences_waveforms.svg | 4 + res/mixxx.qrc | 74 +- src/controllers/dlgprefcontroller.cpp | 12 +- src/preferences/dialog/dlgpreferences.cpp | 12 +- src/preferences/dialog/dlgpreferences.h | 2 + 76 files changed, 835 insertions(+), 12314 deletions(-) delete mode 100644 res/images/ic_custom.svg delete mode 100644 res/images/ic_mixxx_symbolic.svg delete mode 100644 res/images/ic_none.svg create mode 100644 res/images/preferences/dark/ic_custom.svg create mode 100644 res/images/preferences/dark/ic_mixxx_symbolic.svg create mode 100644 res/images/preferences/dark/ic_none.svg create mode 100644 res/images/preferences/dark/ic_preferences_autodj.svg create mode 100644 res/images/preferences/dark/ic_preferences_bpmdetect.svg create mode 100644 res/images/preferences/dark/ic_preferences_broadcast.svg create mode 100644 res/images/preferences/dark/ic_preferences_colors.svg create mode 100644 res/images/preferences/dark/ic_preferences_controllers.svg create mode 100644 res/images/preferences/dark/ic_preferences_crossfader.svg create mode 100644 res/images/preferences/dark/ic_preferences_decks.svg create mode 100644 res/images/preferences/dark/ic_preferences_effects.svg create mode 100644 res/images/preferences/dark/ic_preferences_equalizers.svg create mode 100644 res/images/preferences/dark/ic_preferences_interface.svg create mode 100644 res/images/preferences/dark/ic_preferences_keydetect.svg create mode 100644 res/images/preferences/dark/ic_preferences_library.svg create mode 100644 res/images/preferences/dark/ic_preferences_lv2.svg create mode 100644 res/images/preferences/dark/ic_preferences_midicontrollers.svg create mode 100644 res/images/preferences/dark/ic_preferences_modplug.svg create mode 100644 res/images/preferences/dark/ic_preferences_recording.svg create mode 100644 res/images/preferences/dark/ic_preferences_replaygain.svg create mode 100644 res/images/preferences/dark/ic_preferences_sampler.svg create mode 100644 res/images/preferences/dark/ic_preferences_soundhardware.svg create mode 100644 res/images/preferences/dark/ic_preferences_vinyl.svg create mode 100644 res/images/preferences/dark/ic_preferences_waveforms.svg delete mode 100644 res/images/preferences/ic_preferences_autodj.svg delete mode 100644 res/images/preferences/ic_preferences_bpmdetect.svg delete mode 100644 res/images/preferences/ic_preferences_broadcast.svg delete mode 100644 res/images/preferences/ic_preferences_colors.svg delete mode 100644 res/images/preferences/ic_preferences_controllers.svg delete mode 100644 res/images/preferences/ic_preferences_crossfader.svg delete mode 100644 res/images/preferences/ic_preferences_decks.svg delete mode 100644 res/images/preferences/ic_preferences_effects.svg delete mode 100644 res/images/preferences/ic_preferences_equalizers.svg delete mode 100644 res/images/preferences/ic_preferences_interface.svg delete mode 100644 res/images/preferences/ic_preferences_keydetect.svg delete mode 100644 res/images/preferences/ic_preferences_library.svg delete mode 100644 res/images/preferences/ic_preferences_lv2.svg delete mode 100644 res/images/preferences/ic_preferences_midicontrollers.svg delete mode 100644 res/images/preferences/ic_preferences_modplug.svg delete mode 100644 res/images/preferences/ic_preferences_recording.svg delete mode 100644 res/images/preferences/ic_preferences_replaygain.svg delete mode 100644 res/images/preferences/ic_preferences_sampler.svg delete mode 100644 res/images/preferences/ic_preferences_soundhardware.svg delete mode 100644 res/images/preferences/ic_preferences_vinyl.svg delete mode 100644 res/images/preferences/ic_preferences_waveforms.svg create mode 100644 res/images/preferences/light/ic_custom.svg create mode 100644 res/images/preferences/light/ic_mixxx_symbolic.svg create mode 100644 res/images/preferences/light/ic_none.svg create mode 100644 res/images/preferences/light/ic_preferences_autodj.svg create mode 100644 res/images/preferences/light/ic_preferences_bpmdetect.svg create mode 100644 res/images/preferences/light/ic_preferences_broadcast.svg create mode 100644 res/images/preferences/light/ic_preferences_colors.svg create mode 100644 res/images/preferences/light/ic_preferences_controllers.svg create mode 100644 res/images/preferences/light/ic_preferences_crossfader.svg create mode 100644 res/images/preferences/light/ic_preferences_decks.svg create mode 100644 res/images/preferences/light/ic_preferences_effects.svg create mode 100644 res/images/preferences/light/ic_preferences_equalizers.svg create mode 100644 res/images/preferences/light/ic_preferences_interface.svg create mode 100644 res/images/preferences/light/ic_preferences_keydetect.svg create mode 100644 res/images/preferences/light/ic_preferences_library.svg create mode 100644 res/images/preferences/light/ic_preferences_lv2.svg create mode 100644 res/images/preferences/light/ic_preferences_midicontrollers.svg create mode 100644 res/images/preferences/light/ic_preferences_modplug.svg create mode 100644 res/images/preferences/light/ic_preferences_recording.svg create mode 100644 res/images/preferences/light/ic_preferences_replaygain.svg create mode 100644 res/images/preferences/light/ic_preferences_sampler.svg create mode 100644 res/images/preferences/light/ic_preferences_soundhardware.svg create mode 100644 res/images/preferences/light/ic_preferences_vinyl.svg create mode 100644 res/images/preferences/light/ic_preferences_waveforms.svg diff --git a/res/images/ic_custom.svg b/res/images/ic_custom.svg deleted file mode 100644 index 44a0fe3f680..00000000000 --- a/res/images/ic_custom.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/res/images/ic_mixxx_symbolic.svg b/res/images/ic_mixxx_symbolic.svg deleted file mode 100644 index c51004a4556..00000000000 --- a/res/images/ic_mixxx_symbolic.svg +++ /dev/null @@ -1,1308 +0,0 @@ - - - - - - - - image/svg+xml - - Mixxx application icon - - - - - - - Mixxx application icon - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/res/images/ic_none.svg b/res/images/ic_none.svg deleted file mode 100644 index 1d4ae648d3a..00000000000 --- a/res/images/ic_none.svg +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/res/images/preferences/dark/ic_custom.svg b/res/images/preferences/dark/ic_custom.svg new file mode 100644 index 00000000000..afb9881b2e6 --- /dev/null +++ b/res/images/preferences/dark/ic_custom.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/res/images/preferences/dark/ic_mixxx_symbolic.svg b/res/images/preferences/dark/ic_mixxx_symbolic.svg new file mode 100644 index 00000000000..348a1f12874 --- /dev/null +++ b/res/images/preferences/dark/ic_mixxx_symbolic.svg @@ -0,0 +1,186 @@ + + Mixxx application icon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/res/images/preferences/dark/ic_none.svg b/res/images/preferences/dark/ic_none.svg new file mode 100644 index 00000000000..ba2cb6a5426 --- /dev/null +++ b/res/images/preferences/dark/ic_none.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/res/images/preferences/dark/ic_preferences_autodj.svg b/res/images/preferences/dark/ic_preferences_autodj.svg new file mode 100644 index 00000000000..2ff8701be13 --- /dev/null +++ b/res/images/preferences/dark/ic_preferences_autodj.svg @@ -0,0 +1,13 @@ + + Mixxx 1.12+ iconset + + + + + + + + + + + diff --git a/res/images/preferences/dark/ic_preferences_bpmdetect.svg b/res/images/preferences/dark/ic_preferences_bpmdetect.svg new file mode 100644 index 00000000000..25ecf03c0c1 --- /dev/null +++ b/res/images/preferences/dark/ic_preferences_bpmdetect.svg @@ -0,0 +1,7 @@ + + Mixxx 1.12+ iconset + + + + + diff --git a/res/images/preferences/dark/ic_preferences_broadcast.svg b/res/images/preferences/dark/ic_preferences_broadcast.svg new file mode 100644 index 00000000000..05bb64fb88a --- /dev/null +++ b/res/images/preferences/dark/ic_preferences_broadcast.svg @@ -0,0 +1,12 @@ + + Mixxx 1.12+ iconset + + + + + + + + + + diff --git a/res/images/preferences/dark/ic_preferences_colors.svg b/res/images/preferences/dark/ic_preferences_colors.svg new file mode 100644 index 00000000000..214b78d58fb --- /dev/null +++ b/res/images/preferences/dark/ic_preferences_colors.svg @@ -0,0 +1,7 @@ + + Mixxx 1.12+ iconset + + + + + diff --git a/res/images/preferences/dark/ic_preferences_controllers.svg b/res/images/preferences/dark/ic_preferences_controllers.svg new file mode 100644 index 00000000000..fc34415d2e1 --- /dev/null +++ b/res/images/preferences/dark/ic_preferences_controllers.svg @@ -0,0 +1,4 @@ + + Mixxx 1.12+ iconset + + diff --git a/res/images/preferences/dark/ic_preferences_crossfader.svg b/res/images/preferences/dark/ic_preferences_crossfader.svg new file mode 100644 index 00000000000..d70d4f6fb8d --- /dev/null +++ b/res/images/preferences/dark/ic_preferences_crossfader.svg @@ -0,0 +1,8 @@ + + Mixxx 1.12+ iconset + + + + + + diff --git a/res/images/preferences/dark/ic_preferences_decks.svg b/res/images/preferences/dark/ic_preferences_decks.svg new file mode 100644 index 00000000000..e2e6d721a95 --- /dev/null +++ b/res/images/preferences/dark/ic_preferences_decks.svg @@ -0,0 +1,4 @@ + + Mixxx 1.12+ iconset + + diff --git a/res/images/preferences/dark/ic_preferences_effects.svg b/res/images/preferences/dark/ic_preferences_effects.svg new file mode 100644 index 00000000000..9a292ee13b6 --- /dev/null +++ b/res/images/preferences/dark/ic_preferences_effects.svg @@ -0,0 +1,6 @@ + + Mixxx 1.12+ iconset + + + + diff --git a/res/images/preferences/dark/ic_preferences_equalizers.svg b/res/images/preferences/dark/ic_preferences_equalizers.svg new file mode 100644 index 00000000000..add3b2f0f25 --- /dev/null +++ b/res/images/preferences/dark/ic_preferences_equalizers.svg @@ -0,0 +1,15 @@ + + Mixxx 1.12+ iconset + + + + + + + + + + + + + diff --git a/res/images/preferences/dark/ic_preferences_interface.svg b/res/images/preferences/dark/ic_preferences_interface.svg new file mode 100644 index 00000000000..2e3209eca99 --- /dev/null +++ b/res/images/preferences/dark/ic_preferences_interface.svg @@ -0,0 +1,13 @@ + + Mixxx 1.12+ iconset + + + + + + + + + + + diff --git a/res/images/preferences/dark/ic_preferences_keydetect.svg b/res/images/preferences/dark/ic_preferences_keydetect.svg new file mode 100644 index 00000000000..86c71d68b3a --- /dev/null +++ b/res/images/preferences/dark/ic_preferences_keydetect.svg @@ -0,0 +1,8 @@ + + Mixxx 1.12+ iconset + + + + + + diff --git a/res/images/preferences/dark/ic_preferences_library.svg b/res/images/preferences/dark/ic_preferences_library.svg new file mode 100644 index 00000000000..8788cd5e964 --- /dev/null +++ b/res/images/preferences/dark/ic_preferences_library.svg @@ -0,0 +1,14 @@ + + Mixxx 1.12+ iconset + + + + + + + + + + + + diff --git a/res/images/preferences/dark/ic_preferences_lv2.svg b/res/images/preferences/dark/ic_preferences_lv2.svg new file mode 100644 index 00000000000..2f13a81b5ad --- /dev/null +++ b/res/images/preferences/dark/ic_preferences_lv2.svg @@ -0,0 +1,4 @@ + + Mixxx 1.12+ iconset + + diff --git a/res/images/preferences/dark/ic_preferences_midicontrollers.svg b/res/images/preferences/dark/ic_preferences_midicontrollers.svg new file mode 100644 index 00000000000..142a8779701 --- /dev/null +++ b/res/images/preferences/dark/ic_preferences_midicontrollers.svg @@ -0,0 +1,13 @@ + + Mixxx 1.12+ iconset + + + + + + + + + + + diff --git a/res/images/preferences/dark/ic_preferences_modplug.svg b/res/images/preferences/dark/ic_preferences_modplug.svg new file mode 100644 index 00000000000..302e03632b5 --- /dev/null +++ b/res/images/preferences/dark/ic_preferences_modplug.svg @@ -0,0 +1,12 @@ + + Mixxx 1.12+ iconset + + + + + + + + + + diff --git a/res/images/preferences/dark/ic_preferences_recording.svg b/res/images/preferences/dark/ic_preferences_recording.svg new file mode 100644 index 00000000000..0b731101e42 --- /dev/null +++ b/res/images/preferences/dark/ic_preferences_recording.svg @@ -0,0 +1,4 @@ + + Mixxx 1.12+ iconset + + diff --git a/res/images/preferences/dark/ic_preferences_replaygain.svg b/res/images/preferences/dark/ic_preferences_replaygain.svg new file mode 100644 index 00000000000..22cbef665ce --- /dev/null +++ b/res/images/preferences/dark/ic_preferences_replaygain.svg @@ -0,0 +1,9 @@ + + Mixxx 1.12+ iconset + + + + + + + diff --git a/res/images/preferences/dark/ic_preferences_sampler.svg b/res/images/preferences/dark/ic_preferences_sampler.svg new file mode 100644 index 00000000000..c3e3f5d8b84 --- /dev/null +++ b/res/images/preferences/dark/ic_preferences_sampler.svg @@ -0,0 +1,4 @@ + + Mixxx 1.12+ iconset + + diff --git a/res/images/preferences/dark/ic_preferences_soundhardware.svg b/res/images/preferences/dark/ic_preferences_soundhardware.svg new file mode 100644 index 00000000000..39c62ff9ea6 --- /dev/null +++ b/res/images/preferences/dark/ic_preferences_soundhardware.svg @@ -0,0 +1,13 @@ + + Mixxx 1.12+ iconset + + + + + + + + + + + diff --git a/res/images/preferences/dark/ic_preferences_vinyl.svg b/res/images/preferences/dark/ic_preferences_vinyl.svg new file mode 100644 index 00000000000..391c105652a --- /dev/null +++ b/res/images/preferences/dark/ic_preferences_vinyl.svg @@ -0,0 +1,10 @@ + + Mixxx 1.12+ iconset + + + + + + + + diff --git a/res/images/preferences/dark/ic_preferences_waveforms.svg b/res/images/preferences/dark/ic_preferences_waveforms.svg new file mode 100644 index 00000000000..cc25285087f --- /dev/null +++ b/res/images/preferences/dark/ic_preferences_waveforms.svg @@ -0,0 +1,4 @@ + + Mixxx 1.12+ iconset + + diff --git a/res/images/preferences/ic_preferences_autodj.svg b/res/images/preferences/ic_preferences_autodj.svg deleted file mode 100644 index 40683a2bb1a..00000000000 --- a/res/images/preferences/ic_preferences_autodj.svg +++ /dev/null @@ -1,375 +0,0 @@ - - - - - - Mixxx 1.12+ iconset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - en - - - image/svg+xml - - Mixxx 1.12+ iconset - - - Mixxx - GUI - Interface - Icons - - - - - s.brandt@mixxx.org - - - - 2014-04-18 - www.mixxx.org - Iconset for use in Mixxx 1.12s+. Optimized for 48px (16px) icon size. Contains icons for preference menu and library widget - -Grid based on suggestions from http://techbase.kde.org/Projects/Oxygen/Style - - en - - - - - - - - - - - - - - - - - diff --git a/res/images/preferences/ic_preferences_bpmdetect.svg b/res/images/preferences/ic_preferences_bpmdetect.svg deleted file mode 100644 index fe70517e1ba..00000000000 --- a/res/images/preferences/ic_preferences_bpmdetect.svg +++ /dev/null @@ -1,365 +0,0 @@ - - - - - - Mixxx 1.12+ iconset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - en - - - image/svg+xml - - Mixxx 1.12+ iconset - - - Mixxx - GUI - Interface - Icons - - - - - s.brandt@mixxx.org - - - - 2014-04-18 - www.mixxx.org - Iconset for use in Mixxx 1.12s+. Optimized for 48px (16px) icon size. Contains icons for preference menu and library widget - -Grid based on suggestions from http://techbase.kde.org/Projects/Oxygen/Style - - en - - - - - - - - - - - - - diff --git a/res/images/preferences/ic_preferences_broadcast.svg b/res/images/preferences/ic_preferences_broadcast.svg deleted file mode 100644 index 80eefee4e14..00000000000 --- a/res/images/preferences/ic_preferences_broadcast.svg +++ /dev/null @@ -1,419 +0,0 @@ - - - - - - Mixxx 1.12+ iconset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - en - - - image/svg+xml - - Mixxx 1.12+ iconset - - - Mixxx - GUI - Interface - Icons - - - - - s.brandt@mixxx.org - - - - 2014-04-18 - www.mixxx.org - Iconset for use in Mixxx 1.12s+. Optimized for 48px (16px) icon size. Contains icons for preference menu and library widget - -Grid based on suggestions from http://techbase.kde.org/Projects/Oxygen/Style - - en - - - - - - - - - - - - - - diff --git a/res/images/preferences/ic_preferences_colors.svg b/res/images/preferences/ic_preferences_colors.svg deleted file mode 100644 index cb7199750b8..00000000000 --- a/res/images/preferences/ic_preferences_colors.svg +++ /dev/null @@ -1,7 +0,0 @@ - - Mixxx 1.12+ iconset - - - - - diff --git a/res/images/preferences/ic_preferences_controllers.svg b/res/images/preferences/ic_preferences_controllers.svg deleted file mode 100644 index ce6b0b94554..00000000000 --- a/res/images/preferences/ic_preferences_controllers.svg +++ /dev/null @@ -1,405 +0,0 @@ - - - - - - Mixxx 1.12+ iconset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - en - - - image/svg+xml - - Mixxx 1.12+ iconset - - - Mixxx - GUI - Interface - Icons - - - - - s.brandt@mixxx.org - - - - 2014-04-18 - www.mixxx.org - Iconset for use in Mixxx 1.12s+. Optimized for 48px (16px) icon size. Contains icons for preference menu and library widget - -Grid based on suggestions from http://techbase.kde.org/Projects/Oxygen/Style - - en - - - - - - - - - - diff --git a/res/images/preferences/ic_preferences_crossfader.svg b/res/images/preferences/ic_preferences_crossfader.svg deleted file mode 100644 index 9c995c0aac5..00000000000 --- a/res/images/preferences/ic_preferences_crossfader.svg +++ /dev/null @@ -1,487 +0,0 @@ - - - - - - Mixxx 1.12+ iconset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - en - - - image/svg+xml - - Mixxx 1.12+ iconset - - - Mixxx - GUI - Interface - Icons - - - - - s.brandt@mixxx.org - - - - 2014-04-18 - www.mixxx.org - Iconset for use in Mixxx 1.12s+. Optimized for 48px (16px) icon size. Contains icons for preference menu and library widget - -Grid based on suggestions from http://techbase.kde.org/Projects/Oxygen/Style - - en - - - - - - - - - - - - diff --git a/res/images/preferences/ic_preferences_decks.svg b/res/images/preferences/ic_preferences_decks.svg deleted file mode 100644 index 610d154e394..00000000000 --- a/res/images/preferences/ic_preferences_decks.svg +++ /dev/null @@ -1,615 +0,0 @@ - - - - - - Mixxx 1.12+ iconset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - en - - - image/svg+xml - - Mixxx 1.12+ iconset - - - Mixxx - GUI - Interface - Icons - - - - - s.brandt@mixxx.org - - - - 2014-04-18 - www.mixxx.org - Iconset for use in Mixxx 1.12s+. Optimized for 48px (16px) icon size. Contains icons for preference menu and library widget - -Grid based on suggestions from http://techbase.kde.org/Projects/Oxygen/Style - - en - - - - - - - - - - diff --git a/res/images/preferences/ic_preferences_effects.svg b/res/images/preferences/ic_preferences_effects.svg deleted file mode 100644 index 4c0effcf8c9..00000000000 --- a/res/images/preferences/ic_preferences_effects.svg +++ /dev/null @@ -1,486 +0,0 @@ - - - - - - Mixxx 1.12+ iconset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - en - - - image/svg+xml - - Mixxx 1.12+ iconset - - - Mixxx - GUI - Interface - Icons - - - - - s.brandt@mixxx.org - - - - 2014-04-18 - www.mixxx.org - Iconset for use in Mixxx 1.12s+. Optimized for 48px (16px) icon size. Contains icons for preference menu and library widget - -Grid based on suggestions from http://techbase.kde.org/Projects/Oxygen/Style - - en - - - - - - - - - - - - - - diff --git a/res/images/preferences/ic_preferences_equalizers.svg b/res/images/preferences/ic_preferences_equalizers.svg deleted file mode 100644 index 6ffaa6b61ee..00000000000 --- a/res/images/preferences/ic_preferences_equalizers.svg +++ /dev/null @@ -1,796 +0,0 @@ - - - - - - Mixxx 1.12+ iconset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - en - - - image/svg+xml - - Mixxx 1.12+ iconset - - - Mixxx - GUI - Interface - Icons - - - - - s.brandt@mixxx.org - - - - 2014-04-18 - www.mixxx.org - Iconset for use in Mixxx 1.12s+. Optimized for 48px (16px) icon size. Contains icons for preference menu and library widget - -Grid based on suggestions from http://techbase.kde.org/Projects/Oxygen/Style - - en - - - - - - - - - - - - - - - - - - - - - diff --git a/res/images/preferences/ic_preferences_interface.svg b/res/images/preferences/ic_preferences_interface.svg deleted file mode 100644 index 7dfcf4db4a5..00000000000 --- a/res/images/preferences/ic_preferences_interface.svg +++ /dev/null @@ -1,646 +0,0 @@ - - - - - - Mixxx 1.12+ iconset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - en - - - image/svg+xml - - Mixxx 1.12+ iconset - - - Mixxx - GUI - Interface - Icons - - - - - s.brandt@mixxx.org - - - - 2014-04-18 - www.mixxx.org - Iconset for use in Mixxx 1.12s+. Optimized for 48px (16px) icon size. Contains icons for preference menu and library widget - -Grid based on suggestions from http://techbase.kde.org/Projects/Oxygen/Style - - en - - - - - - - - - - - - - diff --git a/res/images/preferences/ic_preferences_keydetect.svg b/res/images/preferences/ic_preferences_keydetect.svg deleted file mode 100644 index c65160da675..00000000000 --- a/res/images/preferences/ic_preferences_keydetect.svg +++ /dev/null @@ -1,512 +0,0 @@ - - - - - - Mixxx 1.12+ iconset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - en - - - image/svg+xml - - Mixxx 1.12+ iconset - - - Mixxx - GUI - Interface - Icons - - - - - s.brandt@mixxx.org - - - - 2014-04-18 - www.mixxx.org - Iconset for use in Mixxx 1.12s+. Optimized for 48px (16px) icon size. Contains icons for preference menu and library widget - -Grid based on suggestions from http://techbase.kde.org/Projects/Oxygen/Style - - en - - - - - - - - - - - diff --git a/res/images/preferences/ic_preferences_library.svg b/res/images/preferences/ic_preferences_library.svg deleted file mode 100644 index 098833b7bed..00000000000 --- a/res/images/preferences/ic_preferences_library.svg +++ /dev/null @@ -1,538 +0,0 @@ - - - - - - Mixxx 1.12+ iconset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - en - - - image/svg+xml - - Mixxx 1.12+ iconset - - - Mixxx - GUI - Interface - Icons - - - - - s.brandt@mixxx.org - - - - 2014-04-18 - www.mixxx.org - Iconset for use in Mixxx 1.12s+. Optimized for 48px (16px) icon size. Contains icons for preference menu and library widget - -Grid based on suggestions from http://techbase.kde.org/Projects/Oxygen/Style - - en - - - - - - - - - - - - - - - - - diff --git a/res/images/preferences/ic_preferences_lv2.svg b/res/images/preferences/ic_preferences_lv2.svg deleted file mode 100644 index 407f50ed0c6..00000000000 --- a/res/images/preferences/ic_preferences_lv2.svg +++ /dev/null @@ -1,436 +0,0 @@ - - - - - - Mixxx 1.12+ iconset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - en - - - image/svg+xml - - Mixxx 1.12+ iconset - - - Mixxx - GUI - Interface - Icons - - - - - s.brandt@mixxx.org - - - - 2014-04-18 - www.mixxx.org - Iconset for use in Mixxx 1.12s+. Optimized for 48px (16px) icon size. Contains icons for preference menu and library widget - -Grid based on suggestions from http://techbase.kde.org/Projects/Oxygen/Style - - en - - - - - - - - - - diff --git a/res/images/preferences/ic_preferences_midicontrollers.svg b/res/images/preferences/ic_preferences_midicontrollers.svg deleted file mode 100644 index 4bda7004c96..00000000000 --- a/res/images/preferences/ic_preferences_midicontrollers.svg +++ /dev/null @@ -1,560 +0,0 @@ - - - - - - Mixxx 1.12+ iconset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - en - - - image/svg+xml - - Mixxx 1.12+ iconset - - - Mixxx - GUI - Interface - Icons - - - - - s.brandt@mixxx.org - - - - 2014-04-18 - www.mixxx.org - Iconset for use in Mixxx 1.12s+. Optimized for 48px (16px) icon size. Contains icons for preference menu and library widget - -Grid based on suggestions from http://techbase.kde.org/Projects/Oxygen/Style - - en - - - - - - - - - - - - - - - - - - - - - diff --git a/res/images/preferences/ic_preferences_modplug.svg b/res/images/preferences/ic_preferences_modplug.svg deleted file mode 100644 index 694e005d6cf..00000000000 --- a/res/images/preferences/ic_preferences_modplug.svg +++ /dev/null @@ -1,503 +0,0 @@ - - - - - - Mixxx 1.12+ iconset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - en - - - image/svg+xml - - Mixxx 1.12+ iconset - - - Mixxx - GUI - Interface - Icons - - - - - s.brandt@mixxx.org - - - - 2014-04-18 - www.mixxx.org - Iconset for use in Mixxx 1.12s+. Optimized for 48px (16px) icon size. Contains icons for preference menu and library widget - -Grid based on suggestions from http://techbase.kde.org/Projects/Oxygen/Style - - en - - - - - - - - - - - - - - - - - - diff --git a/res/images/preferences/ic_preferences_recording.svg b/res/images/preferences/ic_preferences_recording.svg deleted file mode 100644 index 1a3a1979f82..00000000000 --- a/res/images/preferences/ic_preferences_recording.svg +++ /dev/null @@ -1,438 +0,0 @@ - - - - - - Mixxx 1.12+ iconset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - en - - - image/svg+xml - - Mixxx 1.12+ iconset - - - Mixxx - GUI - Interface - Icons - - - - - s.brandt@mixxx.org - - - - 2014-04-18 - www.mixxx.org - Iconset for use in Mixxx 1.12s+. Optimized for 48px (16px) icon size. Contains icons for preference menu and library widget - -Grid based on suggestions from http://techbase.kde.org/Projects/Oxygen/Style - - en - - - - - - - - - - diff --git a/res/images/preferences/ic_preferences_replaygain.svg b/res/images/preferences/ic_preferences_replaygain.svg deleted file mode 100644 index af5b92f0b14..00000000000 --- a/res/images/preferences/ic_preferences_replaygain.svg +++ /dev/null @@ -1,610 +0,0 @@ - - - - - - Mixxx 1.12+ iconset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - en - - - image/svg+xml - - Mixxx 1.12+ iconset - - - Mixxx - GUI - Interface - Icons - - - - - s.brandt@mixxx.org - - - - 2014-04-18 - www.mixxx.org - Iconset for use in Mixxx 1.12s+. Optimized for 48px (16px) icon size. Contains icons for preference menu and library widget - -Grid based on suggestions from http://techbase.kde.org/Projects/Oxygen/Style - - en - - - - - - - - - - - - - diff --git a/res/images/preferences/ic_preferences_sampler.svg b/res/images/preferences/ic_preferences_sampler.svg deleted file mode 100644 index ac40c1fc28f..00000000000 --- a/res/images/preferences/ic_preferences_sampler.svg +++ /dev/null @@ -1,606 +0,0 @@ - - - - - - Mixxx 1.12+ iconset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - en - - - image/svg+xml - - Mixxx 1.12+ iconset - - - Mixxx - GUI - Interface - Icons - - - - - s.brandt@mixxx.org - - - - 2014-04-18 - www.mixxx.org - Iconset for use in Mixxx 1.12s+. Optimized for 48px (16px) icon size. Contains icons for preference menu and library widget - -Grid based on suggestions from http://techbase.kde.org/Projects/Oxygen/Style - - en - - - - - - - - - - diff --git a/res/images/preferences/ic_preferences_soundhardware.svg b/res/images/preferences/ic_preferences_soundhardware.svg deleted file mode 100644 index e2b0386a743..00000000000 --- a/res/images/preferences/ic_preferences_soundhardware.svg +++ /dev/null @@ -1,713 +0,0 @@ - - - - - - Mixxx 1.12+ iconset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - en - - - image/svg+xml - - Mixxx 1.12+ iconset - - - Mixxx - GUI - Interface - Icons - - - - - s.brandt@mixxx.org - - - - 2014-04-18 - www.mixxx.org - Iconset for use in Mixxx 1.12s+. Optimized for 48px (16px) icon size. Contains icons for preference menu and library widget - -Grid based on suggestions from http://techbase.kde.org/Projects/Oxygen/Style - - en - - - - - - - - - - - - - - - diff --git a/res/images/preferences/ic_preferences_vinyl.svg b/res/images/preferences/ic_preferences_vinyl.svg deleted file mode 100644 index 78cec69a19d..00000000000 --- a/res/images/preferences/ic_preferences_vinyl.svg +++ /dev/null @@ -1,673 +0,0 @@ - - - - - - Mixxx 1.12+ iconset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - en - - - image/svg+xml - - Mixxx 1.12+ iconset - - - Mixxx - GUI - Interface - Icons - - - - - s.brandt@mixxx.org - - - - 2014-04-18 - www.mixxx.org - Iconset for use in Mixxx 1.12s+. Optimized for 48px (16px) icon size. Contains icons for preference menu and library widget - -Grid based on suggestions from http://techbase.kde.org/Projects/Oxygen/Style - - en - - - - - - - - - - - - - diff --git a/res/images/preferences/ic_preferences_waveforms.svg b/res/images/preferences/ic_preferences_waveforms.svg deleted file mode 100644 index e3954fdc1ca..00000000000 --- a/res/images/preferences/ic_preferences_waveforms.svg +++ /dev/null @@ -1,643 +0,0 @@ - - - - - - Mixxx 1.12+ iconset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - en - - - image/svg+xml - - Mixxx 1.12+ iconset - - - Mixxx - GUI - Interface - Icons - - - - - s.brandt@mixxx.org - - - - 2014-04-18 - www.mixxx.org - Iconset for use in Mixxx 1.12s+. Optimized for 48px (16px) icon size. Contains icons for preference menu and library widget - -Grid based on suggestions from http://techbase.kde.org/Projects/Oxygen/Style - - en - - - - - - - - - - diff --git a/res/images/preferences/light/ic_custom.svg b/res/images/preferences/light/ic_custom.svg new file mode 100644 index 00000000000..0bb9cee123c --- /dev/null +++ b/res/images/preferences/light/ic_custom.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/res/images/preferences/light/ic_mixxx_symbolic.svg b/res/images/preferences/light/ic_mixxx_symbolic.svg new file mode 100644 index 00000000000..968670f7d25 --- /dev/null +++ b/res/images/preferences/light/ic_mixxx_symbolic.svg @@ -0,0 +1,186 @@ + + Mixxx application icon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/res/images/preferences/light/ic_none.svg b/res/images/preferences/light/ic_none.svg new file mode 100644 index 00000000000..680b54637bd --- /dev/null +++ b/res/images/preferences/light/ic_none.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/res/images/preferences/light/ic_preferences_autodj.svg b/res/images/preferences/light/ic_preferences_autodj.svg new file mode 100644 index 00000000000..4d6b4af906b --- /dev/null +++ b/res/images/preferences/light/ic_preferences_autodj.svg @@ -0,0 +1,13 @@ + + Mixxx 1.12+ iconset + + + + + + + + + + + diff --git a/res/images/preferences/light/ic_preferences_bpmdetect.svg b/res/images/preferences/light/ic_preferences_bpmdetect.svg new file mode 100644 index 00000000000..5566885dc8b --- /dev/null +++ b/res/images/preferences/light/ic_preferences_bpmdetect.svg @@ -0,0 +1,7 @@ + + Mixxx 1.12+ iconset + + + + + diff --git a/res/images/preferences/light/ic_preferences_broadcast.svg b/res/images/preferences/light/ic_preferences_broadcast.svg new file mode 100644 index 00000000000..eda9ab0123d --- /dev/null +++ b/res/images/preferences/light/ic_preferences_broadcast.svg @@ -0,0 +1,12 @@ + + Mixxx 1.12+ iconset + + + + + + + + + + diff --git a/res/images/preferences/light/ic_preferences_colors.svg b/res/images/preferences/light/ic_preferences_colors.svg new file mode 100644 index 00000000000..9421215b391 --- /dev/null +++ b/res/images/preferences/light/ic_preferences_colors.svg @@ -0,0 +1,7 @@ + + Mixxx 1.12+ iconset + + + + + diff --git a/res/images/preferences/light/ic_preferences_controllers.svg b/res/images/preferences/light/ic_preferences_controllers.svg new file mode 100644 index 00000000000..8d36f4d0147 --- /dev/null +++ b/res/images/preferences/light/ic_preferences_controllers.svg @@ -0,0 +1,4 @@ + + Mixxx 1.12+ iconset + + diff --git a/res/images/preferences/light/ic_preferences_crossfader.svg b/res/images/preferences/light/ic_preferences_crossfader.svg new file mode 100644 index 00000000000..786128b9256 --- /dev/null +++ b/res/images/preferences/light/ic_preferences_crossfader.svg @@ -0,0 +1,8 @@ + + Mixxx 1.12+ iconset + + + + + + diff --git a/res/images/preferences/light/ic_preferences_decks.svg b/res/images/preferences/light/ic_preferences_decks.svg new file mode 100644 index 00000000000..79b874e6fd4 --- /dev/null +++ b/res/images/preferences/light/ic_preferences_decks.svg @@ -0,0 +1,4 @@ + + Mixxx 1.12+ iconset + + diff --git a/res/images/preferences/light/ic_preferences_effects.svg b/res/images/preferences/light/ic_preferences_effects.svg new file mode 100644 index 00000000000..f3fb6af3872 --- /dev/null +++ b/res/images/preferences/light/ic_preferences_effects.svg @@ -0,0 +1,6 @@ + + Mixxx 1.12+ iconset + + + + diff --git a/res/images/preferences/light/ic_preferences_equalizers.svg b/res/images/preferences/light/ic_preferences_equalizers.svg new file mode 100644 index 00000000000..b9371aad9b2 --- /dev/null +++ b/res/images/preferences/light/ic_preferences_equalizers.svg @@ -0,0 +1,15 @@ + + Mixxx 1.12+ iconset + + + + + + + + + + + + + diff --git a/res/images/preferences/light/ic_preferences_interface.svg b/res/images/preferences/light/ic_preferences_interface.svg new file mode 100644 index 00000000000..cfd48cb57e9 --- /dev/null +++ b/res/images/preferences/light/ic_preferences_interface.svg @@ -0,0 +1,13 @@ + + Mixxx 1.12+ iconset + + + + + + + + + + + diff --git a/res/images/preferences/light/ic_preferences_keydetect.svg b/res/images/preferences/light/ic_preferences_keydetect.svg new file mode 100644 index 00000000000..9afb445fa68 --- /dev/null +++ b/res/images/preferences/light/ic_preferences_keydetect.svg @@ -0,0 +1,8 @@ + + Mixxx 1.12+ iconset + + + + + + diff --git a/res/images/preferences/light/ic_preferences_library.svg b/res/images/preferences/light/ic_preferences_library.svg new file mode 100644 index 00000000000..34abdab3b34 --- /dev/null +++ b/res/images/preferences/light/ic_preferences_library.svg @@ -0,0 +1,14 @@ + + Mixxx 1.12+ iconset + + + + + + + + + + + + diff --git a/res/images/preferences/light/ic_preferences_lv2.svg b/res/images/preferences/light/ic_preferences_lv2.svg new file mode 100644 index 00000000000..9742706279e --- /dev/null +++ b/res/images/preferences/light/ic_preferences_lv2.svg @@ -0,0 +1,4 @@ + + Mixxx 1.12+ iconset + + diff --git a/res/images/preferences/light/ic_preferences_midicontrollers.svg b/res/images/preferences/light/ic_preferences_midicontrollers.svg new file mode 100644 index 00000000000..68f55cbdf9e --- /dev/null +++ b/res/images/preferences/light/ic_preferences_midicontrollers.svg @@ -0,0 +1,13 @@ + + Mixxx 1.12+ iconset + + + + + + + + + + + diff --git a/res/images/preferences/light/ic_preferences_modplug.svg b/res/images/preferences/light/ic_preferences_modplug.svg new file mode 100644 index 00000000000..d684fe09bc4 --- /dev/null +++ b/res/images/preferences/light/ic_preferences_modplug.svg @@ -0,0 +1,12 @@ + + Mixxx 1.12+ iconset + + + + + + + + + + diff --git a/res/images/preferences/light/ic_preferences_recording.svg b/res/images/preferences/light/ic_preferences_recording.svg new file mode 100644 index 00000000000..25fe3a23935 --- /dev/null +++ b/res/images/preferences/light/ic_preferences_recording.svg @@ -0,0 +1,4 @@ + + Mixxx 1.12+ iconset + + diff --git a/res/images/preferences/light/ic_preferences_replaygain.svg b/res/images/preferences/light/ic_preferences_replaygain.svg new file mode 100644 index 00000000000..08c8dfe67ef --- /dev/null +++ b/res/images/preferences/light/ic_preferences_replaygain.svg @@ -0,0 +1,9 @@ + + Mixxx 1.12+ iconset + + + + + + + diff --git a/res/images/preferences/light/ic_preferences_sampler.svg b/res/images/preferences/light/ic_preferences_sampler.svg new file mode 100644 index 00000000000..e0766ac4490 --- /dev/null +++ b/res/images/preferences/light/ic_preferences_sampler.svg @@ -0,0 +1,4 @@ + + Mixxx 1.12+ iconset + + diff --git a/res/images/preferences/light/ic_preferences_soundhardware.svg b/res/images/preferences/light/ic_preferences_soundhardware.svg new file mode 100644 index 00000000000..67fafc3bb87 --- /dev/null +++ b/res/images/preferences/light/ic_preferences_soundhardware.svg @@ -0,0 +1,13 @@ + + Mixxx 1.12+ iconset + + + + + + + + + + + diff --git a/res/images/preferences/light/ic_preferences_vinyl.svg b/res/images/preferences/light/ic_preferences_vinyl.svg new file mode 100644 index 00000000000..7f895e62b89 --- /dev/null +++ b/res/images/preferences/light/ic_preferences_vinyl.svg @@ -0,0 +1,10 @@ + + Mixxx 1.12+ iconset + + + + + + + + diff --git a/res/images/preferences/light/ic_preferences_waveforms.svg b/res/images/preferences/light/ic_preferences_waveforms.svg new file mode 100644 index 00000000000..409e43f0eb5 --- /dev/null +++ b/res/images/preferences/light/ic_preferences_waveforms.svg @@ -0,0 +1,4 @@ + + Mixxx 1.12+ iconset + + diff --git a/res/mixxx.qrc b/res/mixxx.qrc index e2cef8820d5..b73a94d650a 100644 --- a/res/mixxx.qrc +++ b/res/mixxx.qrc @@ -9,6 +9,7 @@ images/library/ic_library_locked_tracklist.svg images/library/cover_default.svg + images/library/ic_library_autodj.svg images/library/ic_library_banshee.svg images/library/ic_library_computer.svg @@ -28,35 +29,60 @@ images/library/ic_library_traktor.svg images/library/ic_library_rekordbox.svg images/library/ic_library_serato.svg - images/mixxx_logo.svg - images/mixxx_icon.svg + + images/mixxx_logo.svg + images/mixxx_icon.svg images/mixxx-icon-logo-symbolic.svg images/skin_preview_placeholder.png images/ic_checkmark.svg - images/ic_custom.svg images/ic_delete.svg - images/ic_mixxx_symbolic.svg - images/ic_none.svg - images/preferences/ic_preferences_autodj.svg - images/preferences/ic_preferences_bpmdetect.svg - images/preferences/ic_preferences_broadcast.svg - images/preferences/ic_preferences_colors.svg - images/preferences/ic_preferences_controllers.svg - images/preferences/ic_preferences_crossfader.svg - images/preferences/ic_preferences_decks.svg - images/preferences/ic_preferences_effects.svg - images/preferences/ic_preferences_equalizers.svg - images/preferences/ic_preferences_interface.svg - images/preferences/ic_preferences_keydetect.svg - images/preferences/ic_preferences_library.svg - images/preferences/ic_preferences_lv2.svg - images/preferences/ic_preferences_modplug.svg - images/preferences/ic_preferences_recording.svg - images/preferences/ic_preferences_replaygain.svg - images/preferences/ic_preferences_soundhardware.svg - images/preferences/ic_preferences_vinyl.svg + + images/preferences/dark/ic_preferences_autodj.svg + images/preferences/dark/ic_preferences_bpmdetect.svg + images/preferences/dark/ic_preferences_broadcast.svg + images/preferences/dark/ic_preferences_colors.svg + images/preferences/dark/ic_preferences_controllers.svg + images/preferences/dark/ic_preferences_crossfader.svg + images/preferences/dark/ic_preferences_decks.svg + images/preferences/dark/ic_preferences_effects.svg + images/preferences/dark/ic_preferences_equalizers.svg + images/preferences/dark/ic_preferences_interface.svg + images/preferences/dark/ic_preferences_keydetect.svg + images/preferences/dark/ic_preferences_library.svg + images/preferences/dark/ic_preferences_lv2.svg + images/preferences/dark/ic_preferences_modplug.svg + images/preferences/dark/ic_preferences_recording.svg + images/preferences/dark/ic_preferences_replaygain.svg + images/preferences/dark/ic_preferences_soundhardware.svg + images/preferences/dark/ic_preferences_vinyl.svg + images/preferences/dark/ic_preferences_waveforms.svg + images/preferences/dark/ic_custom.svg + images/preferences/dark/ic_mixxx_symbolic.svg + images/preferences/dark/ic_none.svg + + images/preferences/light/ic_preferences_autodj.svg + images/preferences/light/ic_preferences_bpmdetect.svg + images/preferences/light/ic_preferences_broadcast.svg + images/preferences/light/ic_preferences_colors.svg + images/preferences/light/ic_preferences_controllers.svg + images/preferences/light/ic_preferences_crossfader.svg + images/preferences/light/ic_preferences_decks.svg + images/preferences/light/ic_preferences_effects.svg + images/preferences/light/ic_preferences_equalizers.svg + images/preferences/light/ic_preferences_interface.svg + images/preferences/light/ic_preferences_keydetect.svg + images/preferences/light/ic_preferences_library.svg + images/preferences/light/ic_preferences_lv2.svg + images/preferences/light/ic_preferences_modplug.svg + images/preferences/light/ic_preferences_recording.svg + images/preferences/light/ic_preferences_replaygain.svg + images/preferences/light/ic_preferences_soundhardware.svg + images/preferences/light/ic_preferences_vinyl.svg + images/preferences/light/ic_preferences_waveforms.svg + images/preferences/light/ic_custom.svg + images/preferences/light/ic_mixxx_symbolic.svg + images/preferences/light/ic_none.svg images/preferences/ic_preferences_warning.svg - images/preferences/ic_preferences_waveforms.svg schema.xml shaders/filteredsignal.frag shaders/passthrough.vert diff --git a/src/controllers/dlgprefcontroller.cpp b/src/controllers/dlgprefcontroller.cpp index fcff5f53acc..a97f9024b0f 100644 --- a/src/controllers/dlgprefcontroller.cpp +++ b/src/controllers/dlgprefcontroller.cpp @@ -311,15 +311,21 @@ void DlgPrefController::enumeratePresets(const QString& selectedPresetPath) { // qDebug() << "Enumerating presets for controller" << m_pController->getName(); + // Check the text color of the palette for whether to use dark or light icons + QString iconsPath = ":/images/preferences/dark/"; + if (!Color::isDimColor(palette().text().color())) { + iconsPath = ":/images/preferences/light/"; + } + // Insert a dummy item at the top to try to make it less confusing. // (We don't want the first found file showing up as the default item when a // user has their controller plugged in) - QIcon noPresetIcon(":/images/ic_none.svg"); + QIcon noPresetIcon(iconsPath + "ic_none.svg"); m_ui.comboBoxPreset->addItem(noPresetIcon, "No Preset"); PresetInfo match; // Enumerate user presets - QIcon userPresetIcon(":/images/ic_custom.svg"); + QIcon userPresetIcon(iconsPath + "ic_custom.svg"); // Reload user presets to detect added, changed or removed mappings m_pControllerManager->getMainThreadUserPresetEnumerator()->loadSupportedPresets(); @@ -335,7 +341,7 @@ void DlgPrefController::enumeratePresets(const QString& selectedPresetPath) { m_ui.comboBoxPreset->insertSeparator(m_ui.comboBoxPreset->count()); // Enumerate system presets - QIcon systemPresetIcon(":/images/ic_mixxx_symbolic.svg"); + QIcon systemPresetIcon(iconsPath + "ic_mixxx_symbolic.svg"); PresetInfo systemPresetsMatch = enumeratePresetsFromEnumerator( m_pControllerManager->getMainThreadSystemPresetEnumerator(), systemPresetIcon); diff --git a/src/preferences/dialog/dlgpreferences.cpp b/src/preferences/dialog/dlgpreferences.cpp index 3872e2bd8a3..2906edab53d 100644 --- a/src/preferences/dialog/dlgpreferences.cpp +++ b/src/preferences/dialog/dlgpreferences.cpp @@ -50,6 +50,7 @@ #include "library/trackcollectionmanager.h" #include "mixxx.h" #include "skin/skinloader.h" +#include "util/color/color.h" #include "util/widgethelper.h" DlgPreferences::DlgPreferences(MixxxMainWindow * mixxx, SkinLoader* pSkinLoader, @@ -78,8 +79,15 @@ DlgPreferences::DlgPreferences(MixxxMainWindow * mixxx, SkinLoader* pSkinLoader, } // Construct widgets for use in tabs: + // * check the text color of the palette for whether to use dark or light icons // * create the tree view button first (important for 'Controllers' page!) // * instantiate preferences page + QString iconsColor = "dark/"; + if (!Color::isDimColor(palette().text().color())) { + iconsColor = QStringLiteral("light/"); + } + m_iconsPath = ":/images/preferences/" + iconsColor; + m_pSoundButton = new QTreeWidgetItem(contentsTreeWidget, QTreeWidgetItem::Type); m_soundPage = new DlgPrefSound(this, soundman, m_pConfig); addPageWidget(m_soundPage, @@ -443,7 +451,7 @@ void DlgPreferences::addPageWidget(DlgPreferencePage* pWidget, const QString& pageTitle, const QString& iconFile) { // Configure the tree button linked to the page - treeItem->setIcon(0, QIcon(":/images/preferences/ic_preferences_" + iconFile)); + treeItem->setIcon(0, QIcon(m_iconsPath + "ic_preferences_" + iconFile)); treeItem->setText(0, pageTitle); treeItem->setTextAlignment(0, Qt::AlignLeft | Qt::AlignVCenter); treeItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); @@ -458,7 +466,7 @@ void DlgPreferences::addPageWidget(DlgPreferencePage* pWidget, pWidget, &DlgPreferencePage::slotResetToDefaults); - // Add a new scroll area containing the page to the stacked pages widget + // Add a new scroll area to the stacked pages widget containing the page QScrollArea* sa = new QScrollArea(pagesWidget); sa->setWidgetResizable(true); sa->setWidget(pWidget); diff --git a/src/preferences/dialog/dlgpreferences.h b/src/preferences/dialog/dlgpreferences.h index 55b5dac480e..805f09c23f9 100644 --- a/src/preferences/dialog/dlgpreferences.h +++ b/src/preferences/dialog/dlgpreferences.h @@ -150,4 +150,6 @@ class DlgPreferences : public QDialog, public Ui::DlgPreferencesDlg { #endif /* __MODPLUG__ */ QSize m_pageSizeHint; + + QString m_iconsPath; };