diff --git a/src/data/extra/themes/moonlight/interface.qss b/src/data/extra/themes/moonlight/interface.qss index ace2a3e7..c8e032da 100644 --- a/src/data/extra/themes/moonlight/interface.qss +++ b/src/data/extra/themes/moonlight/interface.qss @@ -580,8 +580,8 @@ QTreeView { } QTreeView::item { - padding-top: 5px; - padding-bottom: 5px; + padding-top: 2px; + padding-bottom: 2px; } QTreeView::item:hover { @@ -639,8 +639,8 @@ QListView { } QListView::item { - padding-top: 5px; - padding-bottom: 5px; + padding-top: 2px; + padding-bottom: 2px; } QListView::item:hover { diff --git a/src/data/extra/themes/moonlight/palette.json b/src/data/extra/themes/moonlight/palette.json index 0daaf67e..8f5fc181 100644 --- a/src/data/extra/themes/moonlight/palette.json +++ b/src/data/extra/themes/moonlight/palette.json @@ -608,6 +608,12 @@ "toolbar" : { "bg" : "@base#content#bg" } + }, + "quickselector" : { + "item_icon" : { + "fg" : "@palette#bg2_9", + "border" : "@palette#bg2_9" + } } } } diff --git a/src/data/extra/themes/native/interface.qss b/src/data/extra/themes/native/interface.qss index 21943b34..380a7eb8 100644 --- a/src/data/extra/themes/native/interface.qss +++ b/src/data/extra/themes/native/interface.qss @@ -74,14 +74,14 @@ QMainWindow::separator { /* NotebookExplorer */ vnotex--NotebookNodeExplorer QTreeView::item { - padding-top: 3px; - padding-bottom: 3px; + padding-top: 2px; + padding-bottom: 2px; } /* OutlineViewer */ vnotex--OutlineViewer QTreeView::item { - padding-top: 3px; - padding-bottom: 3px; + padding-top: 2px; + padding-bottom: 2px; } /* QToolButton used for action */ diff --git a/src/data/extra/themes/native/palette.json b/src/data/extra/themes/native/palette.json index 91967386..ea0f4075 100644 --- a/src/data/extra/themes/native/palette.json +++ b/src/data/extra/themes/native/palette.json @@ -117,6 +117,12 @@ "navigationlabel" : { "fg" : "@widgets#toolbox#title#button#active#fg", "bg" : "@widgets#toolbox#title#button#active#bg" + }, + "quickselector" : { + "item_icon" : { + "fg" : "#535c65", + "border" : "#535c65" + } } } } diff --git a/src/data/extra/themes/pure/interface.qss b/src/data/extra/themes/pure/interface.qss index ace2a3e7..c8e032da 100644 --- a/src/data/extra/themes/pure/interface.qss +++ b/src/data/extra/themes/pure/interface.qss @@ -580,8 +580,8 @@ QTreeView { } QTreeView::item { - padding-top: 5px; - padding-bottom: 5px; + padding-top: 2px; + padding-bottom: 2px; } QTreeView::item:hover { @@ -639,8 +639,8 @@ QListView { } QListView::item { - padding-top: 5px; - padding-bottom: 5px; + padding-top: 2px; + padding-bottom: 2px; } QListView::item:hover { diff --git a/src/data/extra/themes/pure/palette.json b/src/data/extra/themes/pure/palette.json index ec677a37..23fa17dd 100644 --- a/src/data/extra/themes/pure/palette.json +++ b/src/data/extra/themes/pure/palette.json @@ -604,6 +604,12 @@ "toolbar" : { "bg" : "@base#content#bg" } + }, + "quickselector" : { + "item_icon" : { + "fg" : "@base#master#bg", + "border" : "@base#master#bg" + } } } } diff --git a/src/widgets/quickselector.cpp b/src/widgets/quickselector.cpp index 5a4cbc5e..79792b33 100644 --- a/src/widgets/quickselector.cpp +++ b/src/widgets/quickselector.cpp @@ -11,6 +11,8 @@ #include #include +#include +#include #include "lineedit.h" #include "listwidget.h" @@ -93,11 +95,15 @@ void QuickSelector::updateItemList() { m_itemList->clear(); + const auto &themeMgr = VNoteX::getInst().getThemeMgr(); + for (int i = 0; i < m_items.size(); ++i) { const auto &item = m_items[i]; auto listItem = new QListWidgetItem(m_itemList); - auto icon = IconUtils::drawTextIcon(item.m_shortcut, "blue", "darkgreen"); + auto icon = IconUtils::drawTextIcon(item.m_shortcut, + themeMgr.paletteColor(QStringLiteral("widgets#quickselector#item_icon#fg")), + themeMgr.paletteColor(QStringLiteral("widgets#quickselector#item_icon#border"))); listItem->setIcon(icon); listItem->setText(item.m_name);