diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2016-05-17 11:23:32 +0200 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2016-05-18 08:37:55 +0000 |
commit | 433cb02f88c75428fe5a34ca090fd43ae1cc855d (patch) | |
tree | 44efe741b69874679dd17066f35c981703b4ae05 /svtools | |
parent | 4c9799d809ec99d5eef610ce2311c25f694e7a74 (diff) |
tdf#95954: Reasonable background for roadmap widget
also move setting control font/text style to ApplySettings func
Change-Id: Iec71ebb42424e0d29fb5c5e155773b61bfcf2313
Reviewed-on: https://gerrit.libreoffice.org/25054
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/inc/roadmap.hxx | 1 | ||||
-rw-r--r-- | svtools/source/control/roadmap.cxx | 20 |
2 files changed, 13 insertions, 8 deletions
diff --git a/svtools/inc/roadmap.hxx b/svtools/inc/roadmap.hxx index 5cd9a1dcdd14..6b9c50355015 100644 --- a/svtools/inc/roadmap.hxx +++ b/svtools/inc/roadmap.hxx @@ -80,6 +80,7 @@ public: Link<LinkParamNone*,void> GetItemSelectHdl( ) const; virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; virtual void GetFocus() override; + virtual void ApplySettings( vcl::RenderContext& rRenderContext ) override; protected: bool PreNotify( NotifyEvent& rNEvt ) override; diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index ddd625c958fd..9799414ce13b 100644 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.cxx @@ -204,14 +204,6 @@ ORoadmap::ORoadmap(vcl::Window* _pParent, WinBits _nWinStyle) void ORoadmap::implInit(vcl::RenderContext& rRenderContext) { - const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); - Color aTextColor = rStyleSettings.GetFieldTextColor(); - vcl::Font aFont = rRenderContext.GetFont(); - aFont.SetColor(aTextColor); - aFont.SetWeight(WEIGHT_BOLD); - aFont.SetUnderline(LINESTYLE_SINGLE); - rRenderContext.SetFont(aFont); - rRenderContext.SetBackground(Wallpaper(rStyleSettings.GetFieldColor())); m_pImpl->InCompleteHyperLabel = nullptr; m_pImpl->setCurItemID(-1); m_pImpl->setComplete(true); @@ -671,6 +663,18 @@ void ORoadmap::DataChanged(const DataChangedEvent& rDCEvt) } } +void ORoadmap::ApplySettings(vcl::RenderContext& rRenderContext) +{ + const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); + Color aTextColor = rStyleSettings.GetFieldTextColor(); + vcl::Font aFont = rRenderContext.GetFont(); + aFont.SetColor(aTextColor); + aFont.SetWeight(WEIGHT_BOLD); + aFont.SetUnderline(LINESTYLE_SINGLE); + rRenderContext.SetFont(aFont); + rRenderContext.SetBackground(rStyleSettings.GetFieldColor()); +} + RoadmapItem::RoadmapItem(ORoadmap& _rParent, const Size& _rItemPlayground) : m_aItemPlayground(_rItemPlayground) { |