svtools/inc/roadmap.hxx | 1 + svtools/source/control/roadmap.cxx | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-)
New commits: commit 18d1be25a4fd3c88e4c9d74b88078810c93614a3 Author: Katarina Behrens <katarina.behr...@cib.de> Date: Tue May 17 11:23:32 2016 +0200 tdf#95954: Reasonable background for roadmap widget also move setting control font/text style to ApplySettings func Reviewed-on: https://gerrit.libreoffice.org/25054 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Katarina Behrens <katarina.behr...@cib.de> (cherry picked from commit 433cb02f88c75428fe5a34ca090fd43ae1cc855d) Change-Id: Iec71ebb42424e0d29fb5c5e155773b61bfcf2313 Reviewed-on: https://gerrit.libreoffice.org/25403 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/svtools/inc/roadmap.hxx b/svtools/inc/roadmap.hxx index a79cd18..6bbe645 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 216d3db..12a3295 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(UNDERLINE_SINGLE); - rRenderContext.SetFont(aFont); - rRenderContext.SetBackground(Wallpaper(rStyleSettings.GetFieldColor())); m_pImpl->InCompleteHyperLabel = nullptr; m_pImpl->setCurItemID(-1); m_pImpl->setComplete(true); @@ -672,6 +664,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(UNDERLINE_SINGLE); + rRenderContext.SetFont(aFont); + rRenderContext.SetBackground(rStyleSettings.GetFieldColor()); +} + RoadmapItem::RoadmapItem(ORoadmap& _rParent, const Size& _rItemPlayground) : m_aItemPlayground(_rItemPlayground) {
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits