diff --git a/YACReaderLibrary/themes/theme.h b/YACReaderLibrary/themes/theme.h index 42017d81..f02f13b6 100644 --- a/YACReaderLibrary/themes/theme.h +++ b/YACReaderLibrary/themes/theme.h @@ -255,10 +255,9 @@ struct ContentSplitterThemeTemplates { }; struct ComicsViewToolbarThemeTemplates { - QString toolbarQSS = R"( - QToolBar { border: none; } - QToolButton:checked { background-color: %1; } - )"; + QString toolbarQSS = "QToolBar { border: none; background: %1; }\n" + "QToolBar::separator { background: %2; width: 1px; margin: 5px 4px; }\n" + "QToolButton:checked { background-color: %3; }\n"; }; struct SearchLineEditThemeTemplates { diff --git a/YACReaderLibrary/themes/theme_factory.cpp b/YACReaderLibrary/themes/theme_factory.cpp index 0d8aaa37..80f2ee09 100644 --- a/YACReaderLibrary/themes/theme_factory.cpp +++ b/YACReaderLibrary/themes/theme_factory.cpp @@ -213,6 +213,8 @@ struct LibraryItemParams { struct ComicsViewToolbarParams { ComicsViewToolbarThemeTemplates t; + QColor backgroundColor; + QColor separatorColor; QColor checkedBackgroundColor; QColor iconColor; // Main icon color (replaces #f0f) }; @@ -669,7 +671,10 @@ Theme makeTheme(const ThemeParams ¶ms) return icon; }; - theme.comicsViewToolbar.toolbarQSS = cvt.t.toolbarQSS.arg(cvt.checkedBackgroundColor.name()); + theme.comicsViewToolbar.toolbarQSS = cvt.t.toolbarQSS + .arg(cvt.backgroundColor.name()) + .arg(cvt.separatorColor.name()) + .arg(cvt.checkedBackgroundColor.name()); theme.comicsViewToolbar.openInYACReaderIcon = makeComicsViewIcon(":/images/comics_view_toolbar/openInYACReader.svg"); theme.comicsViewToolbar.setAsReadIcon = makeComicsViewIcon(":/images/comics_view_toolbar/setReadButton.svg"); theme.comicsViewToolbar.setAsUnreadIcon = makeComicsViewIcon(":/images/comics_view_toolbar/setUnread.svg"); @@ -1024,6 +1029,8 @@ ThemeParams classicThemeParams() params.libraryItemParams = li; ComicsViewToolbarParams cvt; + cvt.backgroundColor = QColor(0xF0F0F0); + cvt.separatorColor = QColor(0xCCCCCC); cvt.checkedBackgroundColor = QColor(0xCCCCCC); cvt.iconColor = QColor(0x404040); params.comicsViewToolbarParams = cvt; @@ -1275,6 +1282,8 @@ ThemeParams lightThemeParams() params.libraryItemParams = li; ComicsViewToolbarParams cvt; + cvt.backgroundColor = QColor(0xF0F0F0); + cvt.separatorColor = QColor(0xCCCCCC); cvt.checkedBackgroundColor = QColor(0xCCCCCC); cvt.iconColor = QColor(0x404040); params.comicsViewToolbarParams = cvt; @@ -1526,6 +1535,8 @@ ThemeParams darkThemeParams() params.libraryItemParams = li; ComicsViewToolbarParams cvt; + cvt.backgroundColor = QColor(0x2A2A2A); + cvt.separatorColor = QColor(0x444444); cvt.checkedBackgroundColor = QColor(0x555555); cvt.iconColor = QColor(0xDDDDDD); params.comicsViewToolbarParams = cvt;