diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-17 22:56:46 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-18 11:22:49 +0900 |
commit | b4bbb5e5d7b31caad2fbcc00382ad27df3c81001 (patch) | |
tree | 8ac345712ff92a9b33a7d54651ed27ad88f1ec67 /sw | |
parent | 2ca7795a6a723c701f295323fcc3f6c52ad37976 (diff) |
refactor how font, fg. and bg. are applied in widgets/controls
- Move vcl::RenderContext to outdev.
- Change some methods on vcl::Window to accept RenderContext
as parameter.
- Add ApplySettings to vcl::Window - This method is called before
painting. Refactor existing classes that use InitSettings to
have ApplySettings or mark the classes to be refactored later.
- Add RenderSettings for adding defered settings to rendering.
This is similar to ApplySettings but for more ad-hoc calls.
Change-Id: I4ea58461f3b6b08ccfa3e0ddd1a4a3e04f8c4f45
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/docvw/HeaderFooterWin.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/docvw/srcedtw.cxx | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index 7ee871dcee93..3b7f4046d8dd 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -135,9 +135,11 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPag m_nFadeRate( 100 ), m_aFadeTimer( ) { + //FIXME RenderContext + // Get the font and configure it vcl::Font aFont = Application::GetSettings().GetStyleSettings().GetToolFont(); - SetZoomedPointFont(aFont); + SetZoomedPointFont(*this, aFont); // Create the line control m_pLine = VclPtr<SwDashedLine>::Create(GetEditWin(), &SwViewOption::GetHeaderFooterMarkColor); diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx index 12fe31cac62c..012f34ba5f81 100644 --- a/sw/source/uibase/docvw/srcedtw.cxx +++ b/sw/source/uibase/docvw/srcedtw.cxx @@ -485,6 +485,8 @@ void TextViewOutWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& void SwSrcEditWindow::CreateTextEngine() { + // FIXME RenderContext + const Color &rCol = GetSettings().GetStyleSettings().GetWindowColor(); pOutWin = VclPtr<TextViewOutWin>::Create(this, 0); pOutWin->SetBackground(Wallpaper(rCol)); @@ -514,7 +516,7 @@ void SwSrcEditWindow::CreateTextEngine() vcl::Font aFont; aFont.SetTransparent( false ); aFont.SetFillColor( rCol ); - SetPointFont( aFont ); + SetPointFont(*this, aFont); aFont = GetFont(); aFont.SetFillColor( rCol ); pOutWin->SetFont( aFont ); |