summaryrefslogtreecommitdiff
path: root/vcl/source/app/IconThemeSelector.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-10-19 12:57:09 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-10-19 12:59:19 +0100
commit75544eb042ab3fc79dd6104749a32af7e180c116 (patch)
tree07400d06d84da98f2b68e190c6197f22568f74c9 /vcl/source/app/IconThemeSelector.cxx
parent42e89217fb3b8bda7cc084c8e14ba56efa8eae3f (diff)
Resolves: tdf#102778 by default use breeze_dark when dark themes are requested
Under gtk3 if gtk-application-prefer-dark-theme is enabled or the requested icon-theme name ends in [-|_]dark Change-Id: Ia70ea3adc51ac0ec2b26d08fc960c1c7285c338b
Diffstat (limited to 'vcl/source/app/IconThemeSelector.cxx')
-rw-r--r--vcl/source/app/IconThemeSelector.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/source/app/IconThemeSelector.cxx b/vcl/source/app/IconThemeSelector.cxx
index ce91d5b2eca2..91a082ce241c 100644
--- a/vcl/source/app/IconThemeSelector.cxx
+++ b/vcl/source/app/IconThemeSelector.cxx
@@ -82,6 +82,10 @@ IconThemeSelector::SelectIconThemeForDesktopEnvironment(
if (icon_theme_is_in_installed_themes(mPreferredIconTheme, installedThemes)) {
return mPreferredIconTheme;
}
+ //if a dark variant is preferred, and we didn't have an exact match, then try our one and only dark theme
+ if (mPreferredIconTheme.endsWith("_dark") && icon_theme_is_in_installed_themes("breeze_dark", installedThemes)) {
+ return "breeze_dark";
+ }
}
OUString themeForDesktop = GetIconThemeForDesktopEnvironment(desktopEnvironment);