diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2015-10-07 13:12:14 +0200 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2015-10-12 11:39:24 +0200 |
commit | 78a4e9cb89830191e77c558759e845e5a15b9cc7 (patch) | |
tree | bb6c78940731700fc3f5a47b114ee872cfaecd44 /vcl/source/gdi | |
parent | 09374b5acdec0743a1f860f70ccd15eda24fa399 (diff) |
vcl: recolor images (icons) to be more visible in a dark theme
This adds recoloring of images/icons (suited for breeze and sifr)
so they are more visible when a dark theme is used (for example gtk3
can switch to a dark theme). LO must be started with environment
variable VCL_ICONS_FOR_DARK_THEME set to 1.
open issues - currently all images/icons are recolored but not all
images should get recolored.
Change-Id: Ibc42e30af79bb4c4f04c67b760019311b97b2cc6
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r-- | vcl/source/gdi/impimagetree.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx index 5116a3621ec4..38cfefdb14fe 100644 --- a/vcl/source/gdi/impimagetree.cxx +++ b/vcl/source/gdi/impimagetree.cxx @@ -45,6 +45,8 @@ #include "impimagetree.hxx" #include <vcldemo-debug.hxx> +#include <vcl/BitmapProcessor.hxx> + using namespace css; namespace { @@ -123,7 +125,12 @@ bool ImplImageTree::loadImage(OUString const & name, OUString const & style, Bit { try { if (doLoadImage(name, aStyle, bitmap, localized)) + { + static bool bIconsForDarkTheme = !!getenv("VCL_ICONS_FOR_DARK_THEME"); + if (bIconsForDarkTheme) + bitmap = BitmapProcessor::createLightImage(bitmap); return true; + } } catch (css::uno::RuntimeException &) {} |