From 31426ba0effc29f25f1aa69be784533e1b022ee6 Mon Sep 17 00:00:00 2001 From: Mike Skec Date: Sun, 21 Feb 2021 07:48:45 +1100 Subject: Add light icons for favourite/certificate buttons for dark themes --- src/main.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/main.cpp') 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) -- cgit v1.2.3