From ae1915e2dc7871d7c33c833df7c3acbb556c8bb3 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Mon, 23 Sep 2019 22:28:46 +0200 Subject: [PATCH 01/30] parent right-lick menu to WSidebar in History & Computer feature --- src/library/browse/browsefeature.cpp | 29 +++++++++++++++----- src/library/browse/browsefeature.h | 6 ++++ src/library/library.cpp | 19 +++++++------ src/library/library.h | 3 ++ src/library/setlogfeature.cpp | 41 ++++++++++++++++++---------- src/library/setlogfeature.h | 4 +++ 6 files changed, 73 insertions(+), 29 deletions(-) diff --git a/src/library/browse/browsefeature.cpp b/src/library/browse/browsefeature.cpp index b5757e226b4..7af8d8242f9 100644 --- a/src/library/browse/browsefeature.cpp +++ b/src/library/browse/browsefeature.cpp @@ -17,6 +17,7 @@ #include "library/trackcollection.h" #include "widget/wlibrarytextbrowser.h" #include "widget/wlibrary.h" +#include "widget/wlibrarysidebar.h" #include "controllers/keyboard/keyboardeventfilter.h" #include "util/sandbox.h" #include "util/memory.h" @@ -33,6 +34,7 @@ BrowseFeature::BrowseFeature(QObject* parent, m_proxyModel(&m_browseModel), m_pTrackCollection(pTrackCollection), m_pLastRightClickedItem(NULL), + m_pSidebarWidget(NULL), m_icon(":/images/library/ic_library_computer.svg") { connect(this, SIGNAL(requestAddDir(QString)), parent, SLOT(slotRequestAddDir(QString))); @@ -216,6 +218,10 @@ void BrowseFeature::bindWidget(WLibrary* libraryWidget, libraryWidget->registerView("BROWSEHOME", edit); } +void BrowseFeature::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) { + m_pSidebarWidget = pSidebarWidget; +} + void BrowseFeature::activate() { emit(switchToView("BROWSEHOME")); emit disableSearch(); @@ -252,6 +258,11 @@ void BrowseFeature::activateChild(const QModelIndex& index) { } void BrowseFeature::onRightClickChild(const QPoint& globalPos, QModelIndex index) { + // Create the right-click menu and parent it to the sidebar widget in + // order to make it stylable with skin stylesheet rather than ugly OS styling. + // Parent to default NULL if there's no sidebar widget. + m_pMenu = new QMenu(m_pSidebarWidget); + TreeItem *item = static_cast(index.internalPointer()); m_pLastRightClickedItem = item; @@ -265,23 +276,27 @@ void BrowseFeature::onRightClickChild(const QPoint& globalPos, QModelIndex index return; } - QMenu menu(NULL); if (item->parent()->getData().toString() == QUICK_LINK_NODE) { - menu.addAction(m_pRemoveQuickLinkAction); - menu.exec(globalPos); + m_pMenu->addAction(m_pRemoveQuickLinkAction); + m_pMenu->exec(globalPos); onLazyChildExpandation(index); return; } foreach (const QString& str, m_quickLinkList) { if (str == path) { - return; + // if path is a QuickLink: + // show remove action + m_pMenu->addAction(m_pRemoveQuickLinkAction); + m_pMenu->exec(globalPos); + onLazyChildExpandation(index); + return; } } - menu.addAction(m_pAddQuickLinkAction); - menu.addAction(m_pAddtoLibraryAction); - menu.exec(globalPos); + m_pMenu->addAction(m_pAddQuickLinkAction); + m_pMenu->addAction(m_pAddtoLibraryAction); + m_pMenu->popup(globalPos); onLazyChildExpandation(index); } diff --git a/src/library/browse/browsefeature.h b/src/library/browse/browsefeature.h index a4146147593..ec51a32cac0 100644 --- a/src/library/browse/browsefeature.h +++ b/src/library/browse/browsefeature.h @@ -12,6 +12,7 @@ #include #include #include +#include #include "preferences/usersettings.h" #include "library/browse/browsetablemodel.h" @@ -19,6 +20,8 @@ #include "library/libraryfeature.h" #include "library/proxytrackmodel.h" +// Supress the tooltips for root items +// "QuickLinks", "::mixxx_device_node::" #define QUICK_LINK_NODE "::mixxx_quick_lnk_node::" #define DEVICE_NODE "::mixxx_device_node::" @@ -38,6 +41,7 @@ class BrowseFeature : public LibraryFeature { void bindWidget(WLibrary* libraryWidget, KeyboardEventFilter* keyboard); + void bindSidebarWidget(WLibrarySidebar* pSidebarWidget); TreeItemModel* getChildModel(); @@ -75,6 +79,8 @@ class BrowseFeature : public LibraryFeature { TreeItem* m_pLastRightClickedItem; TreeItem* m_pQuickLinkItem; QStringList m_quickLinkList; + WLibrarySidebar* m_pSidebarWidget; + QMenu *m_pMenu; QIcon m_icon; }; diff --git a/src/library/library.cpp b/src/library/library.cpp index d95416941dc..092cc54fb43 100644 --- a/src/library/library.cpp +++ b/src/library/library.cpp @@ -16,7 +16,6 @@ #include "library/sidebarmodel.h" #include "library/trackcollection.h" #include "library/trackmodel.h" -#include "library/browse/browsefeature.h" #include "library/crate/cratefeature.h" #include "library/rhythmbox/rhythmboxfeature.h" #include "library/banshee/bansheefeature.h" @@ -73,6 +72,8 @@ Library::Library( m_pLibraryControl(new LibraryControl(this)), m_pMixxxLibraryFeature(nullptr), m_pPlaylistFeature(nullptr), + m_pSetlogFeature(nullptr), + m_pBrowseFeature(nullptr), m_pCrateFeature(nullptr), m_pAnalysisFeature(nullptr), m_scanner(pDbConnectionPool, m_pTrackCollection, pConfig) { @@ -113,18 +114,18 @@ Library::Library( addFeature(m_pPlaylistFeature); m_pCrateFeature = new CrateFeature(this, m_pTrackCollection, m_pConfig); addFeature(m_pCrateFeature); - BrowseFeature* browseFeature = new BrowseFeature( + m_pBrowseFeature = new BrowseFeature( this, pConfig, m_pTrackCollection, pRecordingManager); - connect(browseFeature, SIGNAL(scanLibrary()), + connect(m_pBrowseFeature, SIGNAL(scanLibrary()), &m_scanner, SLOT(scan())); connect(&m_scanner, SIGNAL(scanStarted()), - browseFeature, SLOT(slotLibraryScanStarted())); + m_pBrowseFeature, SLOT(slotLibraryScanStarted())); connect(&m_scanner, SIGNAL(scanFinished()), - browseFeature, SLOT(slotLibraryScanFinished())); - - addFeature(browseFeature); + m_pBrowseFeature, SLOT(slotLibraryScanFinished())); + addFeature(m_pBrowseFeature); addFeature(new RecordingFeature(this, pConfig, m_pTrackCollection, pRecordingManager)); - addFeature(new SetlogFeature(this, pConfig, m_pTrackCollection)); + m_pSetlogFeature = new SetlogFeature(this, pConfig, m_pTrackCollection); + addFeature(m_pSetlogFeature); m_pAnalysisFeature = new AnalysisFeature(this, pConfig); connect(m_pPlaylistFeature, &PlaylistFeature::analyzeTracks, @@ -240,6 +241,8 @@ void Library::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) { pSidebarWidget->slotSetFont(m_trackTableFont); connect(this, SIGNAL(setTrackTableFont(QFont)), pSidebarWidget, SLOT(slotSetFont(QFont))); + m_pSetlogFeature->bindSidebarWidget(pSidebarWidget); + m_pBrowseFeature->bindSidebarWidget(pSidebarWidget); } void Library::bindWidget(WLibrary* pLibraryWidget, diff --git a/src/library/library.h b/src/library/library.h index fa686a1406f..d6acdcd201b 100644 --- a/src/library/library.h +++ b/src/library/library.h @@ -18,6 +18,7 @@ #include "analysisfeature.h" #include "library/coverartcache.h" #include "library/setlogfeature.h" +#include "library/browse/browsefeature.h" #include "library/scanner/libraryscanner.h" #include "util/db/dbconnectionpool.h" @@ -153,6 +154,8 @@ class Library: public QObject, MixxxLibraryFeature* m_pMixxxLibraryFeature; PlaylistFeature* m_pPlaylistFeature; CrateFeature* m_pCrateFeature; + SetlogFeature* m_pSetlogFeature; + BrowseFeature* m_pBrowseFeature; AnalysisFeature* m_pAnalysisFeature; LibraryScanner m_scanner; QFont m_trackTableFont; diff --git a/src/library/setlogfeature.cpp b/src/library/setlogfeature.cpp index 4ec518bab01..58d9e3d552b 100644 --- a/src/library/setlogfeature.cpp +++ b/src/library/setlogfeature.cpp @@ -1,6 +1,6 @@ #include -#include #include +#include #include "library/setlogfeature.h" @@ -12,6 +12,7 @@ #include "mixer/playermanager.h" #include "widget/wtracktableview.h" #include "widget/wlibrary.h" +#include "widget/wlibrarysidebar.h" SetlogFeature::SetlogFeature(QObject* parent, UserSettingsPointer pConfig, @@ -19,6 +20,7 @@ SetlogFeature::SetlogFeature(QObject* parent, : BasePlaylistFeature(parent, pConfig, pTrackCollection, "SETLOGHOME"), m_playlistId(-1), m_libraryWidget(nullptr), + m_pSidebarWidget(NULL), m_icon(":/images/library/ic_library_history.svg") { m_pPlaylistTableModel = new PlaylistTableModel(this, pTrackCollection, "mixxx.db.model.setlog", @@ -68,6 +70,10 @@ void SetlogFeature::bindWidget(WLibrary* libraryWidget, } +void SetlogFeature::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) { + m_pSidebarWidget = pSidebarWidget; +} + void SetlogFeature::onRightClick(const QPoint& globalPos) { Q_UNUSED(globalPos); m_lastRightClickedIndex = QModelIndex(); @@ -80,11 +86,19 @@ void SetlogFeature::onRightClick(const QPoint& globalPos) { } void SetlogFeature::onRightClickChild(const QPoint& globalPos, QModelIndex index) { + // Create the right-click menu and parent it to the sidebar widget in + // order to make it stylable with skin stylesheet rather than ugly OS styling. + // Parent to default NULL if there's no sidebar widget. + m_pMenu = new QMenu(m_pSidebarWidget); + //Save the model index so we can get it in the action slots... m_lastRightClickedIndex = index; QString playlistName = index.data().toString(); int playlistId = m_playlistDao.getPlaylistIdFromName(playlistName); + m_pMenu->clear(); + qDebug()<<" m_pMenu->clear()"; + qDebug()<<""; bool locked = m_playlistDao.isPlaylistLocked(playlistId); m_pDeletePlaylistAction->setEnabled(!locked); @@ -93,30 +107,29 @@ void SetlogFeature::onRightClickChild(const QPoint& globalPos, QModelIndex index m_pLockPlaylistAction->setText(locked ? tr("Unlock") : tr("Lock")); - - //Create the right-click menu - QMenu menu(NULL); //menu.addAction(m_pCreatePlaylistAction); //menu.addSeparator(); - menu.addAction(m_pAddToAutoDJAction); - menu.addAction(m_pAddToAutoDJTopAction); - menu.addAction(m_pRenamePlaylistAction); + m_pMenu->addAction(m_pAddToAutoDJAction); + m_pMenu->addAction(m_pAddToAutoDJTopAction); + m_pMenu->addSeparator(); + m_pMenu->addAction(m_pRenamePlaylistAction); if (playlistId != m_playlistId) { // Todays playlist should not be locked or deleted - menu.addAction(m_pDeletePlaylistAction); - menu.addAction(m_pLockPlaylistAction); + m_pMenu->addAction(m_pDeletePlaylistAction); + m_pMenu->addAction(m_pLockPlaylistAction); } if (index.row() > 0) { // The very first setlog cannot be joint - menu.addAction(m_pJoinWithPreviousAction); + m_pMenu->addAction(m_pJoinWithPreviousAction); } if (playlistId == m_playlistId && m_playlistDao.tracksInPlaylist(m_playlistId) != 0) { // Todays playlists can change ! - menu.addAction(m_pGetNewPlaylist); + m_pMenu->addAction(m_pGetNewPlaylist); } - menu.addSeparator(); - menu.addAction(m_pExportPlaylistAction); - menu.exec(globalPos); + m_pMenu->addSeparator(); + m_pMenu->addAction(m_pExportPlaylistAction); + + m_pMenu->popup(globalPos); } QList SetlogFeature::createPlaylistLabels() { diff --git a/src/library/setlogfeature.h b/src/library/setlogfeature.h index fb460e52246..52c3805a350 100644 --- a/src/library/setlogfeature.h +++ b/src/library/setlogfeature.h @@ -6,6 +6,7 @@ #include #include #include +#include #include "library/baseplaylistfeature.h" #include "preferences/usersettings.h" @@ -25,6 +26,7 @@ class SetlogFeature : public BasePlaylistFeature { virtual void bindWidget(WLibrary* libraryWidget, KeyboardEventFilter* keyboard); + virtual void bindSidebarWidget(WLibrarySidebar* pSidebarWidget); public slots: void onRightClick(const QPoint& globalPos); @@ -51,7 +53,9 @@ class SetlogFeature : public BasePlaylistFeature { QAction* m_pGetNewPlaylist; int m_playlistId; WLibrary* m_libraryWidget; + WLibrarySidebar* m_pSidebarWidget; QIcon m_icon; + QMenu *m_pMenu; }; #endif // SETLOGFEATURE_H From ab68f4613ff5cf4ba3bcaf68ca22ee886f06ff2f Mon Sep 17 00:00:00 2001 From: ronso0 Date: Mon, 23 Sep 2019 22:29:38 +0200 Subject: [PATCH 02/30] add skin styles for right-click menus (Tracks, sidebar, hotcues, cover art) --- res/skins/LateNight/style.qss | 56 +++++++++++++++++++++++++++++++++-- res/skins/Tango/style.qss | 55 ++++++++++++++++++++++++++++++++-- 2 files changed, 105 insertions(+), 6 deletions(-) diff --git a/res/skins/LateNight/style.qss b/res/skins/LateNight/style.qss index 0e00d601f0c..f65a324931a 100644 --- a/res/skins/LateNight/style.qss +++ b/res/skins/LateNight/style.qss @@ -1625,6 +1625,7 @@ QTableView::indicator {/* border: 1px solid #888; } + /* Entire BPM cell */ /* Lock icon at the left */ #LibraryBPMButton::indicator:checked { @@ -1669,6 +1670,10 @@ QTableView::indicator {/* border: 0px; border-radius: 2px; */ } + /* remove OS focus indicator from BPM cell */ + WLibrary QCheckBox { + outline: none; + } /* Button in library "Preview" column */ #LibraryPreviewButton {/* @@ -1982,10 +1987,55 @@ QTreeView::branch:open:has-children:has-siblings:selected { background-color: #151515; } -QToolTip { +QToolTip, +QMenu { background-color: #0f0f0f; color: #cfb32c; padding: 3px; - border: 1px solid #333; + border: 1px solid #888; border-radius: 2px; -} + } + QMenu::separator { + height: 0px; + border-top: 1px solid #000; + border-bottom: 1px solid #222; + margin: 4px 1px 4px 1px; + margin-left: 4px; + margin-right: 4px; + } + /* actually this only needs to be set for QCheckBox */ + QMenu::item, + QMenu QCheckBox { + color: #cfb32c; + border: none; + background: none; + margin: 0px; + } + QMenu::item { + padding: 5px 10px 5px 17px; + } + QMenu QCheckBox { + padding: 2px 10px 2px 3px; + } + QMenu::item:selected, + QMenu QCheckBox:selected, + QMenu QCheckBox:focus, /* selected by keyboard */ + QMenu QCheckBox:hover /* mouse hover */ { + background-color: #5E4507; + color: white; + /* remove OS focus indicator */ + outline: none; + } + QMenu QCheckBox::indicator { + width: 13px; + height: 13px; + background-color: #0f0f0f; + border: 1px solid #333; + border-radius: 1px; + /* remove OS focus indicator */ + outline: none; + } + QMenu QCheckBox::indicator:checked { + image: url(skin:/buttons/btn_lib_checkmark.svg); + border: 1px solid #0f0f0f; + } diff --git a/res/skins/Tango/style.qss b/res/skins/Tango/style.qss index e1c9244fc16..1cb0ed509e4 100644 --- a/res/skins/Tango/style.qss +++ b/res/skins/Tango/style.qss @@ -2083,11 +2083,56 @@ WTrackProperty#SamplerTitle_mini { ###### Misc ################################################## ##############################################################*/ -QToolTip { +QToolTip, +QMenu { background-color: #1e1e1e; color: #ccc; - border: 1px solid #333; -} + padding: 2px; + border: 1px solid #888; + border-radius: 0px; + } + QMenu::separator { + height: 0px; + border-top: 1px solid #111; + border-bottom: 1px solid #222; + margin: 1px 4px 1px 4px; + } + /* actually this only needs to be set for QCheckBox */ + QMenu::item, + QMenu QCheckBox { + color: #ccc; + border: none; + background: none; + margin: 0px; + } + QMenu::item { + padding: 5px 10px 5px 17px; + } + QMenu QCheckBox { + padding: 2px 10px 2px 3px; + } + QMenu::item:selected, + QMenu QCheckBox:selected, + QMenu QCheckBox:focus, /* selected by keyboard */ + QMenu QCheckBox:hover /* mouse hover */ { + background-color: #555; + color: white; + /* remove OS focus indicator */ + outline: none; + } + QMenu QCheckBox::indicator { + width: 13px; + height: 13px; + background-color: #0f0f0f; + border: 1px solid #333; + border-radius: 1px; + /* remove OS focus indicator */ + outline: none; + } + QMenu QCheckBox::indicator:checked { + image: url(skin:/buttons/btn_lib_checkmark.svg); + border: 1px solid #1e1e1e; + } #TEST { background-color: #451278; @@ -2541,6 +2586,10 @@ WLibrary QPushButton { border: 0px; border-radius: 2px; */ } + /* remove OS focus indicator from BPM cell */ + WLibrary QCheckBox { + outline: none; + } /* Button in library "Preview" column */ #LibraryPreviewButton { From e664f732bceb9ffbb8eaf336ea353d3aa81a34cb Mon Sep 17 00:00:00 2001 From: ronso0 Date: Mon, 23 Sep 2019 22:30:22 +0200 Subject: [PATCH 03/30] allow to override OS style of Crates submenu in Tracks table --- src/widget/wtracktableview.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/widget/wtracktableview.cpp b/src/widget/wtracktableview.cpp index f6a9323e40a..b5504298593 100644 --- a/src/widget/wtracktableview.cpp +++ b/src/widget/wtracktableview.cpp @@ -1644,11 +1644,14 @@ void WTrackTableView::slotPopulateCrateMenu() { // with the mouse, but not with the keyboard. :focus works for the // keyboard but with the mouse, the last clicked item keeps the style // after the mouse cursor is moved to hover over another item. - pCheckBox->setStyleSheet( - QString("QCheckBox {color: %1;}").arg( - pCheckBox->palette().text().color().name()) + "\n" + - QString("QCheckBox:hover {background-color: %1;}").arg( - pCheckBox->palette().highlight().color().name())); + + // ronso0 Disabling this stylesheet allows to override the OS style + // of the :hover and :focus state. +// pCheckBox->setStyleSheet( +// QString("QCheckBox {color: %1;}").arg( +// pCheckBox->palette().text().color().name()) + "\n" + +// QString("QCheckBox:hover {background-color: %1;}").arg( +// pCheckBox->palette().highlight().color().name())); pAction->setEnabled(!crate.isLocked()); pAction->setDefaultWidget(pCheckBox.get()); From d662aad0f8d6616412188341364c0427870dbe8a Mon Sep 17 00:00:00 2001 From: ronso0 Date: Tue, 24 Sep 2019 01:53:05 +0200 Subject: [PATCH 04/30] remove duplicate include QMenu --- src/library/browse/browsefeature.cpp | 1 - src/library/setlogfeature.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/src/library/browse/browsefeature.cpp b/src/library/browse/browsefeature.cpp index 7af8d8242f9..2b9a19e3db5 100644 --- a/src/library/browse/browsefeature.cpp +++ b/src/library/browse/browsefeature.cpp @@ -8,7 +8,6 @@ #include #include #include -#include #include #include "track/track.h" diff --git a/src/library/setlogfeature.cpp b/src/library/setlogfeature.cpp index 58d9e3d552b..8a65aa68303 100644 --- a/src/library/setlogfeature.cpp +++ b/src/library/setlogfeature.cpp @@ -1,6 +1,5 @@ #include #include -#include #include "library/setlogfeature.h" From 5a58e9dabb4bcab62022ab79ae56cd211335b493 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Tue, 24 Sep 2019 16:45:32 +0200 Subject: [PATCH 05/30] LateNight: add custom submenu arrow --- res/skins/LateNight/style.qss | 45 ++++++++++++++++-------- res/skins/LateNight/style/menu_arrow.svg | 1 + 2 files changed, 31 insertions(+), 15 deletions(-) create mode 100644 res/skins/LateNight/style/menu_arrow.svg diff --git a/res/skins/LateNight/style.qss b/res/skins/LateNight/style.qss index f65a324931a..544f20379ac 100644 --- a/res/skins/LateNight/style.qss +++ b/res/skins/LateNight/style.qss @@ -1720,21 +1720,6 @@ QHeaderView { stop:1 #0f0f0f); } -QHeaderView::up-arrow, -QHeaderView::down-arrow { - background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #585858, stop:1 #0f0f0f); - width: 12px; - padding-left: 3px; - padding-right: 3px; - border-right: 1px solid #585858; - } - QHeaderView::up-arrow { - image: url(skin:/style/btn_lib_sort_up.png); - } - QHeaderView::down-arrow { - image: url(skin:/style/btn_lib_sort_down.png); - } - /* QScrollBar styling is even harder */ @@ -2039,3 +2024,33 @@ QMenu { image: url(skin:/buttons/btn_lib_checkmark.svg); border: 1px solid #0f0f0f; } + + QHeaderView::up-arrow, + QHeaderView::down-arrow { + background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #585858, stop:1 #0f0f0f); + width: 12px; + padding-left: 3px; + padding-right: 3px; + border-right: 1px solid #585858; + } + QHeaderView::up-arrow { + image: url(skin:/style/btn_lib_sort_up.png); + } + QHeaderView::down-arrow { + image: url(skin:/style/btn_lib_sort_down.png); + } + QHeaderView QMenu::indicator { + width: 10px; + height: 10px; + margin-left: 2px; + border: none; + background: none; + } + QHeaderView QMenu::indicator:checked { + image: url(skin:/buttons/btn_lib_checkmark.svg); + } + QMenu::right-arrow { + width: 10px; + height: 10px; + image: url(skin:/style/menu_arrow.svg); + } diff --git a/res/skins/LateNight/style/menu_arrow.svg b/res/skins/LateNight/style/menu_arrow.svg new file mode 100644 index 00000000000..77ed7d26c1b --- /dev/null +++ b/res/skins/LateNight/style/menu_arrow.svg @@ -0,0 +1 @@ + From c8ab2cc3f023b09b6e7305c2f805c3b8fc32ea7a Mon Sep 17 00:00:00 2001 From: ronso0 Date: Tue, 24 Sep 2019 17:24:59 +0200 Subject: [PATCH 06/30] use nullptr, add/move m_pMenu->clear() --- src/library/browse/browsefeature.cpp | 3 ++- src/library/setlogfeature.cpp | 5 +---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/library/browse/browsefeature.cpp b/src/library/browse/browsefeature.cpp index 2b9a19e3db5..c41da6b23a4 100644 --- a/src/library/browse/browsefeature.cpp +++ b/src/library/browse/browsefeature.cpp @@ -33,7 +33,7 @@ BrowseFeature::BrowseFeature(QObject* parent, m_proxyModel(&m_browseModel), m_pTrackCollection(pTrackCollection), m_pLastRightClickedItem(NULL), - m_pSidebarWidget(NULL), + m_pSidebarWidget(nullptr), m_icon(":/images/library/ic_library_computer.svg") { connect(this, SIGNAL(requestAddDir(QString)), parent, SLOT(slotRequestAddDir(QString))); @@ -261,6 +261,7 @@ void BrowseFeature::onRightClickChild(const QPoint& globalPos, QModelIndex index // order to make it stylable with skin stylesheet rather than ugly OS styling. // Parent to default NULL if there's no sidebar widget. m_pMenu = new QMenu(m_pSidebarWidget); + m_pMenu->clear(); TreeItem *item = static_cast(index.internalPointer()); m_pLastRightClickedItem = item; diff --git a/src/library/setlogfeature.cpp b/src/library/setlogfeature.cpp index 8a65aa68303..9374430a752 100644 --- a/src/library/setlogfeature.cpp +++ b/src/library/setlogfeature.cpp @@ -89,16 +89,13 @@ void SetlogFeature::onRightClickChild(const QPoint& globalPos, QModelIndex index // order to make it stylable with skin stylesheet rather than ugly OS styling. // Parent to default NULL if there's no sidebar widget. m_pMenu = new QMenu(m_pSidebarWidget); + m_pMenu->clear(); //Save the model index so we can get it in the action slots... m_lastRightClickedIndex = index; QString playlistName = index.data().toString(); int playlistId = m_playlistDao.getPlaylistIdFromName(playlistName); - m_pMenu->clear(); - qDebug()<<" m_pMenu->clear()"; - qDebug()<<""; - bool locked = m_playlistDao.isPlaylistLocked(playlistId); m_pDeletePlaylistAction->setEnabled(!locked); m_pRenamePlaylistAction->setEnabled(!locked); From ad518b19eecab7804b0d0dc9f2890b0b4f56e578 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Fri, 4 Oct 2019 15:07:37 +0200 Subject: [PATCH 07/30] creat QMenu only once when the sidebarwidget is bound to library --- src/library/browse/browsefeature.cpp | 8 ++++---- src/library/setlogfeature.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/library/browse/browsefeature.cpp b/src/library/browse/browsefeature.cpp index c41da6b23a4..df581b2d74e 100644 --- a/src/library/browse/browsefeature.cpp +++ b/src/library/browse/browsefeature.cpp @@ -219,6 +219,10 @@ void BrowseFeature::bindWidget(WLibrary* libraryWidget, void BrowseFeature::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) { m_pSidebarWidget = pSidebarWidget; + // Create the right-click menu and parent it to the sidebar widget in + // order to make it stylable with skin stylesheet rather than ugly OS styling. + // Parent to default NULL if there's no sidebar widget. + m_pMenu = new QMenu(m_pSidebarWidget); } void BrowseFeature::activate() { @@ -257,10 +261,6 @@ void BrowseFeature::activateChild(const QModelIndex& index) { } void BrowseFeature::onRightClickChild(const QPoint& globalPos, QModelIndex index) { - // Create the right-click menu and parent it to the sidebar widget in - // order to make it stylable with skin stylesheet rather than ugly OS styling. - // Parent to default NULL if there's no sidebar widget. - m_pMenu = new QMenu(m_pSidebarWidget); m_pMenu->clear(); TreeItem *item = static_cast(index.internalPointer()); diff --git a/src/library/setlogfeature.cpp b/src/library/setlogfeature.cpp index 9374430a752..b99ad117888 100644 --- a/src/library/setlogfeature.cpp +++ b/src/library/setlogfeature.cpp @@ -71,6 +71,10 @@ void SetlogFeature::bindWidget(WLibrary* libraryWidget, void SetlogFeature::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) { m_pSidebarWidget = pSidebarWidget; + // Create the right-click menu and parent it to the sidebar widget in + // order to make it stylable with skin stylesheet rather than ugly OS styling. + // Parent to default NULL if there's no sidebar widget. + m_pMenu = new QMenu(m_pSidebarWidget); } void SetlogFeature::onRightClick(const QPoint& globalPos) { @@ -85,10 +89,6 @@ void SetlogFeature::onRightClick(const QPoint& globalPos) { } void SetlogFeature::onRightClickChild(const QPoint& globalPos, QModelIndex index) { - // Create the right-click menu and parent it to the sidebar widget in - // order to make it stylable with skin stylesheet rather than ugly OS styling. - // Parent to default NULL if there's no sidebar widget. - m_pMenu = new QMenu(m_pSidebarWidget); m_pMenu->clear(); //Save the model index so we can get it in the action slots... From 2dc6126727b9ed92fd78a265de5d2330c0fd6265 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Fri, 4 Oct 2019 18:22:58 +0200 Subject: [PATCH 08/30] add AutoDJ, Playlists and Crates feature --- src/library/autodj/autodjfeature.cpp | 7 ++++ src/library/autodj/autodjfeature.h | 2 ++ src/library/browse/browsefeature.cpp | 8 ++--- src/library/crate/cratefeature.cpp | 50 ++++++++++++++------------ src/library/crate/cratefeature.h | 4 +++ src/library/library.cpp | 13 ++++--- src/library/library.h | 3 +- src/library/playlistfeature.cpp | 53 +++++++++++++++------------- src/library/playlistfeature.h | 4 +++ src/library/setlogfeature.cpp | 5 +-- 10 files changed, 88 insertions(+), 61 deletions(-) diff --git a/src/library/autodj/autodjfeature.cpp b/src/library/autodj/autodjfeature.cpp index 3ec62d7d6ba..c348a52451e 100644 --- a/src/library/autodj/autodjfeature.cpp +++ b/src/library/autodj/autodjfeature.cpp @@ -17,6 +17,7 @@ #include "library/treeitem.h" #include "library/crate/cratestorage.h" #include "widget/wlibrary.h" +#include "widget/wlibrarysidebar.h" #include "controllers/keyboard/keyboardeventfilter.h" #include "sources/soundsourceproxy.h" #include "util/dnd.h" @@ -126,6 +127,12 @@ void AutoDJFeature::bindWidget(WLibrary* libraryWidget, this, SLOT(slotAddRandomTrack())); } +void AutoDJFeature::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) { + // Create the right-click menu and parent it to the sidebar widget in + // order to make it stylable with skin stylesheet rather than ugly OS styling. + m_pMenu = new QMenu(pSidebarWidget); +} + TreeItemModel* AutoDJFeature::getChildModel() { return &m_childModel; } diff --git a/src/library/autodj/autodjfeature.h b/src/library/autodj/autodjfeature.h index 559f1856454..8332b0ea80b 100644 --- a/src/library/autodj/autodjfeature.h +++ b/src/library/autodj/autodjfeature.h @@ -45,6 +45,7 @@ class AutoDJFeature : public LibraryFeature { void bindWidget(WLibrary* libraryWidget, KeyboardEventFilter* keyboard); + void bindSidebarWidget(WLibrarySidebar* pSidebarWidget); TreeItemModel* getChildModel(); @@ -91,6 +92,7 @@ class AutoDJFeature : public LibraryFeature { // Used to map menu-item signals. QSignalMapper m_crateMapper; + QMenu *m_pMenu; QIcon m_icon; private slots: diff --git a/src/library/browse/browsefeature.cpp b/src/library/browse/browsefeature.cpp index df581b2d74e..a703b660ef9 100644 --- a/src/library/browse/browsefeature.cpp +++ b/src/library/browse/browsefeature.cpp @@ -218,11 +218,9 @@ void BrowseFeature::bindWidget(WLibrary* libraryWidget, } void BrowseFeature::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) { - m_pSidebarWidget = pSidebarWidget; // Create the right-click menu and parent it to the sidebar widget in // order to make it stylable with skin stylesheet rather than ugly OS styling. - // Parent to default NULL if there's no sidebar widget. - m_pMenu = new QMenu(m_pSidebarWidget); + m_pMenu = new QMenu(pSidebarWidget); } void BrowseFeature::activate() { @@ -278,7 +276,7 @@ void BrowseFeature::onRightClickChild(const QPoint& globalPos, QModelIndex index if (item->parent()->getData().toString() == QUICK_LINK_NODE) { m_pMenu->addAction(m_pRemoveQuickLinkAction); - m_pMenu->exec(globalPos); + m_pMenu->popup(globalPos); onLazyChildExpandation(index); return; } @@ -288,7 +286,7 @@ void BrowseFeature::onRightClickChild(const QPoint& globalPos, QModelIndex index // if path is a QuickLink: // show remove action m_pMenu->addAction(m_pRemoveQuickLinkAction); - m_pMenu->exec(globalPos); + m_pMenu->popup(globalPos); onLazyChildExpandation(index); return; } diff --git a/src/library/crate/cratefeature.cpp b/src/library/crate/cratefeature.cpp index bcc5cd83fc5..14e1afc584a 100644 --- a/src/library/crate/cratefeature.cpp +++ b/src/library/crate/cratefeature.cpp @@ -3,7 +3,6 @@ #include #include #include -#include #include #include @@ -22,6 +21,7 @@ #include "sources/soundsourceproxy.h" #include "widget/wlibrary.h" +#include "widget/wlibrarysidebar.h" #include "widget/wlibrarytextbrowser.h" #include "util/dnd.h" @@ -248,6 +248,12 @@ void CrateFeature::bindWidget(WLibrary* libraryWidget, libraryWidget->registerView("CRATEHOME", edit); } +void CrateFeature::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) { + // Create the right-click menu and parent it to the sidebar widget in + // order to make it stylable with skin stylesheet rather than ugly OS styling. + m_pMenu = new QMenu(pSidebarWidget); +} + TreeItemModel* CrateFeature::getChildModel() { return &m_childModel; } @@ -302,11 +308,11 @@ bool CrateFeature::readLastRightClickedCrate(Crate* pCrate) const { void CrateFeature::onRightClick(const QPoint& globalPos) { m_lastRightClickedIndex = QModelIndex(); - QMenu menu(NULL); - menu.addAction(m_pCreateCrateAction.get()); - menu.addSeparator(); - menu.addAction(m_pCreateImportPlaylistAction.get()); - menu.exec(globalPos); + m_pMenu->clear(); + m_pMenu->addAction(m_pCreateCrateAction.get()); + m_pMenu->addSeparator(); + m_pMenu->addAction(m_pCreateImportPlaylistAction.get()); + m_pMenu->popup(globalPos); } void CrateFeature::onRightClickChild(const QPoint& globalPos, QModelIndex index) { @@ -329,24 +335,24 @@ void CrateFeature::onRightClickChild(const QPoint& globalPos, QModelIndex index) m_pLockCrateAction->setText(crate.isLocked() ? tr("Unlock") : tr("Lock")); - QMenu menu(NULL); - menu.addAction(m_pCreateCrateAction.get()); - menu.addSeparator(); - menu.addAction(m_pRenameCrateAction.get()); - menu.addAction(m_pDuplicateCrateAction.get()); - menu.addAction(m_pDeleteCrateAction.get()); - menu.addAction(m_pLockCrateAction.get()); - menu.addSeparator(); - menu.addAction(m_pAutoDjTrackSourceAction.get()); - menu.addSeparator(); - menu.addAction(m_pAnalyzeCrateAction.get()); - menu.addSeparator(); + m_pMenu->clear(); + m_pMenu->addAction(m_pCreateCrateAction.get()); + m_pMenu->addSeparator(); + m_pMenu->addAction(m_pRenameCrateAction.get()); + m_pMenu->addAction(m_pDuplicateCrateAction.get()); + m_pMenu->addAction(m_pDeleteCrateAction.get()); + m_pMenu->addAction(m_pLockCrateAction.get()); + m_pMenu->addSeparator(); + m_pMenu->addAction(m_pAutoDjTrackSourceAction.get()); + m_pMenu->addSeparator(); + m_pMenu->addAction(m_pAnalyzeCrateAction.get()); + m_pMenu->addSeparator(); if (!crate.isLocked()) { - menu.addAction(m_pImportPlaylistAction.get()); + m_pMenu->addAction(m_pImportPlaylistAction.get()); } - menu.addAction(m_pExportPlaylistAction.get()); - menu.addAction(m_pExportTrackFilesAction.get()); - menu.exec(globalPos); + m_pMenu->addAction(m_pExportPlaylistAction.get()); + m_pMenu->addAction(m_pExportTrackFilesAction.get()); + m_pMenu->popup(globalPos); } void CrateFeature::slotCreateCrate() { diff --git a/src/library/crate/cratefeature.h b/src/library/crate/cratefeature.h index 0f37401a05b..e4e8b46b4c7 100644 --- a/src/library/crate/cratefeature.h +++ b/src/library/crate/cratefeature.h @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -43,6 +44,7 @@ class CrateFeature : public LibraryFeature { void bindWidget(WLibrary* libraryWidget, KeyboardEventFilter* keyboard) override; + virtual void bindSidebarWidget(WLibrarySidebar* pSidebarWidget); TreeItemModel* getChildModel() override; @@ -102,6 +104,8 @@ class CrateFeature : public LibraryFeature { const QIcon m_cratesIcon; const QIcon m_lockedCrateIcon; + QMenu *m_pMenu; + TrackCollection* m_pTrackCollection; CrateTableModel m_crateTableModel; diff --git a/src/library/library.cpp b/src/library/library.cpp index 092cc54fb43..1ab79caeaee 100644 --- a/src/library/library.cpp +++ b/src/library/library.cpp @@ -71,10 +71,11 @@ Library::Library( m_pTrackCollection(new TrackCollection(pConfig)), m_pLibraryControl(new LibraryControl(this)), m_pMixxxLibraryFeature(nullptr), + m_pAutoDJFeature(nullptr), m_pPlaylistFeature(nullptr), - m_pSetlogFeature(nullptr), - m_pBrowseFeature(nullptr), m_pCrateFeature(nullptr), + m_pBrowseFeature(nullptr), + m_pSetlogFeature(nullptr), m_pAnalysisFeature(nullptr), m_scanner(pDbConnectionPool, m_pTrackCollection, pConfig) { @@ -109,7 +110,8 @@ Library::Library( m_pMixxxLibraryFeature = new MixxxLibraryFeature(this, m_pTrackCollection,m_pConfig); addFeature(m_pMixxxLibraryFeature); - addFeature(new AutoDJFeature(this, pConfig, pPlayerManager, m_pTrackCollection)); + m_pAutoDJFeature = new AutoDJFeature(this, pConfig, pPlayerManager, m_pTrackCollection); + addFeature(m_pAutoDJFeature); m_pPlaylistFeature = new PlaylistFeature(this, m_pTrackCollection, m_pConfig); addFeature(m_pPlaylistFeature); m_pCrateFeature = new CrateFeature(this, m_pTrackCollection, m_pConfig); @@ -241,8 +243,11 @@ void Library::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) { pSidebarWidget->slotSetFont(m_trackTableFont); connect(this, SIGNAL(setTrackTableFont(QFont)), pSidebarWidget, SLOT(slotSetFont(QFont))); - m_pSetlogFeature->bindSidebarWidget(pSidebarWidget); + m_pAutoDJFeature->bindSidebarWidget(pSidebarWidget); + m_pPlaylistFeature->bindSidebarWidget(pSidebarWidget); + m_pCrateFeature->bindSidebarWidget(pSidebarWidget); m_pBrowseFeature->bindSidebarWidget(pSidebarWidget); + m_pSetlogFeature->bindSidebarWidget(pSidebarWidget); } void Library::bindWidget(WLibrary* pLibraryWidget, diff --git a/src/library/library.h b/src/library/library.h index d6acdcd201b..c7d8b70941d 100644 --- a/src/library/library.h +++ b/src/library/library.h @@ -152,10 +152,11 @@ class Library: public QObject, const static QString m_sTrackViewName; const static QString m_sAutoDJViewName; MixxxLibraryFeature* m_pMixxxLibraryFeature; + AutoDJFeature* m_pAutoDJFeature; PlaylistFeature* m_pPlaylistFeature; CrateFeature* m_pCrateFeature; - SetlogFeature* m_pSetlogFeature; BrowseFeature* m_pBrowseFeature; + SetlogFeature* m_pSetlogFeature; AnalysisFeature* m_pAnalysisFeature; LibraryScanner m_scanner; QFont m_trackTableFont; diff --git a/src/library/playlistfeature.cpp b/src/library/playlistfeature.cpp index 43250575a97..5a28fdc13ea 100644 --- a/src/library/playlistfeature.cpp +++ b/src/library/playlistfeature.cpp @@ -1,5 +1,4 @@ #include -#include #include #include @@ -58,15 +57,20 @@ QIcon PlaylistFeature::getIcon() { return m_icon; } +void PlaylistFeature::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) { + // Create the right-click menu and parent it to the sidebar widget in + // order to make it stylable with skin stylesheet rather than ugly OS styling. + m_pMenu = new QMenu(pSidebarWidget); +} + void PlaylistFeature::onRightClick(const QPoint& globalPos) { m_lastRightClickedIndex = QModelIndex(); - //Create the right-click menu - QMenu menu(NULL); - menu.addAction(m_pCreatePlaylistAction); - menu.addSeparator(); - menu.addAction(m_pCreateImportPlaylistAction); - menu.exec(globalPos); + m_pMenu->clear(); + m_pMenu->addAction(m_pCreatePlaylistAction); + m_pMenu->addSeparator(); + m_pMenu->addAction(m_pCreateImportPlaylistAction); + m_pMenu->popup(globalPos); } void PlaylistFeature::onRightClickChild(const QPoint& globalPos, QModelIndex index) { @@ -80,24 +84,23 @@ void PlaylistFeature::onRightClickChild(const QPoint& globalPos, QModelIndex ind m_pLockPlaylistAction->setText(locked ? tr("Unlock") : tr("Lock")); - //Create the right-click menu - QMenu menu(NULL); - menu.addAction(m_pCreatePlaylistAction); - menu.addSeparator(); - menu.addAction(m_pAddToAutoDJAction); - menu.addAction(m_pAddToAutoDJTopAction); - menu.addSeparator(); - menu.addAction(m_pRenamePlaylistAction); - menu.addAction(m_pDuplicatePlaylistAction); - menu.addAction(m_pDeletePlaylistAction); - menu.addAction(m_pLockPlaylistAction); - menu.addSeparator(); - menu.addAction(m_pAnalyzePlaylistAction); - menu.addSeparator(); - menu.addAction(m_pImportPlaylistAction); - menu.addAction(m_pExportPlaylistAction); - menu.addAction(m_pExportTrackFilesAction); - menu.exec(globalPos); + m_pMenu->clear(); + m_pMenu->addAction(m_pCreatePlaylistAction); + m_pMenu->addSeparator(); + m_pMenu->addAction(m_pAddToAutoDJAction); + m_pMenu->addAction(m_pAddToAutoDJTopAction); + m_pMenu->addSeparator(); + m_pMenu->addAction(m_pRenamePlaylistAction); + m_pMenu->addAction(m_pDuplicatePlaylistAction); + m_pMenu->addAction(m_pDeletePlaylistAction); + m_pMenu->addAction(m_pLockPlaylistAction); + m_pMenu->addSeparator(); + m_pMenu->addAction(m_pAnalyzePlaylistAction); + m_pMenu->addSeparator(); + m_pMenu->addAction(m_pImportPlaylistAction); + m_pMenu->addAction(m_pExportPlaylistAction); + m_pMenu->addAction(m_pExportTrackFilesAction); + m_pMenu->popup(globalPos); } bool PlaylistFeature::dropAcceptChild(const QModelIndex& index, QList urls, diff --git a/src/library/playlistfeature.h b/src/library/playlistfeature.h index ce6a1183aba..a0a54e9bc09 100644 --- a/src/library/playlistfeature.h +++ b/src/library/playlistfeature.h @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -27,6 +28,8 @@ class PlaylistFeature : public BasePlaylistFeature { QVariant title(); QIcon getIcon(); + virtual void bindSidebarWidget(WLibrarySidebar* pSidebarWidget); + bool dropAcceptChild(const QModelIndex& index, QList urls, QObject* pSource); bool dragMoveAcceptChild(const QModelIndex& index, QUrl url); @@ -47,6 +50,7 @@ class PlaylistFeature : public BasePlaylistFeature { private: QString getRootViewHtml() const; QIcon m_icon; + QMenu *m_pMenu; }; #endif /* PLAYLISTFEATURE_H */ diff --git a/src/library/setlogfeature.cpp b/src/library/setlogfeature.cpp index b99ad117888..311393bf3ac 100644 --- a/src/library/setlogfeature.cpp +++ b/src/library/setlogfeature.cpp @@ -70,11 +70,9 @@ void SetlogFeature::bindWidget(WLibrary* libraryWidget, } void SetlogFeature::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) { - m_pSidebarWidget = pSidebarWidget; // Create the right-click menu and parent it to the sidebar widget in // order to make it stylable with skin stylesheet rather than ugly OS styling. - // Parent to default NULL if there's no sidebar widget. - m_pMenu = new QMenu(m_pSidebarWidget); + m_pMenu = new QMenu(pSidebarWidget); } void SetlogFeature::onRightClick(const QPoint& globalPos) { @@ -124,7 +122,6 @@ void SetlogFeature::onRightClickChild(const QPoint& globalPos, QModelIndex index } m_pMenu->addSeparator(); m_pMenu->addAction(m_pExportPlaylistAction); - m_pMenu->popup(globalPos); } From 18c17a3279811a9a1d6bd7a9a1975cff71583ed5 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Sat, 5 Oct 2019 13:56:36 +0200 Subject: [PATCH 09/30] move feature includes to library.h --- src/library/library.cpp | 10 ---------- src/library/library.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/library/library.cpp b/src/library/library.cpp index 1ab79caeaee..875160d2bac 100644 --- a/src/library/library.cpp +++ b/src/library/library.cpp @@ -16,17 +16,7 @@ #include "library/sidebarmodel.h" #include "library/trackcollection.h" #include "library/trackmodel.h" -#include "library/crate/cratefeature.h" -#include "library/rhythmbox/rhythmboxfeature.h" -#include "library/banshee/bansheefeature.h" -#include "library/recording/recordingfeature.h" -#include "library/itunes/itunesfeature.h" -#include "library/mixxxlibraryfeature.h" -#include "library/autodj/autodjfeature.h" -#include "library/playlistfeature.h" -#include "library/traktor/traktorfeature.h" #include "library/librarycontrol.h" -#include "library/setlogfeature.h" #include "util/db/dbconnectionpooled.h" #include "util/sandbox.h" #include "util/logger.h" diff --git a/src/library/library.h b/src/library/library.h index c7d8b70941d..c8c8c49c964 100644 --- a/src/library/library.h +++ b/src/library/library.h @@ -18,6 +18,16 @@ #include "analysisfeature.h" #include "library/coverartcache.h" #include "library/setlogfeature.h" +#include "library/crate/cratefeature.h" +#include "library/rhythmbox/rhythmboxfeature.h" +#include "library/banshee/bansheefeature.h" +#include "library/recording/recordingfeature.h" +#include "library/itunes/itunesfeature.h" +#include "library/mixxxlibraryfeature.h" +#include "library/autodj/autodjfeature.h" +#include "library/playlistfeature.h" +#include "library/setlogfeature.h" +#include "library/traktor/traktorfeature.h" #include "library/browse/browsefeature.h" #include "library/scanner/libraryscanner.h" #include "util/db/dbconnectionpool.h" From be96d299f55f61f9b27fe8cb96765917115f469c Mon Sep 17 00:00:00 2001 From: ronso0 Date: Sat, 5 Oct 2019 18:05:28 +0200 Subject: [PATCH 10/30] fix AutoDJ main context menu, test if Crates sub menu is also stylable now --- src/library/autodj/autodjfeature.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/library/autodj/autodjfeature.cpp b/src/library/autodj/autodjfeature.cpp index c348a52451e..1bc565c5f90 100644 --- a/src/library/autodj/autodjfeature.cpp +++ b/src/library/autodj/autodjfeature.cpp @@ -277,6 +277,7 @@ void AutoDJFeature::constructCrateChildModel() { void AutoDJFeature::onRightClickChild(const QPoint& globalPos, QModelIndex index) { TreeItem* pClickedItem = static_cast(index.internalPointer()); + m_pMenu->clear(); if (m_pCratesTreeItem == pClickedItem) { // The "Crates" parent item was right-clicked. // Bring up the context menu. @@ -291,16 +292,14 @@ void AutoDJFeature::onRightClickChild(const QPoint& globalPos, crateMenu.addAction(pAction.get()); pAction.release(); } - QMenu contextMenu; - contextMenu.addMenu(&crateMenu); - contextMenu.exec(globalPos); + m_pMenu->addMenu(&crateMenu); + m_pMenu->popup(globalPos); } else { // A crate child item was right-clicked. // Bring up the context menu. m_pRemoveCrateFromAutoDj->setData(pClickedItem->getData()); // the selected CrateId - QMenu contextMenu; - contextMenu.addAction(m_pRemoveCrateFromAutoDj); - contextMenu.exec(globalPos); + m_pMenu->addAction(m_pRemoveCrateFromAutoDj); + m_pMenu->popup(globalPos); } } From 6d9cb58def516e16a5cc70849a248557e44e6384 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Sat, 5 Oct 2019 18:29:39 +0200 Subject: [PATCH 11/30] default m_pMenu to nullptr --- src/library/autodj/autodjfeature.cpp | 3 ++- src/library/crate/cratefeature.cpp | 3 ++- src/library/playlistfeature.cpp | 3 ++- src/library/setlogfeature.cpp | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/library/autodj/autodjfeature.cpp b/src/library/autodj/autodjfeature.cpp index 1bc565c5f90..76d1da40218 100644 --- a/src/library/autodj/autodjfeature.cpp +++ b/src/library/autodj/autodjfeature.cpp @@ -54,7 +54,8 @@ AutoDJFeature::AutoDJFeature(Library* pLibrary, m_pAutoDJProcessor(NULL), m_pAutoDJView(NULL), m_autoDjCratesDao(m_iAutoDJPlaylistId, pTrackCollection, pConfig), - m_icon(":/images/library/ic_library_autodj.svg") { + m_icon(":/images/library/ic_library_autodj.svg"), + m_pMenu(nullptr) { qRegisterMetaType("AutoDJState"); m_pAutoDJProcessor = new AutoDJProcessor( diff --git a/src/library/crate/cratefeature.cpp b/src/library/crate/cratefeature.cpp index 14e1afc584a..b75651c57e7 100644 --- a/src/library/crate/cratefeature.cpp +++ b/src/library/crate/cratefeature.cpp @@ -46,7 +46,8 @@ CrateFeature::CrateFeature(Library* pLibrary, m_cratesIcon(":/images/library/ic_library_crates.svg"), m_lockedCrateIcon(":/images/library/ic_library_locked_tracklist.svg"), m_pTrackCollection(pTrackCollection), - m_crateTableModel(this, pTrackCollection) { + m_crateTableModel(this, pTrackCollection), + m_pMenu(nullptr) { initActions(); diff --git a/src/library/playlistfeature.cpp b/src/library/playlistfeature.cpp index 5a28fdc13ea..8d25ca78a66 100644 --- a/src/library/playlistfeature.cpp +++ b/src/library/playlistfeature.cpp @@ -36,7 +36,8 @@ PlaylistFeature::PlaylistFeature(QObject* parent, UserSettingsPointer pConfig) : BasePlaylistFeature(parent, pConfig, pTrackCollection, "PLAYLISTHOME"), - m_icon(":/images/library/ic_library_playlist.svg") { + m_icon(":/images/library/ic_library_playlist.svg"), + m_pMenu(nullptr) { m_pPlaylistTableModel = new PlaylistTableModel(this, pTrackCollection, "mixxx.db.model.playlist"); diff --git a/src/library/setlogfeature.cpp b/src/library/setlogfeature.cpp index 311393bf3ac..d8b07514f59 100644 --- a/src/library/setlogfeature.cpp +++ b/src/library/setlogfeature.cpp @@ -20,7 +20,8 @@ SetlogFeature::SetlogFeature(QObject* parent, m_playlistId(-1), m_libraryWidget(nullptr), m_pSidebarWidget(NULL), - m_icon(":/images/library/ic_library_history.svg") { + m_icon(":/images/library/ic_library_history.svg"), + m_pMenu(nullptr) { m_pPlaylistTableModel = new PlaylistTableModel(this, pTrackCollection, "mixxx.db.model.setlog", true); //show all tracks From 63b37c9b62e3093c0a4cf96ffb4a997e8e3daf82 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Sat, 5 Oct 2019 18:30:53 +0200 Subject: [PATCH 12/30] test: add stylable menu to iTunes feature --- src/library/itunes/itunesfeature.cpp | 23 +++++++++++++++-------- src/library/itunes/itunesfeature.h | 3 +++ src/library/library.cpp | 7 ++++++- src/library/library.h | 1 + 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/src/library/itunes/itunesfeature.cpp b/src/library/itunes/itunesfeature.cpp index 372a9ee5ad8..6843563847a 100644 --- a/src/library/itunes/itunesfeature.cpp +++ b/src/library/itunes/itunesfeature.cpp @@ -3,7 +3,6 @@ #include #include #include -#include #include #include #include @@ -17,6 +16,7 @@ #include "library/queryutil.h" #include "util/lcs.h" #include "util/sandbox.h" +#include "widget/wlibrarysidebar.h" #ifdef __SQLITE3__ #include @@ -62,7 +62,8 @@ ITunesFeature::ITunesFeature(QObject* parent, TrackCollection* pTrackCollection) : BaseExternalLibraryFeature(parent, pTrackCollection), m_pTrackCollection(pTrackCollection), m_cancelImport(false), - m_icon(":/images/library/ic_library_itunes.svg") { + m_icon(":/images/library/ic_library_itunes.svg"), + m_pMenu(nullptr) { QString tableName = "itunes_library"; QString idColumn = "id"; QStringList columns; @@ -143,6 +144,12 @@ QIcon ITunesFeature::getIcon() { return m_icon; } +void ITunesFeature::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) { + // Create the right-click menu and parent it to the sidebar widget in + // order to make it stylable with skin stylesheet rather than ugly OS styling. + m_pMenu = new QMenu(pSidebarWidget); +} + void ITunesFeature::activate() { activate(false); emit(enableCoverArtDisplay(false)); @@ -223,12 +230,12 @@ TreeItemModel* ITunesFeature::getChildModel() { void ITunesFeature::onRightClick(const QPoint& globalPos) { BaseExternalLibraryFeature::onRightClick(globalPos); - QMenu menu; - QAction useDefault(tr("Use Default Library"), &menu); - QAction chooseNew(tr("Choose Library..."), &menu); - menu.addAction(&useDefault); - menu.addAction(&chooseNew); - QAction *chosen(menu.exec(globalPos)); + m_pMenu->clear(); + QAction useDefault(tr("Use Default Library"), m_pMenu); + QAction chooseNew(tr("Choose Library..."), m_pMenu); + m_pMenu->addAction(&useDefault); + m_pMenu->addAction(&chooseNew); + QAction *chosen(m_pMenu->exec(globalPos)); if (chosen == &useDefault) { SettingsDAO settings(m_database); settings.setValue(ITDB_PATH_KEY, QString()); diff --git a/src/library/itunes/itunesfeature.h b/src/library/itunes/itunesfeature.h index e3319a16d8f..aa3cecb4126 100644 --- a/src/library/itunes/itunesfeature.h +++ b/src/library/itunes/itunesfeature.h @@ -9,6 +9,7 @@ #include #include #include +#include #include "library/baseexternallibraryfeature.h" #include "library/trackcollection.h" @@ -27,6 +28,7 @@ class ITunesFeature : public BaseExternalLibraryFeature { QVariant title(); QIcon getIcon(); + void bindSidebarWidget(WLibrarySidebar* pSidebarWidget); TreeItemModel* getChildModel(); @@ -71,6 +73,7 @@ class ITunesFeature : public BaseExternalLibraryFeature { QSharedPointer m_trackSource; QIcon m_icon; + QMenu *m_pMenu; }; #endif // ITUNESFEATURE_H diff --git a/src/library/library.cpp b/src/library/library.cpp index 875160d2bac..68ce130b2e9 100644 --- a/src/library/library.cpp +++ b/src/library/library.cpp @@ -67,6 +67,7 @@ Library::Library( m_pBrowseFeature(nullptr), m_pSetlogFeature(nullptr), m_pAnalysisFeature(nullptr), + m_pITunesFeature(nullptr), m_scanner(pDbConnectionPool, m_pTrackCollection, pConfig) { QSqlDatabase dbConnection = mixxx::DbConnectionPooled(m_pDbConnectionPool); @@ -147,7 +148,8 @@ Library::Library( } if (ITunesFeature::isSupported() && pConfig->getValue(ConfigKey(kConfigGroup,"ShowITunesLibrary"), true)) { - addFeature(new ITunesFeature(this, m_pTrackCollection)); + m_pITunesFeature = new ITunesFeature(this, m_pTrackCollection); + addFeature(m_pITunesFeature); } if (TraktorFeature::isSupported() && pConfig->getValue(ConfigKey(kConfigGroup,"ShowTraktorLibrary"), true)) { @@ -238,6 +240,9 @@ void Library::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) { m_pCrateFeature->bindSidebarWidget(pSidebarWidget); m_pBrowseFeature->bindSidebarWidget(pSidebarWidget); m_pSetlogFeature->bindSidebarWidget(pSidebarWidget); + if (ITunesFeature::isSupported() && m_pITunesFeature) { + m_pITunesFeature->bindSidebarWidget(pSidebarWidget); + } } void Library::bindWidget(WLibrary* pLibraryWidget, diff --git a/src/library/library.h b/src/library/library.h index c8c8c49c964..0e3a49e78b5 100644 --- a/src/library/library.h +++ b/src/library/library.h @@ -168,6 +168,7 @@ class Library: public QObject, BrowseFeature* m_pBrowseFeature; SetlogFeature* m_pSetlogFeature; AnalysisFeature* m_pAnalysisFeature; + ITunesFeature* m_pITunesFeature; LibraryScanner m_scanner; QFont m_trackTableFont; int m_iTrackTableRowHeight; From acdb70c1fb707608f436d6f18e62edb3c8a07ffa Mon Sep 17 00:00:00 2001 From: ronso0 Date: Sat, 5 Oct 2019 19:09:55 +0200 Subject: [PATCH 13/30] reorder QMenu iniatilation according to compiler warnings --- src/library/autodj/autodjfeature.h | 2 +- src/library/crate/cratefeature.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/library/autodj/autodjfeature.h b/src/library/autodj/autodjfeature.h index 8332b0ea80b..6ecd9d0c2d0 100644 --- a/src/library/autodj/autodjfeature.h +++ b/src/library/autodj/autodjfeature.h @@ -92,8 +92,8 @@ class AutoDJFeature : public LibraryFeature { // Used to map menu-item signals. QSignalMapper m_crateMapper; - QMenu *m_pMenu; QIcon m_icon; + QMenu *m_pMenu; private slots: // Add a crate to the auto-DJ queue. diff --git a/src/library/crate/cratefeature.h b/src/library/crate/cratefeature.h index e4e8b46b4c7..cea7694ae6e 100644 --- a/src/library/crate/cratefeature.h +++ b/src/library/crate/cratefeature.h @@ -104,8 +104,6 @@ class CrateFeature : public LibraryFeature { const QIcon m_cratesIcon; const QIcon m_lockedCrateIcon; - QMenu *m_pMenu; - TrackCollection* m_pTrackCollection; CrateTableModel m_crateTableModel; @@ -125,6 +123,8 @@ class CrateFeature : public LibraryFeature { parented_ptr m_pExportPlaylistAction; parented_ptr m_pExportTrackFilesAction; parented_ptr m_pAnalyzeCrateAction; + + QMenu *m_pMenu; }; From 5455772533bd3d79482d270c3f2a0a186525ab8a Mon Sep 17 00:00:00 2001 From: ronso0 Date: Sat, 5 Oct 2019 19:58:05 +0200 Subject: [PATCH 14/30] fix AutoDJ menu test --- src/library/autodj/autodjfeature.cpp | 14 ++++++++------ src/library/autodj/autodjfeature.h | 1 + 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/library/autodj/autodjfeature.cpp b/src/library/autodj/autodjfeature.cpp index 76d1da40218..dbb039eabc6 100644 --- a/src/library/autodj/autodjfeature.cpp +++ b/src/library/autodj/autodjfeature.cpp @@ -55,7 +55,8 @@ AutoDJFeature::AutoDJFeature(Library* pLibrary, m_pAutoDJView(NULL), m_autoDjCratesDao(m_iAutoDJPlaylistId, pTrackCollection, pConfig), m_icon(":/images/library/ic_library_autodj.svg"), - m_pMenu(nullptr) { + m_pMenu(nullptr), + m_pCrateMenu(nullptr) { qRegisterMetaType("AutoDJState"); m_pAutoDJProcessor = new AutoDJProcessor( @@ -132,6 +133,7 @@ void AutoDJFeature::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) { // Create the right-click menu and parent it to the sidebar widget in // order to make it stylable with skin stylesheet rather than ugly OS styling. m_pMenu = new QMenu(pSidebarWidget); + m_pCrateMenu = new QMenu(pSidebarWidget); } TreeItemModel* AutoDJFeature::getChildModel() { @@ -282,18 +284,18 @@ void AutoDJFeature::onRightClickChild(const QPoint& globalPos, if (m_pCratesTreeItem == pClickedItem) { // The "Crates" parent item was right-clicked. // Bring up the context menu. - QMenu crateMenu; - crateMenu.setTitle(tr("Add Crate as Track Source")); + m_pCrateMenu->clear(); + m_pCrateMenu->setTitle(tr("Add Crate as Track Source")); CrateSelectResult nonAutoDjCrates(m_pTrackCollection->crates().selectAutoDjCrates(false)); Crate crate; while (nonAutoDjCrates.populateNext(&crate)) { - auto pAction = std::make_unique(crate.getName(), &crateMenu); + auto pAction = std::make_unique(crate.getName(), m_pCrateMenu); m_crateMapper.setMapping(pAction.get(), crate.getId().value()); connect(pAction.get(), SIGNAL(triggered()), &m_crateMapper, SLOT(map())); - crateMenu.addAction(pAction.get()); + m_pCrateMenu->addAction(pAction.get()); pAction.release(); } - m_pMenu->addMenu(&crateMenu); + m_pMenu->addMenu(m_pCrateMenu); m_pMenu->popup(globalPos); } else { // A crate child item was right-clicked. diff --git a/src/library/autodj/autodjfeature.h b/src/library/autodj/autodjfeature.h index 6ecd9d0c2d0..63f05b09a40 100644 --- a/src/library/autodj/autodjfeature.h +++ b/src/library/autodj/autodjfeature.h @@ -94,6 +94,7 @@ class AutoDJFeature : public LibraryFeature { QIcon m_icon; QMenu *m_pMenu; + QMenu *m_pCrateMenu; private slots: // Add a crate to the auto-DJ queue. From f07ab40059b5b6575af4cfd8260b29c726502991 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Mon, 7 Oct 2019 17:01:40 +0200 Subject: [PATCH 15/30] increase menu padding a bit to separate icons and text --- res/skins/LateNight/style.qss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/skins/LateNight/style.qss b/res/skins/LateNight/style.qss index 544f20379ac..a9391a5b7af 100644 --- a/res/skins/LateNight/style.qss +++ b/res/skins/LateNight/style.qss @@ -1997,7 +1997,7 @@ QMenu { margin: 0px; } QMenu::item { - padding: 5px 10px 5px 17px; + padding: 5px 13px 5px 20px; } QMenu QCheckBox { padding: 2px 10px 2px 3px; From fa2a88f942263f167848850ef822c4269275f3e1 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Mon, 7 Oct 2019 18:46:05 +0200 Subject: [PATCH 16/30] fix AutoDJ 'm_pCrateMenu' and 'm_pBrowseFeature' --- src/library/autodj/autodjfeature.cpp | 2 +- src/library/library.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/library/autodj/autodjfeature.cpp b/src/library/autodj/autodjfeature.cpp index f02666b136d..1ebf736178f 100644 --- a/src/library/autodj/autodjfeature.cpp +++ b/src/library/autodj/autodjfeature.cpp @@ -320,7 +320,7 @@ void AutoDJFeature::onRightClickChild(const QPoint& globalPos, connect(pAction.get(), &QAction::triggered, [=](bool) { m_crateMapper.map(); }); - crateMenu.addAction(pAction.get()); + m_pCrateMenu->addAction(pAction.get()); pAction.release(); } m_pMenu->addMenu(m_pCrateMenu); diff --git a/src/library/library.cpp b/src/library/library.cpp index b8b4c969794..784ee8b7d9f 100644 --- a/src/library/library.cpp +++ b/src/library/library.cpp @@ -131,20 +131,20 @@ Library::Library( addFeature(m_pCrateFeature); m_pBrowseFeature = new BrowseFeature( this, pConfig, m_pTrackCollection, pRecordingManager); - connect(browseFeature, + connect(m_pBrowseFeature, &BrowseFeature::scanLibrary, &m_scanner, &LibraryScanner::scan); connect(&m_scanner, &LibraryScanner::scanStarted, - browseFeature, + m_pBrowseFeature, &BrowseFeature::slotLibraryScanStarted); connect(&m_scanner, &LibraryScanner::scanFinished, - browseFeature, + m_pBrowseFeature, &BrowseFeature::slotLibraryScanFinished); - addFeature(browseFeature); + addFeature(m_pBrowseFeature); addFeature(new RecordingFeature(this, pConfig, m_pTrackCollection, pRecordingManager)); m_pSetlogFeature = new SetlogFeature(this, pConfig, m_pTrackCollection); addFeature(m_pSetlogFeature); From cf681081c5e350d2089531f38bacbf07e72434f3 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Wed, 23 Oct 2019 14:22:19 +0200 Subject: [PATCH 17/30] use nullptr instead of NULL in setlogfeature --- src/library/setlogfeature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/library/setlogfeature.cpp b/src/library/setlogfeature.cpp index 1fee76e390d..d17e4ac4bd2 100644 --- a/src/library/setlogfeature.cpp +++ b/src/library/setlogfeature.cpp @@ -19,7 +19,7 @@ SetlogFeature::SetlogFeature(QObject* parent, : BasePlaylistFeature(parent, pConfig, pTrackCollection, "SETLOGHOME"), m_playlistId(-1), m_libraryWidget(nullptr), - m_pSidebarWidget(NULL), + m_pSidebarWidget(nullptr), m_icon(":/images/library/ic_library_history.svg"), m_pMenu(nullptr) { m_pPlaylistTableModel = new PlaylistTableModel(this, pTrackCollection, From 9cf92755f8a3aeda165be2ce591766b82e1f1e93 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Sat, 26 Oct 2019 18:42:42 +0200 Subject: [PATCH 18/30] style Shade menu & tooltip, adapt WEffecetSeletor & library button style --- .../Shade/btn/btn_kill_overdown_dark.png | Bin 0 -> 1001 bytes .../Shade/btn/btn_kill_overdown_darnk.png | Bin 0 -> 1001 bytes .../Shade/btn/btn_kill_overdown_summer.png | Bin 0 -> 1001 bytes res/skins/Shade/btn/btn_menu_arrow.png | Bin 0 -> 775 bytes res/skins/Shade/btn/btn_next_white.png | Bin 0 -> 1001 bytes res/skins/Shade/preview_deck.xml | 2 +- res/skins/Shade/style.qss | 189 ++++++++++++++---- res/skins/Shade/style/menu_arrow.svg | 1 + res/skins/Shade/style_dark.qss | 99 +++++---- res/skins/Shade/style_summer_sunset.qss | 98 ++++----- 10 files changed, 266 insertions(+), 123 deletions(-) create mode 100644 res/skins/Shade/btn/btn_kill_overdown_dark.png create mode 100644 res/skins/Shade/btn/btn_kill_overdown_darnk.png create mode 100644 res/skins/Shade/btn/btn_kill_overdown_summer.png create mode 100644 res/skins/Shade/btn/btn_menu_arrow.png create mode 100644 res/skins/Shade/btn/btn_next_white.png create mode 100644 res/skins/Shade/style/menu_arrow.svg diff --git a/res/skins/Shade/btn/btn_kill_overdown_dark.png b/res/skins/Shade/btn/btn_kill_overdown_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..adfef3556e8ba641cabd3d93e7503a5e5a890fce GIT binary patch literal 1001 zcmeAS@N?(olHy`uVBq!ia0vp^{2W~PG-*e!zd~s@gJy)EWiTNRTBT6WX(Mb1sRw~)`g^DR5Maw5W^e|Fk(UpNex8- bMp3Ssy_|LWE1zE#Ajf#R`njxgN@xNAua6wr literal 0 HcmV?d00001 diff --git a/res/skins/Shade/btn/btn_kill_overdown_darnk.png b/res/skins/Shade/btn/btn_kill_overdown_darnk.png new file mode 100644 index 0000000000000000000000000000000000000000..adfef3556e8ba641cabd3d93e7503a5e5a890fce GIT binary patch literal 1001 zcmeAS@N?(olHy`uVBq!ia0vp^{2W~PG-*e!zd~s@gJy)EWiTNRTBT6WX(Mb1sRw~)`g^DR5Maw5W^e|Fk(UpNex8- bMp3Ssy_|LWE1zE#Ajf#R`njxgN@xNAua6wr literal 0 HcmV?d00001 diff --git a/res/skins/Shade/btn/btn_kill_overdown_summer.png b/res/skins/Shade/btn/btn_kill_overdown_summer.png new file mode 100644 index 0000000000000000000000000000000000000000..bcb6447d66c6d2ce68ba580a7b963d7c263c75d5 GIT binary patch literal 1001 zcmeAS@N?(olHy`uVBq!ia0vp^{2W~PG-*e!>BAN_aCT=EWiTNrLpx5$(nC?i!d;etP4rQsAi_V8nzHk{XHv bjG|n{?Z0 literal 0 HcmV?d00001 diff --git a/res/skins/Shade/btn/btn_menu_arrow.png b/res/skins/Shade/btn/btn_menu_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..89a805fbfc72b7916324211e4b3e0df897733ba2 GIT binary patch literal 775 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uAB#T}@sR2@KN#5=*4F5rJ!QSPQ85o%Mc)B=- zXoxayWb*q9R4}AKRYUv#z>wJgBs<#J)c(JJP&DZpb#%>fYGlIY3|#{~h7(7RGn7;| s5O1Tlju}pyuv$d2pU4h9tkw^R;4C|t#oPBcO$Ax*>FVdQ&MBb@03CBQX#fBK literal 0 HcmV?d00001 diff --git a/res/skins/Shade/btn/btn_next_white.png b/res/skins/Shade/btn/btn_next_white.png new file mode 100644 index 0000000000000000000000000000000000000000..b444922e57d0d0faa5fff23276c68d3309a9cc22 GIT binary patch literal 1001 zcmeAS@N?(olHy`uVBq!ia0vp^{2W~PG-*e15_}i!Ox#>O8@_V%S)Cge*Ad* - i,72f + e, vertical diff --git a/res/skins/Shade/style.qss b/res/skins/Shade/style.qss index c38d0984bcb..895a76a0cc1 100644 --- a/res/skins/Shade/style.qss +++ b/res/skins/Shade/style.qss @@ -26,8 +26,6 @@ WBeatSpinBox, wouldn't style the respective spinbox in Shade (anymore), that's why we do it in another way here */ #spinBoxTransition { - color: #060613; - background-color: #aab2b7; font: 13px; padding: 0px; } @@ -38,9 +36,12 @@ WBeatSpinBox { /* omitting the border definition miraculously makes the spinbox grow */ /* 0px border OTOH makes the spinbox shrink disproportionately border: 0px; */ - border: 1px solid #72777A; margin: 0px 0px 2px 1px; } +#spinBoxTransition, +WLibrary QPushButton { + border: 1px solid #99A0A4; + } /* QSpinBox:editable { font-size: 10pt; @@ -63,44 +64,149 @@ WBeatSpinBox::down-button, } -WEffectSelector { + + +WEffectSelector QAbstractItemView, +QToolTip, +QMenu { + min-width: 120px; + padding: 2px; + font: 13px; +} +/* common colors for WEffectSelector, QMenu, QToolTip */ +WEffectSelector, +WEffectSelector QAbstractItemView, +WEffectSelector::down-arrow, +WEffectSelector::indicator:!checked, +WEffectSelector::item:checked:selected, +QToolTip, +QMenu, +QMenu::item, +QMenu QCheckBox, +WBeatSpinBox, +#spinBoxTransition, +WLibrary QPushButton:enabled { color: #060613; background-color: #aab2b7; + } +WEffectSelector, +WEffectSelector QAbstractItemView, +WEffectSelector::down-arrow, +QToolTip, +QMenu { + border-width: 1px; + border-style: solid; + border-color: #060613; + } + /* hovered items */ + WEffectSelector::item:selected, + QMenu::item:selected, + QMenu QCheckBox:selected, + QMenu QCheckBox:focus, /* selected by keyboard */ + QMenu QCheckBox:hover /* mouse hover */ { + background-color: lightgray; + color: #000; + /* remove OS focus indicator */ + outline: none; + } + /* hover over checked item/effect */ + WEffectSelector::item:checked:selected { + background-color: #8699b8; + } + /* checked effect and menu checkbox */ + WEffectSelector::indicator:checked, + QMenu QCheckBox::indicator:checked, + QMenu QCheckBox::indicator:!checked:pressed { + border-color: #1a2025; + background-color: #cf0a57; + } + /* unchecked menu checkbox */ + QMenu QCheckBox::indicator:!checked, + QMenu QCheckBox::indicator:checked:pressed { + border-color: #1a2025; + background-color: #7e868b; + /* remove OS focus indicator */ + outline: none; + } + /* disabled menu checkbox */ + QMenu QCheckBox::indicator:!enabled { + border-color: #767d82; + background-color: #7e868b; + } +/* common colors for WEffectSelector, QMenu, QToolTip */ + + + +WEffectSelector { /* Fixes the white bars on the top/bottom of the popup on Mac OS X */ margin-top: 0px; margin-bottom: 0px; - border: 1px solid #060613; padding-left: 3px; font: 13px; -} + } + WEffectSelector::item { + height: 22px; + } + WEffectSelector::drop-down { + height: 18px; + border: 0px; + } + WEffectSelector::down-arrow { + height: 18px; + border-width: 0px 0px 0px 1px; + margin: 0px; + image: url(skin:/btn/btn_spin_down.png) no-repeat; + } + WEffectSelector::indicator:checked { + border-width: 1px; + border-style: solid; + /* checkbox container is 28 x 22px; + use margin + border to create a square checkbox sized like kill buttons */ + margin: 3px 5px 2px 5px; + } + WEffectSelector::checked /* selected item */, + WEffectSelector::indicator /* checkbox, tick mark */, + WEffectSelector::drop-down, + WEffectSelector::indicator:!checked, + QMenu::item, + QMenu QCheckBox { + padding: 0px; + margin: 0px; + image: none; + outline: none; + border: 0px solid transparent; + } -WEffectSelector::drop-down { - /* This causes the Qt theme's widget style to magically not apply. Go figure. */ - border: 0; -} -WEffectSelector::down-arrow { - height: 20px; - border-style: solid; - border-color: #060613; - border-width: 0px 0px 0px 1px; - image: url(skin:/btn/btn_spin_down.png) no-repeat; -} +QMenu::item { + padding: 4px 13px 4px 20px; + } + QMenu::separator { + height: 0px; + border-top: 1px solid #71777a; + border-bottom: 1px solid #c3cdd2; + margin: 4px 1px; + } + QMenu QCheckBox { + padding: 2px 10px 2px 3px; + } + QMenu QCheckBox::indicator { + width: 13px; + height: 13px; + border-width: 1px; + border-style: solid; + } + QMenu::item:!enabled { + color: #444; + } + QMenu::right-arrow { + width: 10px; + height: 10px; + image: url(skin:/style/menu_arrow.svg); + } -WEffectSelector QAbstractItemView { - color: #060613; - background-color: #aab2b7; - border: 2px solid #060613; - selection-background-color: lightgray; -} -WEffectSelector::item:selected { - background-color: lightgray; -} -WEffectSelector::checked { - color: #EC4522; -} #EffectSelectorGroup[highlight="1"] { border: 1px solid #52f864; @@ -313,6 +419,12 @@ WSearchLineEdit { image: url(skin:/btn/btn_lib_clear_search_focus.svg); } +QHeaderView, +QHeaderView::section, +QScrollBar:horizontal, +QScrollBar:vertical { + background-color: #626f87; +} QHeaderView { /* Note(ronso0) Interferes with skin scaling @@ -320,7 +432,6 @@ QHeaderView { font-size: 10pt; font-weight: bold; color: #0f0f0f; - background-color: #8D98A3; border-radius: 0px; } /* Library header 'buttons' */ @@ -329,7 +440,7 @@ QHeaderView::section { /* set right border so that first column header on the left doesn't have double border on the left */ border-right: 1px solid #0f0f0f; - background-color: #8D98A3; + background-color: #626f87; border-radius: 0px; } @@ -337,7 +448,7 @@ QHeaderView::up-arrow, QHeaderView::down-arrow { width: 12px; padding-right: 2px; - background-color: rgba(141,152,163,160); + background-color: rgba(98,111,135,160); } QHeaderView::up-arrow { image: url(skin:/btn/btn_lib_sort_up.png) @@ -350,14 +461,12 @@ QHeaderView::down-arrow { QScrollBar:horizontal { min-width: 40px; height: 18px; - padding: 1px 0px 0px 0px; - background-color: #5C5B5D; + padding: 0px; } QScrollBar:vertical { min-height: 40px; width: 18px; - padding: 0px 0px 0px 1px; - background-color: #5C5B5D; + padding: 0px; } /* "add-page" and "sub-page" are the gutter of the scrollbar */ QScrollBar::add-page, @@ -368,7 +477,7 @@ QScrollBar::sub-page { } QScrollBar::handle:vertical, QScrollBar::handle:horizontal { - background: #8D98A3; + background: #626f87; border: 1px solid #1e1e1e; border-radius: 1px; } @@ -462,7 +571,6 @@ WLibrary QPushButton { color: #0f0f0f; margin: 1px 2px 3px 1px; padding: 1px 3px 0px 3px; - background-color: #99A0A4; background-position: center; border: 1px solid #99A0A4; } @@ -545,3 +653,8 @@ WLibrary QPushButton { #HotcueButton[highlight="8"] { background-color: #f2f2ff; } + + + + + diff --git a/res/skins/Shade/style/menu_arrow.svg b/res/skins/Shade/style/menu_arrow.svg new file mode 100644 index 00000000000..0de7cff2762 --- /dev/null +++ b/res/skins/Shade/style/menu_arrow.svg @@ -0,0 +1 @@ + diff --git a/res/skins/Shade/style_dark.qss b/res/skins/Shade/style_dark.qss index be76cb062bc..88383f18a39 100644 --- a/res/skins/Shade/style_dark.qss +++ b/res/skins/Shade/style_dark.qss @@ -1,13 +1,55 @@ /* Dark */ -WBeatSpinBox { - color: #000000; - background-color: #717171; -} +WEffectSelector, +WEffectSelector QAbstractItemView, +WEffectSelector::down-arrow, +WEffectSelector::indicator:!checked, +WEffectSelector::item:checked:selected, +QToolTip, +QMenu, +QMenu::item, +QMenu QCheckBox, +WBeatSpinBox, +#spinBoxTransition, +WLibrary QPushButton:enabled { + background-color: #717171; + } + /* hovered items */ + WEffectSelector::item:selected, + QMenu::item:selected, + QMenu QCheckBox:selected, + QMenu QCheckBox:focus, /* selected by keyboard */ + QMenu QCheckBox:hover /* mouse hover */ { + background-color: #999; + } + +/* hover over checked effect */ +WEffectSelector::item:checked:selected { + background-color: #555; + } + +QMenu::separator { + border-top: 1px solid #444; + border-bottom: 1px solid #888; + } + /* checked effect and menu checkbox */ + WEffectSelector::indicator:checked, + QMenu QCheckBox::indicator:checked, + QMenu QCheckBox::indicator:!checked:pressed { + border-color: #111; + background-color: #897300; + } + /* unchecked menu checkbox */ + QMenu QCheckBox::indicator:!checked, + QMenu QCheckBox::indicator:checked:pressed { + border-color: #1a2025; + background-color: #666; + } + /* disabled menu checkbox */ + QMenu QCheckBox::indicator:!enabled { + border-color: #555; + background-color: #666; + } -WEffectSelector { - color: #000000; - background-color: #717171; -} #EffectSelectorGroup[highlight="1"]{ border: 1px solid #3c8bb2; @@ -27,28 +69,6 @@ WSearchLineEdit QToolButton:focus { image: url(skin:/btn/btn_lib_clear_search_focus_green.svg); } - -QHeaderView { - color: #000; - background-color: #5C5B5D; -} -/* Library header 'buttons' */ -QHeaderView::section { - border-right: 1px solid #3F3041; - background-color: #5C5B5D; - border-radius: 0px; -} -QHeaderView::up-arrow, -QHeaderView::down-arrow { - background-color: rgba(92,91,93,160); -} -QHeaderView::up-arrow { - image: url(skin:/btn/btn_lib_sort_up_dark.png) -} -QHeaderView::down-arrow { - image: url(skin:/btn/btn_lib_sort_down_dark.png) -} - /* Scroll bars */ /* "add-page" and "sub-page" are the gutter of the scrollbar */ QScrollBar::add-page, @@ -56,17 +76,20 @@ QScrollBar::sub-page { background-color: #000; } QScrollBar::handle:vertical, -QScrollBar::handle:horizontal { - background: #5C5B5D; - border: 1px solid #3F3041; +QScrollBar::handle:horizontal, +QHeaderView, +QHeaderView::section { + background: #3f3041; + color: #000; +} +QHeaderView::up-arrow, +QHeaderView::down-arrow { + background-color: rgba(63,48,65,160); } -WLibrary QPushButton { - background-color: #717171; +WLibrary QPushButton:!enabled { + background-color: #4C4B4D; } - WLibrary QPushButton:!enabled { - background-color: #4C4B4D; - } WLibrary QPushButton:checked { color: #000; background-color: #B79E00; diff --git a/res/skins/Shade/style_summer_sunset.qss b/res/skins/Shade/style_summer_sunset.qss index 7e00d1ba503..1b3ba1338e3 100644 --- a/res/skins/Shade/style_summer_sunset.qss +++ b/res/skins/Shade/style_summer_sunset.qss @@ -1,13 +1,55 @@ /* Summer Sunset */ -WBeatSpinBox { - color: #101307; - background-color: #ad9e4f; -} +WEffectSelector, +WEffectSelector QAbstractItemView, +WEffectSelector::down-arrow, +WEffectSelector::indicator:!checked, +WEffectSelector::item:checked:selected, +QToolTip, +QMenu, +QMenu::item, +QMenu QCheckBox, +WBeatSpinBox, +#spinBoxTransition, +WLibrary QPushButton:enabled { + background-color: #ad9e4f; + } + /* hovered items */ + WEffectSelector::item:selected, + QMenu::item:selected, + QMenu QCheckBox:selected, + QMenu QCheckBox:focus, /* selected by keyboard */ + QMenu QCheckBox:hover /* mouse hover */ { + background-color: #d9c663; + } + +/* hover over checked effect */ +WEffectSelector::item:checked:selected { + background-color: #887a35; + } + +QMenu::separator { + border-top: 1px solid #7b6e30; + border-bottom: 1px solid #cbb74f; + } + /* checked effect and menu checkbox */ + WEffectSelector::indicator:checked, + QMenu QCheckBox::indicator:checked, + QMenu QCheckBox::indicator:!checked:pressed { + border-color: #222; + background-color: #4bcf09; + } + /* unchecked menu checkbox */ + QMenu QCheckBox::indicator:!checked, + QMenu QCheckBox::indicator:checked:pressed { + border-color: #222; + background-color: #998a3c; + } + /* disabled menu checkbox */ + QMenu QCheckBox::indicator:!enabled { + border-color: #ad9e4f; + background-color: #998a3c; + } -WEffectSelector { - color: #101307; - background-color: #ad9e4f; -} #EffectSelectorGroup[highlight="1"]{ border: 1px solid #f8ba54; @@ -16,45 +58,9 @@ WEffectSelector { border: 0px solid #f8ba54; } -QHeaderView { - color: #0f0f0f; - background-color: #998A3D; -} -/* Library header 'buttons' */ -QHeaderView::section { - border-right: 1px solid #0f0f0f; - background-color: #998A3D; - border-radius: 0px; -} -QHeaderView::up-arrow, -QHeaderView::down-arrow { - background-color: rgba(153,138,60,160); -} -QHeaderView::up-arrow { - image: url(skin:/btn/btn_lib_sort_up.png) -} -QHeaderView::down-arrow { - image: url(skin:/btn/btn_lib_sort_down.png) -} - -/* Scroll bars */ -/* "add-page" and "sub-page" are the gutter of the scrollbar */ -QScrollBar::add-page, -QScrollBar::sub-page { - background-color: #000; -} -QScrollBar::handle:vertical, -QScrollBar::handle:horizontal { - background: #998A3C; - border: 1px solid #524A20; -} - -WLibrary QPushButton { - background-color: #9E9048; +WLibrary QPushButton:!enabled { + background-color: #706633; } - WLibrary QPushButton:!enabled { - background-color: #706633; - } WLibrary QPushButton:unchecked { color: #888; background-color: #444; From 0b390c639f5b40042d134422bb534114c8f67624 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Sat, 26 Oct 2019 21:21:03 +0200 Subject: [PATCH 19/30] refine LateNight qmenu & effect selector style --- res/skins/LateNight/buttons/btn_kill.png | Bin 0 -> 349 bytes .../LateNight/buttons/btn_menu_arrow.png | Bin 0 -> 775 bytes res/skins/LateNight/style.qss | 224 ++++++++---------- .../LateNight/style/menu_arrow_selected.svg | 1 + 4 files changed, 103 insertions(+), 122 deletions(-) create mode 100644 res/skins/LateNight/buttons/btn_kill.png create mode 100644 res/skins/LateNight/buttons/btn_menu_arrow.png create mode 100644 res/skins/LateNight/style/menu_arrow_selected.svg diff --git a/res/skins/LateNight/buttons/btn_kill.png b/res/skins/LateNight/buttons/btn_kill.png new file mode 100644 index 0000000000000000000000000000000000000000..8d87cb2002718c9fee684b0f514ac71e68cd0f07 GIT binary patch literal 349 zcmeAS@N?(olHy`uVBq!ia0vp^{24nJ za0`JjT_|iUd^#qc?i_Y N;OXk;vd$@?2>@b&a9RKW literal 0 HcmV?d00001 diff --git a/res/skins/LateNight/buttons/btn_menu_arrow.png b/res/skins/LateNight/buttons/btn_menu_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..89a805fbfc72b7916324211e4b3e0df897733ba2 GIT binary patch literal 775 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uAB#T}@sR2@KN#5=*4F5rJ!QSPQ85o%Mc)B=- zXoxayWb*q9R4}AKRYUv#z>wJgBs<#J)c(JJP&DZpb#%>fYGlIY3|#{~h7(7RGn7;| s5O1Tlju}pyuv$d2pU4h9tkw^R;4C|t#oPBcO$Ax*>FVdQ&MBb@03CBQX#fBK literal 0 HcmV?d00001 diff --git a/res/skins/LateNight/style.qss b/res/skins/LateNight/style.qss index 3e7cc42878f..0ff654d3656 100644 --- a/res/skins/LateNight/style.qss +++ b/res/skins/LateNight/style.qss @@ -1443,78 +1443,6 @@ WBeatSpinBox, padding: 3px; } -WEffectSelector { - font-weight: bold; - font-size: 12px/13px; - text-transform: uppercase; - background-color: #0f0f0f; - /* Fixes the white bars on the top/bottom of the popup on Mac OS X */ - min-height: 13px; - margin: 0px; - /* If you use margin top/bottom 0, the combo box shrinks in width (go figure) and - names start getting cut off. Adding explicit padding improves this. */ - padding: 4px 0px 4px 5px; - /* The 3D frame on the combo box becomes flat when you give it a border - border-radius: 3px; */ - } - WEffectSelector::drop-down { - border: 0; - } - WEffectSelector::down-arrow { - image: url(skin:/buttons/btn_fx_selector.svg); - border: 0; - padding: 0; - margin: 0; - } - WEffectSelector::down-arrow:hover { - image: url(skin:/buttons/btn_fx_selector_pressed.svg); - border: 0; - padding: 0; - margin: 0; - } - - WEffectSelector QAbstractItemView { - width: 142px; - background-color: #0f0f0f; - /* padding-left: 6px; */ - font-size: 12px/13px; - /* On Linux, this is not applied but font color from WEffectSelector - is inherited. - On Windows, it must be defined here */ - border: 1px solid #444; - border-radius: 2px; - padding: 0px; - margin: 0px; - } - /* selected item */ - WEffectSelector::checked { - /* not applied - padding-left: 5px; - font-weight: bold; */ - padding: 0px; - margin: 0px; - color: #eee; - background-color: #1e1e1e; - } - /* hovered items */ - WEffectSelector::item:selected { - background-color: #333; - /* Already of those two destroys font config and puts tick mark behind text: - margin: 0px; - padding: 0px; */ - /* This moves the tick mark behind item text, - text sits at left border now - border: 0; */ - } - WEffectSelector::indicator { - /* This is sufficient to completely hide the tick mark, but - this alone would show an empty, shadowed box instead of tick mark - background-color: transparent;*/ - /* This should decrease the tick mark's left & right margin but is not respected */ - margin: 0px; - padding: 0px; - } - #FxSuperLinkButton, #FxSuperLinkInvertButton { border-radius: 1px; @@ -2078,29 +2006,102 @@ QTreeView { border: 1px solid #585858; } + +WEffectSelector QAbstractItemView, QToolTip, QMenu { - background-color: #0f0f0f; - color: #cfb32c; padding: 3px; border: 1px solid #888; border-radius: 2px; +} +/* common colors for WEffectSelector, QMenu, QToolTip */ +WEffectSelector, +WEffectSelector QAbstractItemView, +QToolTip, +QMenu, +QMenu::item, +QMenu QCheckBox, +WBeatSpinBox, +#spinBoxTransition { + color: #cfb32c; + background-color: #0f0f0f; + font-size: 12px/13px; +} + /* hovered items */ + WEffectSelector::item:selected, + QMenu::item:selected, + QMenu QCheckBox:selected, + QMenu QCheckBox:focus, /* selected by keyboard */ + QMenu QCheckBox:hover /* mouse hover */ { + background-color: #5E4507; + color: white; + /* remove OS focus indicator */ + outline: none; } - QMenu::separator { - height: 0px; - border-top: 1px solid #000; - border-bottom: 1px solid #222; - margin: 4px 1px 4px 1px; - margin-left: 4px; - margin-right: 4px; + /* hover over checked effect */ + WEffectSelector::item:checked:selected { + background-color: #2a1e03; + } + + +WEffectSelector { + font-weight: bold; + text-transform: uppercase; + margin: 0px; + /* Fixes the white bars on the top/bottom of the popup on Mac OS X */ + margin-top: 0px; + margin-bottom: 0px; + /* If you use margin top/bottom 0, the combo box shrinks in width (go figure) and + names start getting cut off. Adding explicit padding improves this. */ + padding: 0px 0px 0px 5px; + margin: 0px; + /* The 3D frame on the combo box becomes flat when you give it a border + border-radius: 3px; */ } - /* actually this only needs to be set for QCheckBox */ + WEffectSelector::item { + height: 22px; + } + WEffectSelector::down-arrow { + image: url(skin:/buttons/btn_fx_selector.svg); + } + WEffectSelector::down-arrow:hover { + image: url(skin:/buttons/btn_fx_selector_pressed.svg); + } + + WEffectSelector QAbstractItemView { + min-width: 160px; + } + WEffectSelector::indicator { + /* This is sufficient to completely hide the tick mark, but + this alone would show an empty, shadowed box instead of tick mark + background-color: transparent;*/ + /* This should decrease the tick mark's left & right margin but is not respected + margin: 0px; + padding: 0px; */ + } + WEffectSelector::indicator:checked { + /* checkbox container is 28 x 22px; + use margin + border to create a square checkbox sized like kill buttons */ + margin: 2px; + image: url(skin:/buttons/btn_lib_checkmark.svg); + } + WEffectSelector::checked /* selected item */, + WEffectSelector::indicator /* checkbox, tick mark */, + WEffectSelector::drop-down, + WEffectSelector::indicator:!checked, QMenu::item, QMenu QCheckBox { - color: #cfb32c; - border: none; - background: none; + padding: 0px; margin: 0px; + image: none; + outline: none; + border: 0px solid transparent; + } + QMenu::separator { + height: 0px; + border-top: 1px solid #000; + border-bottom: 1px solid #222; + margin: 4px; } QMenu::item { padding: 5px 13px 5px 20px; @@ -2108,19 +2109,9 @@ QMenu { QMenu QCheckBox { padding: 2px 10px 2px 3px; } - QMenu::item:selected, - QMenu QCheckBox:selected, - QMenu QCheckBox:focus, /* selected by keyboard */ - QMenu QCheckBox:hover /* mouse hover */ { - background-color: #5E4507; - color: white; - /* remove OS focus indicator */ - outline: none; - } QMenu QCheckBox::indicator { width: 13px; height: 13px; - background-color: #0f0f0f; border: 1px solid #333; border-radius: 1px; /* remove OS focus indicator */ @@ -2130,33 +2121,22 @@ QMenu { image: url(skin:/buttons/btn_lib_checkmark.svg); border: 1px solid #0f0f0f; } + QMenu::right-arrow { + width: 10px; + height: 10px; + image: url(skin:/style/menu_arrow.svg); + } + QMenu::right-arrow:selected { + image: url(skin:/style/menu_arrow_selected.svg); + } - QHeaderView::up-arrow, - QHeaderView::down-arrow { - background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #585858, stop:1 #0f0f0f); - width: 12px; - padding-left: 3px; - padding-right: 3px; - border-right: 1px solid #585858; + QHeaderView QMenu::indicator { + width: 10px; + height: 10px; + margin-left: 2px; + border: none; + background: none; } - QHeaderView::up-arrow { - image: url(skin:/style/btn_lib_sort_up.png); - } - QHeaderView::down-arrow { - image: url(skin:/style/btn_lib_sort_down.png); + QHeaderView QMenu::indicator:checked { + image: url(skin:/buttons/btn_lib_checkmark.svg); } - QHeaderView QMenu::indicator { - width: 10px; - height: 10px; - margin-left: 2px; - border: none; - background: none; - } - QHeaderView QMenu::indicator:checked { - image: url(skin:/buttons/btn_lib_checkmark.svg); - } - QMenu::right-arrow { - width: 10px; - height: 10px; - image: url(skin:/style/menu_arrow.svg); - } diff --git a/res/skins/LateNight/style/menu_arrow_selected.svg b/res/skins/LateNight/style/menu_arrow_selected.svg new file mode 100644 index 00000000000..3bacc6f4bda --- /dev/null +++ b/res/skins/LateNight/style/menu_arrow_selected.svg @@ -0,0 +1 @@ + From 99972ff87d94f7558e3c9e72712bd1516f88eb63 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Sat, 26 Oct 2019 21:21:57 +0200 Subject: [PATCH 20/30] add Deere qmenu, tooltip & effect selector style --- .../Deere/icon/ic_library_checkmark_blue.svg | 1 + res/skins/Deere/style.qss | 220 +++++++++++++----- 2 files changed, 157 insertions(+), 64 deletions(-) create mode 100644 res/skins/Deere/icon/ic_library_checkmark_blue.svg diff --git a/res/skins/Deere/icon/ic_library_checkmark_blue.svg b/res/skins/Deere/icon/ic_library_checkmark_blue.svg new file mode 100644 index 00000000000..68cc3f7de8f --- /dev/null +++ b/res/skins/Deere/icon/ic_library_checkmark_blue.svg @@ -0,0 +1 @@ + diff --git a/res/skins/Deere/style.qss b/res/skins/Deere/style.qss index 7add452fe8e..062c1a36e92 100644 --- a/res/skins/Deere/style.qss +++ b/res/skins/Deere/style.qss @@ -246,7 +246,7 @@ QTableView::indicator { QTableView::indicator:checked, QTableView::indicator:checked:selected { - background: url(skin:/icon/ic_library_checkmark.svg); + image: url(skin:/icon/ic_library_checkmark.svg); border: 1px solid #ff6600; } @@ -1128,60 +1128,6 @@ WBeatSpinBox, image: url(skin:/icon/ic_power_48px.svg) no-repeat center center; } -WEffectSelector { - color: #c1cabe; - background-color: #444342; - /* TODO: use a linear gradient for the background color */ - - /* Fixes the white bars on the top/bottom of the popup on Mac OS X */ - margin-top: 0px; - margin-bottom: 0px; - - /* If you use margin top/bottom 0, the combo box shrinks in width (go figure) and - * names start getting cut off. Adding explicit padding improves this. */ - padding: 0px 6px; - - /* The 3D frame on the combo box becomes flat when you give it a border */ - border: 1px solid #444342; - border-radius: 3px; - - font: 15px; -} - - WEffectSelector:hover { - border: 1px ridge #015d8d; - } - - WEffectSelector::drop-down { - /* This causes the Qt theme's widget style to magically not apply. Go figure. */ - border: 0; - } - - WEffectSelector::down-arrow { - width: 20px; - height: 20px; - image: url(skin:/icon/ic_chevron_down_48px.svg); - } - - WEffectSelector QAbstractItemView { - color: #c1cabe; - background-color: #201f1f; - } - - WEffectSelector::item:!selected { - background-color: #201f1f; - } - - WEffectSelector::item:selected { - background-color: #080808; - } - - /* currently loaded effect */ - WEffectSelector::checked { - color: #4495F4; - font-weight: bold; - } - #EffectKnob { } @@ -1831,7 +1777,6 @@ do not highlight either state. */ stop: 0.66 #5F5F5F, stop: 0.67 #5F5F5F, stop: 1 #5F5F5F); - border: 0px solid #0080BE; } @@ -1844,7 +1789,6 @@ do not highlight either state. */ stop: 0.66 #4B4B4B, stop: 0.67 #006596, stop: 1 #006596); - border: 0px solid #006596; } @@ -1858,7 +1802,6 @@ do not highlight either state. */ stop: 0.66 #5F5F5F, stop: 0.67 #0080BE, stop: 1 #0080BE); - border: 0px solid #0080BE; } @@ -1871,7 +1814,6 @@ do not highlight either state. */ stop: 0.660000 #4B4B4B, stop: 0.670000 #006596, stop: 1 #006596); - border: 0px solid #006596; } @@ -1885,7 +1827,6 @@ do not highlight either state. */ stop: 0.660000 #5F5F5F, stop: 0.670000 #0080BE, stop: 1 #0080BE); - border: 0px solid #0080BE; } @@ -1939,11 +1880,162 @@ do not highlight either state. */ ** End Buttons *************************************************************** *******************************************************************************/ -QToolTip { - background-color: #222222; - color: #CCCCCC; - border: 1px solid #CCCCCC; + +WEffectSelector QAbstractItemView, +QToolTip, +QMenu, +QMenu QCheckBox { + padding: 2px; + font: 13px; +} +WEffectSelector QAbstractItemView { + min-width: 140px; +} +/* common colors for WEffectSelector, QMenu, QToolTip */ +WEffectSelector QAbstractItemView, +WEffectSelector::indicator:!checked, +QToolTip, +QMenu, +QMenu::item, +QMenu QCheckBox { + color: #c1cabe; + background-color: #201f1f; + } +WEffectSelector QAbstractItemView, +QToolTip, +QMenu { + border-width: 1px; + border-style: solid; + border-color: #aaa; + border-radius: 1px; + } + /* hovered items */ + WEffectSelector::item:selected, + QMenu::item:selected, + QMenu QCheckBox:selected, + QMenu QCheckBox:focus, /* selected by keyboard */ + QMenu QCheckBox:hover /* mouse hover */ { + background-color: #565353; + color: #000; + /* remove OS focus indicator */ + outline: none; + } + + + +WEffectSelector { + color: #c1cabe; + /* TODO: use a linear gradient for the background color */ + /* Fixes the white bars on the top/bottom of the popup on Mac OS X */ + margin-top: 0px; + margin-bottom: 0px; + /* If you use margin top/bottom 0, the combo box shrinks in width (go figure) and + * names start getting cut off. Adding explicit padding improves this. */ + padding: 0px 6px; + /* The 3D frame on the combo box becomes flat when you give it a border */ + border: 1px solid #444342; + border-radius: 3px; + font: 15px; } + + WEffectSelector:hover { + border: 1px ridge #015d8d; + } + WEffectSelector::drop-down { + /* This causes the Qt theme's widget style to magically not apply. Go figure. */ + border: 0; + } + WEffectSelector::down-arrow { + width: 20px; + height: 20px; + image: url(skin:/icon/ic_chevron_down_48px.svg); + } + WEffectSelector::item:!selected { + background-color: #201f1f; + } + /* currently loaded effect */ + WEffectSelector::checked { + color: #4495F4; + font-weight: bold; + } + WEffectSelector::indicator:checked { + /* checkbox container is 28 x 22px; + use margin + border to create a square checkbox sized like kill buttons */ + margin: 2px; + image: url(skin:/icon/ic_library_checkmark_blue.svg); + } + + + WEffectSelector::checked /* selected item */, + WEffectSelector::indicator /* checkbox, tick mark */, + WEffectSelector::drop-down, + WEffectSelector::indicator:!checked, + QMenu::item, + QMenu QCheckBox { + padding: 0px; + margin: 0px; + image: none; + outline: none; + border: 0px solid transparent; + } + QMenu::separator { + height: 0px; + border-top: 1px solid #0a0a0a; + margin: 4px; + } + QMenu::item { + padding: 5px 13px 5px 20px; + } + QMenu::item:!enabled { + color: #555; + } + QMenu QCheckBox { + padding: 2px 10px 2px 3px; + } + QMenu QCheckBox::indicator { + width: 13px; + height: 13px; + border-radius: 1px; + /* remove OS focus indicator */ + outline: none; + } + QMenu QCheckBox::indicator:checked { + image: url(skin:/icon/ic_library_checkmark.svg); + border: 1px solid #0f0f0f; + } + QMenu QCheckBox::indicator:!checked { + image: none; + border: 1px solid #666; + background-color: #222; + } + QMenu QCheckBox::indicator:!enabled { + color: #555; + border: 1px solid #333; + } + QMenu::right-arrow { + width: 10px; + height: 10px; + image: url(skin:/style/menu_arrow.svg); + } + QMenu::right-arrow:selected { + image: url(skin:/style/menu_arrow_selected.svg); + } + + QHeaderView QMenu::indicator { + width: 12px; + height: 10px; + margin-left: 10px; + border: none; + background: none; + } + QHeaderView QMenu::indicator:checked { + image: url(skin:/icon/ic_library_checkmark_blue.svg); + } + + + + + /* #Deck1 { From 2191c8d19cb0d71b84af47f956c0152105440f52 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Sat, 26 Oct 2019 21:22:34 +0200 Subject: [PATCH 21/30] refine Shade qmenu & effect selector style --- res/skins/Shade/style.qss | 19 +++++++++---------- res/skins/Shade/style_dark.qss | 3 +-- res/skins/Shade/style_summer_sunset.qss | 2 -- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/res/skins/Shade/style.qss b/res/skins/Shade/style.qss index 895a76a0cc1..ef431591da2 100644 --- a/res/skins/Shade/style.qss +++ b/res/skins/Shade/style.qss @@ -69,16 +69,17 @@ WBeatSpinBox::down-button, WEffectSelector QAbstractItemView, QToolTip, QMenu { - min-width: 120px; padding: 2px; font: 13px; } +WEffectSelector QAbstractItemView { + min-width: 140px; +} /* common colors for WEffectSelector, QMenu, QToolTip */ WEffectSelector, WEffectSelector QAbstractItemView, WEffectSelector::down-arrow, WEffectSelector::indicator:!checked, -WEffectSelector::item:checked:selected, QToolTip, QMenu, QMenu::item, @@ -86,6 +87,7 @@ QMenu QCheckBox, WBeatSpinBox, #spinBoxTransition, WLibrary QPushButton:enabled { + font: 13px; color: #060613; background-color: #aab2b7; } @@ -109,7 +111,7 @@ QMenu { /* remove OS focus indicator */ outline: none; } - /* hover over checked item/effect */ + /* hover over checked effect */ WEffectSelector::item:checked:selected { background-color: #8699b8; } @@ -136,13 +138,11 @@ QMenu { /* common colors for WEffectSelector, QMenu, QToolTip */ - WEffectSelector { /* Fixes the white bars on the top/bottom of the popup on Mac OS X */ margin-top: 0px; margin-bottom: 0px; padding-left: 3px; - font: 13px; } WEffectSelector::item { height: 22px; @@ -181,11 +181,13 @@ WEffectSelector { QMenu::item { padding: 4px 13px 4px 20px; } + QMenu::item:!enabled { + color: #444; + } QMenu::separator { height: 0px; border-top: 1px solid #71777a; - border-bottom: 1px solid #c3cdd2; - margin: 4px 1px; + margin: 4px; } QMenu QCheckBox { padding: 2px 10px 2px 3px; @@ -196,9 +198,6 @@ QMenu::item { border-width: 1px; border-style: solid; } - QMenu::item:!enabled { - color: #444; - } QMenu::right-arrow { width: 10px; height: 10px; diff --git a/res/skins/Shade/style_dark.qss b/res/skins/Shade/style_dark.qss index 88383f18a39..38379807e22 100644 --- a/res/skins/Shade/style_dark.qss +++ b/res/skins/Shade/style_dark.qss @@ -28,8 +28,7 @@ WEffectSelector::item:checked:selected { } QMenu::separator { - border-top: 1px solid #444; - border-bottom: 1px solid #888; + border-top: 1px solid #3F3041; } /* checked effect and menu checkbox */ WEffectSelector::indicator:checked, diff --git a/res/skins/Shade/style_summer_sunset.qss b/res/skins/Shade/style_summer_sunset.qss index 1b3ba1338e3..bc79e562a41 100644 --- a/res/skins/Shade/style_summer_sunset.qss +++ b/res/skins/Shade/style_summer_sunset.qss @@ -28,8 +28,6 @@ WEffectSelector::item:checked:selected { } QMenu::separator { - border-top: 1px solid #7b6e30; - border-bottom: 1px solid #cbb74f; } /* checked effect and menu checkbox */ WEffectSelector::indicator:checked, From 95de89e0e9275f0bf7010d36378160f6f5cf3af2 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Sat, 26 Oct 2019 22:40:01 +0200 Subject: [PATCH 22/30] Shade: fix some scaling and color scheme issues --- .../Shade/btn/btn_lib_checkmark_black.svg | 1 + ....svg => btn_lib_radio_button_on_green.svg} | 0 .../Shade/btn/btn_lib_sort_down_green.png | Bin 0 -> 846 bytes res/skins/Shade/btn/btn_lib_sort_up_green.png | Bin 0 -> 740 bytes res/skins/Shade/style.qss | 47 ++++++++++++------ res/skins/Shade/style_dark.qss | 10 +++- 6 files changed, 41 insertions(+), 17 deletions(-) create mode 100644 res/skins/Shade/btn/btn_lib_checkmark_black.svg rename res/skins/Shade/btn/{btn_lib_radio_button_on_dark.svg => btn_lib_radio_button_on_green.svg} (100%) create mode 100644 res/skins/Shade/btn/btn_lib_sort_down_green.png create mode 100644 res/skins/Shade/btn/btn_lib_sort_up_green.png diff --git a/res/skins/Shade/btn/btn_lib_checkmark_black.svg b/res/skins/Shade/btn/btn_lib_checkmark_black.svg new file mode 100644 index 00000000000..7d9a42cb2f0 --- /dev/null +++ b/res/skins/Shade/btn/btn_lib_checkmark_black.svg @@ -0,0 +1 @@ + diff --git a/res/skins/Shade/btn/btn_lib_radio_button_on_dark.svg b/res/skins/Shade/btn/btn_lib_radio_button_on_green.svg similarity index 100% rename from res/skins/Shade/btn/btn_lib_radio_button_on_dark.svg rename to res/skins/Shade/btn/btn_lib_radio_button_on_green.svg diff --git a/res/skins/Shade/btn/btn_lib_sort_down_green.png b/res/skins/Shade/btn/btn_lib_sort_down_green.png new file mode 100644 index 0000000000000000000000000000000000000000..934ef7d21680e7e3da4f01d8bd6e0928fdb42766 GIT binary patch literal 846 zcmeAS@N?(olHy`uVBq!ia0vp^3xGJ8gAGW^Z00rxQfx`y?k)`fL2$v|<&%LToCO|{ z#S9EFZXnDkGR4^uD9B#o>Fdh=h*eg^fa_-YkthZRrrVw_jv*Dd-rn&IVpbG5TKHnE zWkBCD^%EDrI7D{uo)R@{ePiW?_viIO*HdDr z;^%Gus?MC~TpxbzVzINrmxI@}U%%L^DDdmS>xrd3Hv~9pKjfaZa?9mtvHP(tMYcMD zDY35Ryq*3xCzeBhe$1<^d(+9@^7EsumH(SwHW0%oUSmUpf&ISf=e(jq0?&?@pZ~M) z2qRE!-df=-5rs4T?{8HZGP4Q%`ts-dE<DOn%~OJ2z5ac= zWMT1&s}ET3MQLu$v!8Hksz6P&02?p!{G2PdlAgtvE1ao*s=amF<&QFkzpM2Gp6&TG zx9|CmJFLwDHP-i2;_e*PDxa_5)BL`D%*>+r;|b6ZJ4+&k(pw(PW?7)@^ud?y0;l2+ zHP#mm0yUGF&-4h?bTgdk0FsPnT7V?e8K8JKbBv_ok4X$MfFdh=h*eg^K<@Bb0d)ojrb15_$B>F!Z|^!5T@Dan3D~{8 zV1W#;--E>m8~2!NuUZk(;L>+De%AN!TORwDKVSRy^V>3O%iHI^&yUYve)(ld<<5Cq zH@Fs^BC6gXfd0%S0Q7(5`61|Wllqn$a1 z@jyvSqrVt~ZjH{N1M1QZVm4xl4Q`L1+BfV65U2Xd6TkZ z5j~NNTPAEYKCX0zPoXB+y5o@|i@?5(b6qY9Fmc?!(YGjqgRvz)Cq3}Vw_>1s!~b=+ z*(&hV-2S-t>zc#O40pKgIQTgV@_#7U2prh^sQCi}!}mV^L$b^^Ty`Ag93L`%DBKY| zu=r7P0XsuKP@Q?`DO%rn zfIU$-@j>&3PJ<7QH(VrsDC8*d)Ciafve|LW=3tg@@oj13KcsdDud?&^>uMU`KRCYr z$>HUvZGpb^TOO$^QB%BY@1B_Rk(xl3)xWvQt67@!{jS&Fn=jgQ(0uvl>))5j^6azZ zxW7yPY{G}Ljz6|nU*clBFVph>SDnauTwt{ zRwG|&f1U%RSiV-je;)(TnC)+@`guSi(dBd9SwV`c%jUWRtpqa4=bq;SNzLE*IzIDi WdF0Y9FWG_Vk-^i|&t;ucLK6UL1uZE6 literal 0 HcmV?d00001 diff --git a/res/skins/Shade/style.qss b/res/skins/Shade/style.qss index 40df487e492..8571d4f163e 100644 --- a/res/skins/Shade/style.qss +++ b/res/skins/Shade/style.qss @@ -46,7 +46,7 @@ WLibrary QPushButton { } /* QSpinBox:editable { - font-size: 10pt; + font-size: 13px; background: transparent; color: #ACACAC; } QSpinBox { min-height: 20px; max-height: 20px;min-width: 40px; max-width: 40px;}*/ @@ -123,6 +123,7 @@ QMenu { QMenu QCheckBox::indicator:!checked:pressed { border-color: #1a2025; background-color: #cf0a57; + image: url(skin:/btn/btn_lib_checkmark_black.svg); } /* unchecked menu checkbox */ QMenu QCheckBox::indicator:!checked, @@ -206,6 +207,17 @@ QMenu::item { image: url(skin:/style/menu_arrow.svg); } + QHeaderView QMenu::indicator { + width: 10px; + height: 10px; + margin-left: 2px; + border: none; + background: none; + } + QHeaderView QMenu::indicator:checked { + image: url(skin:/btn/btn_lib_checkmark_black.svg); + } + @@ -376,7 +388,7 @@ QTreeView::item:!selected { border: 1px solid transparent; } QTableView::indicator:checked { - background: transparent url(skin:/btn/btn_lib_checkmark.svg) no-repeat center center; + image: url(skin:/btn/btn_lib_checkmark.svg) no-repeat center center; color: #cfcfcf; border: 1px solid #ff6600; } @@ -391,7 +403,7 @@ WSearchLineEdit { padding: 2px; margin-top: 2px; border: 1px solid #656565; - font-size: 10pt; + font-size: 13px; font-family: "Open Sans"; background: #0f0f0f; color: #cfcfcf; @@ -428,12 +440,15 @@ QScrollBar:vertical { } QHeaderView { /* Note(ronso0) - Interferes with skin scaling - font-size: 13px/13px; */ - font-size: 10pt; + This previously interferred with skin scaling: + font-size: 13px/13px; + This doesnt't scale when usinf QT_SCALE_FACTOR manually: + font-size: 10pt; */ + font-size: 13px/13px; font-weight: bold; color: #0f0f0f; border-radius: 0px; + border-bottom: 1px solid #0f0f0f; } /* Library header 'buttons' */ QHeaderView::section { @@ -449,14 +464,15 @@ QHeaderView::up-arrow, QHeaderView::down-arrow { width: 12px; padding-right: 2px; + margin-right: 1px; background-color: rgba(98,111,135,160); -} -QHeaderView::up-arrow { - image: url(skin:/btn/btn_lib_sort_up.png) -} -QHeaderView::down-arrow { - image: url(skin:/btn/btn_lib_sort_down.png) -} + } + QHeaderView::up-arrow { + image: url(skin:/btn/btn_lib_sort_up.png) + } + QHeaderView::down-arrow { + image: url(skin:/btn/btn_lib_sort_down.png) + } /* Scroll bars */ QScrollBar:horizontal { @@ -533,11 +549,12 @@ QSplitter::handle:pressed { image: url(skin:/style/style_handle_checked.png); ba QSplitter::handle:horizontal { width: 6px; } QSplitter::handle:vertical { height: 6px;} -QPushButton { font-size: 10pt; +QPushButton { + font-size: 10px; font-family: "Open Sans";} /* Extra declaration for QRadionButton otherwise it shows up with wrong colors in Linux with Gnome */ QLabel, QRadioButton { - font-size: 10pt; + font-size: 13px; background: transparent; color: #C1C1C1;} diff --git a/res/skins/Shade/style_dark.qss b/res/skins/Shade/style_dark.qss index 38379807e22..10b43c404d4 100644 --- a/res/skins/Shade/style_dark.qss +++ b/res/skins/Shade/style_dark.qss @@ -84,7 +84,13 @@ QHeaderView::section { QHeaderView::up-arrow, QHeaderView::down-arrow { background-color: rgba(63,48,65,160); -} + } + QHeaderView::up-arrow { + image: url(skin:/btn/btn_lib_sort_up_green.png) + } + QHeaderView::down-arrow { + image: url(skin:/btn/btn_lib_sort_down_green.png) + } WLibrary QPushButton:!enabled { background-color: #4C4B4D; @@ -101,7 +107,7 @@ WLibrary QPushButton:!enabled { } WLibrary QRadioButton::indicator:checked { - background: url(skin:/btn/btn_lib_radio_button_on_dark.svg) center center; + image: url(skin:/btn/btn_lib_radio_button_on_green.svg) center center; } /* Hotcue Color: No Color */ From bbe3511e756a5d89e194fe6cf1586edc726499b7 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Sat, 26 Oct 2019 22:41:04 +0200 Subject: [PATCH 23/30] Shade: use pixel font for Broadcast button --- res/skins/Shade/btn/btn_broadcast_connected.png | Bin 622 -> 269 bytes .../Shade/btn/btn_broadcast_unconnected.png | Bin 640 -> 264 bytes res/skins/Shade/btn/btn_broadcast_warning.png | Bin 642 -> 264 bytes res/skins/Shade/btn/btn_lib_sort_down_dark.png | Bin 846 -> 0 bytes res/skins/Shade/btn/btn_lib_sort_up_dark.png | Bin 740 -> 0 bytes 5 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 res/skins/Shade/btn/btn_lib_sort_down_dark.png delete mode 100644 res/skins/Shade/btn/btn_lib_sort_up_dark.png diff --git a/res/skins/Shade/btn/btn_broadcast_connected.png b/res/skins/Shade/btn/btn_broadcast_connected.png index b2ff87700963e68849049a0e633aac67b32c7c46..22b41b5aaf5f4f3ed1fffd39c068e53660f74dd5 100644 GIT binary patch delta 196 zcmaFI(#tdLWZl(40VgagM11_lP%%#er@=ltB<)VvZPmw~~#C^fMpHASI3vm`^o z-P1Q9MK6^dC|>C4;uxZFJ~?55a6-+)h5zJZ1CoyW9ut>)^K@ih z%x?sO3354~bPQY#7*kyJZLa+HUK4+!<814WFApZA+a7!#n-ae0bfU4$d>ihC8;**K u9QnoZEI`a@-DjX7QzG_Hm^gvoO^$(qdyl6@3k!=S$XTAQelF{r5}E)9X-n4t delta 552 zcmV+@0@wYG0`3HmQGeeF9uy8YuY1L+0000PbVXQnLvL+uWo~o;Lvm$dbY)~9cWHEJ zAV*0}P*;Ht7XSbO)=5M`R4C8AQaxx>VH7>*efcv@;1OC&3~VH`M&E=Ukubyywm;T zo^$TKz<)9h23G*imBz-5D4ls${qU-kjt?`Ds&v;r70S>XC$sxoil6gKUiZNnSjWF- zGaVy88f^AbI&6Pc{`N2vDbxFDI?>pd{F2w*15}yLC2e0n2H+4>Lc9iKf#6*ME_plM z+xcXqt&N^YKYy>UY!=Vw-Ig7jp;5`K+J<8e9<@HAZU0nE5H)~MS__=b3tolx#|LVrvxX0d?;{4m?QCK zV&!88KxeCTV2y&DP_`jl48_dlpm$>`lY-!sF)S!cMt?z>f$T0vi1=3V;JQ$f+Ls%B zVtpo*Rf-(0Pdaw3;HDuM7hn|tnmu!skPAU?*ovMb8L^aE03}QC(4eBWwx$3!RERTs zfV>_5rjRe=`&4Zx%(oyP%I?15mTQ}ayz^%mXN}-`tF4dtMj!iq?V+IVyzr_9xCUar qKIzzheIdhg!Hrg?bCG}j-oF5w$-ghB6beNE0000A8W}HVzSnymTY|n2r-!lxgD>Y0@483Zss2f$lcJA6A$tl7A>IEHSO9AVqH>v;t002ovPDHLkV1fXPNzecQ delta 570 zcmV-A0>%A^0)PdOQGeeG0TT@))EQ}r0000PbVXQnLvL+uWo~o;Lvm$dbY)~9cWHEJ zAV*0}P*;Ht7XSbO=t)FDR4C8YP`ztYaTGo0_kMXVX5T`V08LAQ2Li=Y;21%JgF+d`;~HqX9y9W;@k z|A1$@oOACz_gta@F4H5%4k+Khf6e`nPM>Mgwi8=;y|GvM*r2ZHBB)h9f@=gHwz|=9T7CYIVeB z^!%=_1G6ut3v&RVYDShaM+9hF`?S>INi{A+C&^)mR7j55EnDrz^u_>0rXcKvNNb%I ze7k-1>`n^iNVTs<>$)yzC-7!s;>tRJ^`X(+Jb-q9Wq$*#F5ML1nHAdfp4xm1@*za-0l=LbZV7^0e~#jS1h`!F zRuc%M>oZppHrMpK`E&0ikQ@YKsm!>8e_?RYwGL&oCjM9a1O-~Gzur-YJ^%m!07*qo IM6N<$g5T&2Y5)KL diff --git a/res/skins/Shade/btn/btn_broadcast_warning.png b/res/skins/Shade/btn/btn_broadcast_warning.png index 8c5e3dad94ebe600978b7d6df9ec8db8e4ad3a73..b6d20bb12036576dc37b45173c8d01dadb53d844 100644 GIT binary patch delta 152 zcmV;J0B8S#1&9KWQ3~S<8WTA-_D*Tsky|T&0BlJ_K~yNuV_={YV0`*U=|8%lw8%Zi zr*D-0ON-oN^bU+?+`4|@e;A*Efq{XL9&GX~Fhwu{WJM5-3mLJw5SJcY@+|ngi|k5t zIc$dGlV>3mwzz_VSRcV0%0kF>-huIq(jp5P3He~;0RWXCN_gp>umk`A002ovPDHK) GLSTaY??I*j delta 532 zcmV+v0_**V0)hpQQ3~M*7ZwQ>NXEthky|T&0p>|WK~yNuy;41BQ(+W6_xoPH)YL#o zC@F1CUdVf7sty)Whf>f{Ty+Q(6vUxY5IVRCLPs~Ts8d~vlSK#Xq_{YA5h9qMm!CEg zYDJ4C&Ch%9yDohpP)G4j_vgSl=W>AmR5Uu=Uk2sxnQ7@uKQry@ZhcBd%tSQ)zEWv_ z-CBTOY+5tFyYy|&E)SMoK-{@#P4)ZytJQ9Mskn;m{1_aViD+DNUw3+A-{!vkSeUh@LUia@FZS$y%!0^Zg6iWaFc=m$^D7X_J}W`dU9XB&~Tq z-A=7SK#rmytfz<%ND zbld>0XpIFadC~>v)zNd9Dbn1})&{Jj|_=wClK!ndw6)BI;_KiUjczOzQxU zGwXX=<7t3ZM2lMEp?j#$xUPThXgwa>%~YkTHC8=frPN5r{u;wq@67Oa*;fBL-hTij W@W*TSpe1_%0000Fdh=h*eg^fa_-YkthZRrrVw_jv*Dd-rn&IVpbG5TKHnE zWkBCD^%EDrI7D{uo)R@{ePiW?_viIO*HdDr z;^%Gus?MC~TpxbzVzINrmxI@}U%%L^DDdmS>xrd3Hv~9pKjfaZa?9mtvHP(tMYcMD zDY35Ryq*3xCzeBhe$1<^d(+9@^7EsumH(SwHW0%oUSmUpf&ISf=e(jq0?&?@pZ~M) z2qRE!-df=-5rs4T?{8HZGP4Q%`ts-dE<DOn%~OJ2z5ac= zWMT1&s}ET3MQLu$v!8Hksz6P&02?p!{G2PdlAgtvE1ao*s=amF<&QFkzpM2Gp6&TG zx9|CmJFLwDHP-i2;_e*PDxa_5)BL`D%*>+r;|b6ZJ4+&k(pw(PW?7)@^ud?y0;l2+ zHP#mm0yUGF&-4h?bTgdk0FsPnT7V?e8K8JKbBv_ok4X$MfFdh=h*eg^K<@Bb0d)ojrb15_$B>F!Z|^!5T@Dan3D~{8 zV1W#;--E>m8~2!NuUZk(;L>+De%AN!TORwDKVSRy^V>3O%iHI^&yUYve)(ld<<5Cq zH@Fs^BC6gXfd0%S0Q7(5`61|Wllqn$a1 z@jyvSqrVt~ZjH{N1M1QZVm4xl4Q`L1+BfV65U2Xd6TkZ z5j~NNTPAEYKCX0zPoXB+y5o@|i@?5(b6qY9Fmc?!(YGjqgRvz)Cq3}Vw_>1s!~b=+ z*(&hV-2S-t>zc#O40pKgIQTgV@_#7U2prh^sQCi}!}mV^L$b^^Ty`Ag93L`%DBKY| zu=r7P0XsuKP@Q?`DO%rn zfIU$-@j>&3PJ<7QH(VrsDC8*d)Ciafve|LW=3tg@@oj13KcsdDud?&^>uMU`KRCYr z$>HUvZGpb^TOO$^QB%BY@1B_Rk(xl3)xWvQt67@!{jS&Fn=jgQ(0uvl>))5j^6azZ zxW7yPY{G}Ljz6|nU*clBFVph>SDnauTwt{ zRwG|&f1U%RSiV-je;)(TnC)+@`guSi(dBd9SwV`c%jUWRtpqa4=bq;SNzLE*IzIDi WdF0Y9FWG_Vk-^i|&t;ucLK6UL1uZE6 From 913a227ea1129cb8f5cfe8871b2fc1827d9a43a3 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Sat, 26 Oct 2019 22:43:19 +0200 Subject: [PATCH 24/30] tweak LateNight menu checkbox --- res/skins/LateNight/style.qss | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/res/skins/LateNight/style.qss b/res/skins/LateNight/style.qss index 5d4af6f57cd..8340ca7d296 100644 --- a/res/skins/LateNight/style.qss +++ b/res/skins/LateNight/style.qss @@ -2136,6 +2136,9 @@ WEffectSelector { QMenu::item { padding: 5px 13px 5px 20px; } + QMenu::item:!enabled { + color: #5e4507; + } QMenu QCheckBox { padding: 2px 10px 2px 3px; } @@ -2151,10 +2154,19 @@ WEffectSelector { image: url(skin:/buttons/btn_lib_checkmark.svg); border: 1px solid #0f0f0f; } - QMenu::right-arrow { - width: 10px; - height: 10px; - image: url(skin:/style/menu_arrow.svg); + /* disabled menu checkbox */ + QMenu QCheckBox::indicator:!enabled { + border: 1px solid #222; + background-color: #222; + color: #5e4507; + } + QMenu QCheckBox:!enabled { + color: #5e4507; + } + QMenu::right-arrow { + width: 10px; + height: 10px; + image: url(skin:/style/menu_arrow.svg); } QMenu::right-arrow:selected { image: url(skin:/style/menu_arrow_selected.svg); From 9821062130455fc3e0169ecfa31b3688b541e595 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Sun, 27 Oct 2019 02:19:35 +0200 Subject: [PATCH 25/30] fix scaling issues, tweak menus --- res/skins/Deere/style.qss | 29 +++++--- res/skins/LateNight/style.qss | 5 +- res/skins/Shade/style.qss | 13 ++-- res/skins/Shade/style_dark.qss | 6 +- .../Tango/buttons/btn_lib_checkmark_white.svg | 1 + res/skins/Tango/style.qss | 69 +++++++++++++++---- 6 files changed, 90 insertions(+), 33 deletions(-) create mode 100644 res/skins/Tango/buttons/btn_lib_checkmark_white.svg diff --git a/res/skins/Deere/style.qss b/res/skins/Deere/style.qss index 85674a65c67..e573b0008ca 100644 --- a/res/skins/Deere/style.qss +++ b/res/skins/Deere/style.qss @@ -323,9 +323,9 @@ QHeaderView::section { padding: 2px; background: #1A1A1A; border-top: none; + border-left: none; border-bottom: 1px solid #141414; - border-left: 1px solid #141414; - border-right: none; + border-right: 1px solid #141414; } QHeaderView::section:selected { @@ -335,10 +335,15 @@ QHeaderView::section:selected { background: #1A1A1A; border-top: none; border-bottom: 1px solid #141414; - border-left: 1px solid #141414; border-right: none; } +QHeaderView::up-arrow, +QHeaderView::down-arrow { + background-color: rgba(26,26,26,220); + margin: 0px -1px 0px 0xp; + padding: 0px; +} QHeaderView::up-arrow { image: url(skin:/image/style_sort_up.svg) } @@ -354,6 +359,7 @@ WSearchLineEdit { border: 1px solid #4B4B4B; background-color: #1e1e1e; color: #d2d2d2; + font-size: 13px; } WSearchLineEdit:focus { @@ -522,11 +528,11 @@ WLibrary QRadioButton::indicator { } WLibrary QRadioButton::indicator:checked { - background: url(skin:/icon/ic_radio_button_on_18px.svg); + image: url(skin:/icon/ic_radio_button_on_18px.svg); } WLibrary QRadioButton::indicator:unchecked { - background: url(skin:/icon/ic_radio_button_off_18px.svg); + image: url(skin:/icon/ic_radio_button_off_18px.svg); } /* buttons in library (in hierarchical order of appearance) Style them just as the other regular buttons */ @@ -748,7 +754,9 @@ QAbstractScrollArea::corner { background-color: #222; } -WWidget, QLabel { +WWidget, +QLabel, +QPushButton { font-family: "Open Sans"; font-size: 12px; text-transform: uppercase; @@ -2020,18 +2028,17 @@ WEffectSelector { border: 1px solid #333; } QMenu::right-arrow { - width: 10px; - height: 10px; - image: url(skin:/style/menu_arrow.svg); + width: 16px; + height: 16px; + image: url(skin:/icon/ic_chevron_right_48px.svg); } QMenu::right-arrow:selected { - image: url(skin:/style/menu_arrow_selected.svg); } QHeaderView QMenu::indicator { width: 12px; height: 10px; - margin-left: 10px; + margin-left: 2px; border: none; background: none; } diff --git a/res/skins/LateNight/style.qss b/res/skins/LateNight/style.qss index 8340ca7d296..e5f443846fc 100644 --- a/res/skins/LateNight/style.qss +++ b/res/skins/LateNight/style.qss @@ -47,7 +47,10 @@ QToolTip { border-radius: 2px; } -WPushButton, QPushButton { +WPushButton, +QPushButton, +WLibrary QLabel, +WSearchLineEdit { font-size: 11px/12px; } diff --git a/res/skins/Shade/style.qss b/res/skins/Shade/style.qss index 8571d4f163e..253ca44f811 100644 --- a/res/skins/Shade/style.qss +++ b/res/skins/Shade/style.qss @@ -93,6 +93,8 @@ WLibrary QPushButton:enabled { color: #060613; background-color: #aab2b7; } +WLibrary QPushButton:!enabled { + font: 13px;} WEffectSelector, WEffectSelector QAbstractItemView, WEffectSelector::down-arrow, @@ -138,6 +140,10 @@ QMenu { border-color: #767d82; background-color: #7e868b; } + QMenu::item:!enabled, + QMenu QCheckBox:!enabled { + color: #666; + } /* common colors for WEffectSelector, QMenu, QToolTip */ @@ -184,9 +190,6 @@ WEffectSelector { QMenu::item { padding: 4px 13px 4px 20px; } - QMenu::item:!enabled { - color: #444; - } QMenu::separator { height: 0px; border-top: 1px solid #71777a; @@ -568,11 +571,11 @@ WLibrary QRadioButton { WLibrary QLabel { margin: 0px 3px 3px 0px; } WLibrary QRadioButton::indicator:checked { - background: transparent url(skin:/btn/btn_lib_radio_button_on.svg) center center; + image: url(skin:/btn/btn_lib_radio_button_on.svg) center center; } WLibrary QRadioButton::indicator:unchecked { - background: transparent url(skin:/btn/btn_lib_radio_button_off.svg) center center; + image: url(skin:/btn/btn_lib_radio_button_off.svg) center center; } WLibrary QPushButton { diff --git a/res/skins/Shade/style_dark.qss b/res/skins/Shade/style_dark.qss index 10b43c404d4..0a12449331c 100644 --- a/res/skins/Shade/style_dark.qss +++ b/res/skins/Shade/style_dark.qss @@ -45,9 +45,13 @@ QMenu::separator { } /* disabled menu checkbox */ QMenu QCheckBox::indicator:!enabled { - border-color: #555; + border-color: #444; background-color: #666; } + QMenu::item:!enabled, + QMenu QCheckBox:!enabled { + color: #444; + } #EffectSelectorGroup[highlight="1"]{ diff --git a/res/skins/Tango/buttons/btn_lib_checkmark_white.svg b/res/skins/Tango/buttons/btn_lib_checkmark_white.svg new file mode 100644 index 00000000000..a7d3ecf1436 --- /dev/null +++ b/res/skins/Tango/buttons/btn_lib_checkmark_white.svg @@ -0,0 +1 @@ + diff --git a/res/skins/Tango/style.qss b/res/skins/Tango/style.qss index 3312523bfac..14139a2f29e 100644 --- a/res/skins/Tango/style.qss +++ b/res/skins/Tango/style.qss @@ -29,12 +29,23 @@ WSearchLineEdit { } WPushButton { - font-family: Ubuntu; font-weight: normal; - font-size: 12px/12px; border-radius: 3px; } +WPushButton, +WSearchLineEdit, +WLibrary QPushButton, +WLibrary QLabel, +WLibrary QRadioButton, +QMenu, +QMenu QCheckBox, +QToolTip, +QHeaderView { + font-family: Ubuntu; + font-size: 12px/12px; +} + WWidgetGroup { qproperty-layoutAlignment: 'AlignHCenter | AlignTop'; border-radius: 1px; @@ -1389,10 +1400,10 @@ WBeatSpinBox, /* Kill indicators underneath EQ knobs */ #EQKilledUnderlay[displayValue="1"] { - background: url(skin:/knobs_sliders/knob_eq_killed.svg) no-repeat center center; + image: url(skin:/knobs_sliders/knob_eq_killed.svg) no-repeat center center; } #QuickFxDisabledUnderlay[displayValue="0"] { - background: url(skin:/knobs_sliders/knob_quickFX_disabled.svg) no-repeat center center; + image: url(skin:/knobs_sliders/knob_quickFX_disabled.svg) no-repeat center center; } #QuickFXSide { @@ -2093,8 +2104,7 @@ QMenu { } QMenu::separator { height: 0px; - border-top: 1px solid #111; - border-bottom: 1px solid #222; + border-top: 1px solid #0f0f0f; margin: 1px 4px 1px 4px; } /* actually this only needs to be set for QCheckBox */ @@ -2133,6 +2143,35 @@ QMenu { image: url(skin:/buttons/btn_lib_checkmark.svg); border: 1px solid #1e1e1e; } + /* disabled menu checkbox */ + QMenu QCheckBox::indicator:!enabled { + background-color: #333; + border: 1px solid #222; + } + QMenu::item:!enabled, + QMenu QCheckBox:!enabled { + color: #555; + } + QMenu::right-arrow { + width: 8px; + height: 16px; + margin-right: 4px; + image: url(skin:/buttons/btn_arrow_right.svg); + } + QMenu::right-arrow { + image: url(skin:/buttons/btn_arrow_right_hover.svg); + } + + QHeaderView QMenu::indicator { + width: 10px; + height: 10px; + margin-left: 2px; + border: none; + background: none; + } + QHeaderView QMenu::indicator:checked { + image: url(skin:/buttons/btn_lib_checkmark_white.svg); + } #TEST { background-color: #451278; @@ -2361,23 +2400,23 @@ QHeaderView { width: 12px; padding-right: 2px; border-right: 1px solid #585858; - background-color: #333; + background-color: rgba(51,51,51,200); } QHeaderView::up-arrow:hover, QHeaderView::down-arrow:hover { - background-color: #585858; + background-color: rgba(88,88,88,200); } QHeaderView::up-arrow { - image: url(skin:/graphics/library_sort_up.svg) + image: url(skin:/graphics/library_sort_up.svg); } QHeaderView::up-arrow:hover { - image: url(skin:/graphics/library_sort_down.svg) + image: url(skin:/graphics/library_sort_down.svg); } QHeaderView::down-arrow { - image: url(skin:/graphics/library_sort_down.svg) + image: url(skin:/graphics/library_sort_down.svg); } QHeaderView::down-arrow:hover { - image: url(skin:/graphics/library_sort_up.svg) + image: url(skin:/graphics/library_sort_up.svg); } /* Scroll bars */ @@ -2639,7 +2678,7 @@ WLibrary QPushButton { border: 1px solid #888; } QTableView::indicator:checked { - background: transparent url(skin:/buttons/btn_lib_checkmark.svg); + image: url(skin:/buttons/btn_lib_checkmark.svg); } QTableView::indicator:unchecked { background: none; @@ -2703,11 +2742,11 @@ WLibrary QRadioButton#radioButtonRecentlyAdded { } WLibrary QRadioButton::indicator:checked { - background: transparent url(skin:/buttons/btn_lib_radio_button_on.svg) center center; + image: url(skin:/buttons/btn_lib_radio_button_on.svg) center center; } WLibrary QRadioButton::indicator:unchecked { - background: transparent url(skin:/buttons/btn_lib_radio_button_off.svg) center center; + image: url(skin:/buttons/btn_lib_radio_button_off.svg) center center; } /* Test :: increase font size of WOverview "Ready to play, analyzing..." etc. WOverview { From 25d630377257e6f0f0a3cf537434d4f6289e067b Mon Sep 17 00:00:00 2001 From: ronso0 Date: Sun, 27 Oct 2019 15:22:16 +0100 Subject: [PATCH 26/30] test: parent qmenu to QApplication::focusWidget() --- src/library/baseexternallibraryfeature.cpp | 27 ++++++++++++++-------- src/library/baseexternallibraryfeature.h | 3 +++ src/library/crate/cratefeature.cpp | 12 +++++++++- 3 files changed, 31 insertions(+), 11 deletions(-) diff --git a/src/library/baseexternallibraryfeature.cpp b/src/library/baseexternallibraryfeature.cpp index 8eee4928bdc..baf34a0b110 100644 --- a/src/library/baseexternallibraryfeature.cpp +++ b/src/library/baseexternallibraryfeature.cpp @@ -1,13 +1,13 @@ #include "library/baseexternallibraryfeature.h" -#include - #include "library/basesqltablemodel.h" +#include BaseExternalLibraryFeature::BaseExternalLibraryFeature(QObject* pParent, TrackCollection* pCollection) : LibraryFeature(pParent), - m_pTrackCollection(pCollection) { + m_pTrackCollection(pCollection), + m_pMenu(nullptr) { m_pAddToAutoDJAction = new QAction(tr("Add to Auto DJ Queue (bottom)"), this); connect(m_pAddToAutoDJAction, &QAction::triggered, @@ -42,13 +42,20 @@ void BaseExternalLibraryFeature::onRightClickChild(const QPoint& globalPos, QMod //Save the model index so we can get it in the action slots... m_lastRightClickedIndex = index; - //Create the right-click menu - QMenu menu; - menu.addAction(m_pAddToAutoDJAction); - menu.addAction(m_pAddToAutoDJTopAction); - menu.addSeparator(); - menu.addAction(m_pImportAsMixxxPlaylistAction); - menu.exec(globalPos); + if (m_pMenu == nullptr) { + m_pMenu = new QMenu(); + } + // Parent the right-click menu the focussed widget in order to make it + // stylable with skin stylesheets rather than ugly OS styling. + auto focusWidget = QApplication::focusWidget(); + m_pMenu->setParent(focusWidget); + m_pMenu->clear(); + + m_pMenu->addAction(m_pAddToAutoDJAction); + m_pMenu->addAction(m_pAddToAutoDJTopAction); + m_pMenu->addSeparator(); + m_pMenu->addAction(m_pImportAsMixxxPlaylistAction); + m_pMenu->exec(globalPos); } void BaseExternalLibraryFeature::slotAddToAutoDJ() { diff --git a/src/library/baseexternallibraryfeature.h b/src/library/baseexternallibraryfeature.h index efca53c271d..d40193ae39c 100644 --- a/src/library/baseexternallibraryfeature.h +++ b/src/library/baseexternallibraryfeature.h @@ -3,6 +3,7 @@ #include #include +#include #include "library/libraryfeature.h" @@ -43,6 +44,8 @@ class BaseExternalLibraryFeature : public LibraryFeature { QAction* m_pAddToAutoDJAction; QAction* m_pAddToAutoDJTopAction; QAction* m_pImportAsMixxxPlaylistAction; + + QMenu *m_pMenu; }; #endif // BASEEXTERNALLIBRARYFEATURE_H diff --git a/src/library/crate/cratefeature.cpp b/src/library/crate/cratefeature.cpp index 965187ac829..cd5a9db80d9 100644 --- a/src/library/crate/cratefeature.cpp +++ b/src/library/crate/cratefeature.cpp @@ -1,5 +1,6 @@ #include "library/crate/cratefeature.h" +#include #include #include #include @@ -284,7 +285,7 @@ void CrateFeature::bindWidget(WLibrary* libraryWidget, void CrateFeature::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) { // Create the right-click menu and parent it to the sidebar widget in // order to make it stylable with skin stylesheet rather than ugly OS styling. - m_pMenu = new QMenu(pSidebarWidget); +// m_pMenu = new QMenu(pSidebarWidget); } TreeItemModel* CrateFeature::getChildModel() { @@ -368,7 +369,15 @@ void CrateFeature::onRightClickChild(const QPoint& globalPos, QModelIndex index) m_pLockCrateAction->setText(crate.isLocked() ? tr("Unlock") : tr("Lock")); + if (m_pMenu == nullptr) { + m_pMenu = new QMenu(); + } + // Parent the right-click menu the focussed widget in order to make it + // stylable with skin stylesheets rather than ugly OS styling. + auto focusWidget = QApplication::focusWidget(); + m_pMenu->setParent(focusWidget); m_pMenu->clear(); + m_pMenu->addAction(m_pCreateCrateAction.get()); m_pMenu->addSeparator(); m_pMenu->addAction(m_pRenameCrateAction.get()); @@ -385,6 +394,7 @@ void CrateFeature::onRightClickChild(const QPoint& globalPos, QModelIndex index) } m_pMenu->addAction(m_pExportPlaylistAction.get()); m_pMenu->addAction(m_pExportTrackFilesAction.get()); + m_pMenu->popup(globalPos); } From 76d6e4453446bf26a0ee00559f285b4eac5abdf6 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Mon, 28 Oct 2019 03:40:39 +0100 Subject: [PATCH 27/30] style Tango skin settings menu like context menus --- res/skins/Tango/skin_settings.xml | 1284 ++++++++--------- .../Tango/skin_settings_button_multi.xml | 2 +- .../skin_settings_category_button_2state.xml | 30 + res/skins/Tango/style.qss | 124 +- 4 files changed, 733 insertions(+), 707 deletions(-) create mode 100644 res/skins/Tango/skin_settings_category_button_2state.xml diff --git a/res/skins/Tango/skin_settings.xml b/res/skins/Tango/skin_settings.xml index 2423cd5851d..0fa1b2ca83b 100644 --- a/res/skins/Tango/skin_settings.xml +++ b/res/skins/Tango/skin_settings.xml @@ -22,6 +22,7 @@ Description: vertical 200f,1me + SkinSettingsHeader horizontal @@ -30,7 +31,7 @@ Description: @@ -39,7 +40,7 @@ Description: skin_settings SkinSettingsClose - 20f,24f + 20f,20f 2 0 @@ -55,672 +56,606 @@ Description: - - - SkinSettingsCategory - 200,205 - 200,280 - me,me - vertical - + - + - + + + 1,2 + i,7 + me,min + + + + 182,13 + 182,20 + me,me + horizontal + - - - i,15 + 3f,1min + + 182,13 + 182,20 me,me - + stacked + + + 0f,0f + + + SubmenuCover + vertical + 182f,13me + + [Tango],hotcues + + visible + + - + + 182,13 + 182,20 + me,me + horizontal + + + + 0me,1min + + + + + + + + + + + + + + + + DeckIndicatorSettings + vertical + 182,28 + 182,35 + me,me + + + + AlignTopLeft + 50me,15f horizontal -