diff options
author | László Németh <laszlo.nemeth@collabora.com> | 2015-07-03 18:50:05 +0200 |
---|---|---|
committer | László Németh <laszlo.nemeth@collabora.com> | 2015-07-03 18:52:43 +0200 |
commit | b010e4074e5d5ee3a3905f1351f04efafe937c2a (patch) | |
tree | db442be6a9a0b5bbc1b25fd2bfdecc0cb242b20f /vcl | |
parent | 4802bf32b84655f6e1d3389070c76371ede8fbce (diff) |
tdf#92241 fix crashes and rendering of symbol set previews
Change-Id: I43397f2b0caa31c334f87acf11fc96df2e051ad8
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/ctrl.cxx | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index 0c40a341b397..21056db4c58f 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -36,6 +36,8 @@ using namespace vcl; void Control::ImplInitControlData() { mbHasControlFocus = false; + mbFont = false; + mbForeground = false; mpControlData = new ImplControlData; } @@ -417,16 +419,23 @@ void Control::ApplySettings(vcl::RenderContext& rRenderContext) { const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); - vcl::Font rFont(GetCanonicalFont(rStyleSettings)); - ApplyControlFont(rRenderContext, rFont); - - ApplyControlForeground(rRenderContext, GetCanonicalTextColor(rStyleSettings)); + if (mbFont) + { + vcl::Font rFont(GetCanonicalFont(rStyleSettings)); + ApplyControlFont(rRenderContext, rFont); + } - rRenderContext.SetTextFillColor(); + if (mbFont || mbForeground) + { + ApplyControlForeground(rRenderContext, GetCanonicalTextColor(rStyleSettings)); + rRenderContext.SetTextFillColor(); + } } -void Control::ImplInitSettings(const bool, const bool) +void Control::ImplInitSettings(const bool _bFont, const bool _bForeground) { + mbFont = _bFont; + mbForeground = _bForeground; ApplySettings(*this); } |