diff options
| author | Mike Skec <skec@protonmail.ch> | 2021-02-21 07:48:45 +1100 |
|---|---|---|
| committer | Felix Queißner <felix@ib-queissner.de> | 2021-02-23 11:31:33 +0100 |
| commit | 31426ba0effc29f25f1aa69be784533e1b022ee6 (patch) | |
| tree | c82bc13c7c07cfef773f7851bf346c170f04a885 /src/main.cpp | |
| parent | 804592dd57a8444e0e54d5c31b28bc646a3fdb9a (diff) | |
| download | kristall-31426ba0effc29f25f1aa69be784533e1b022ee6.tar.gz | |
Add light icons for favourite/certificate buttons for dark themes
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 476a333..d54ae22 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -519,6 +519,11 @@ void kristall::setIconTheme(IconTheme icotheme, Theme uitheme) "dark" // Dark theme (light icons) }; + auto ret = []() { + if (main_window && main_window->curTab()) + main_window->curTab()->refreshToolbarIcons(); + }; + if (icotheme == IconTheme::automatic) { if (uitheme == Theme::os_default) @@ -531,16 +536,23 @@ void kristall::setIconTheme(IconTheme icotheme, Theme uitheme) QIcon::setThemeName(""); #endif + kristall::options.explicit_icon_theme = IconTheme::dark; + + ret(); return; } // Use icon theme based on UI theme QIcon::setThemeName(icothemes[(int)uitheme]); + kristall::options.explicit_icon_theme = (IconTheme)uitheme; + ret(); return; } // Use icon specified by user QIcon::setThemeName(icothemes[(int)icotheme]); + kristall::options.explicit_icon_theme = (IconTheme)icotheme; + ret(); } void kristall::setUiDensity(UIDensity density, bool previewing) |
