diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-27 19:14:44 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-28 18:56:01 +0900 |
commit | ee25bc3cad9f31a253c2a0b0297516c7f0989222 (patch) | |
tree | 79476cf821f4d7d889cb1c486136d46db1c4382a /dbaccess/source/ui/app | |
parent | 1379e2feaad6344999358bbfb271edbaea66ce2a (diff) |
fix Base's titlewindow font, font color and background
Change-Id: Ide9c30385d15d0b8303f25d1a9eef132a32ec7d2
Diffstat (limited to 'dbaccess/source/ui/app')
-rw-r--r-- | dbaccess/source/ui/app/AppTitleWindow.cxx | 40 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppTitleWindow.hxx | 2 |
2 files changed, 31 insertions, 11 deletions
diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx index 1a28fb789703..19da267be749 100644 --- a/dbaccess/source/ui/app/AppTitleWindow.cxx +++ b/dbaccess/source/ui/app/AppTitleWindow.cxx @@ -40,9 +40,17 @@ OTitleWindow::OTitleWindow(vcl::Window* _pParent,sal_uInt16 _nTitleId,WinBits _n SetBorderStyle(WindowBorderStyle::MONO); ImplInitSettings( true, true, true ); - vcl::Window* pWindows [] = { m_aSpace1.get(), m_aSpace2.get(), m_aTitle.get() }; + const StyleSettings& rStyle = Application::GetSettings().GetStyleSettings(); + vcl::Window* pWindows[] = { m_aSpace1.get(), m_aSpace2.get(), m_aTitle.get() }; for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i) + { + vcl::Font aFont = pWindows[i]->GetControlFont(); + aFont.SetWeight(WEIGHT_BOLD); + pWindows[i]->SetControlFont(aFont); + pWindows[i]->SetControlForeground(rStyle.GetLightColor()); + pWindows[i]->SetControlBackground(rStyle.GetShadowColor()); pWindows[i]->Show(); + } } OTitleWindow::~OTitleWindow() @@ -158,18 +166,28 @@ void OTitleWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackgro if( bBackground ) SetBackground( rStyleSettings.GetFieldColor() ); +} - vcl::Window* pWindows [] = { m_aSpace1.get(), m_aSpace2.get(), m_aTitle.get()}; - for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i) - { - vcl::Font aFont = pWindows[i]->GetFont(); - aFont.SetWeight(WEIGHT_BOLD); - pWindows[i]->SetFont(aFont); - pWindows[i]->SetTextColor( aStyle.GetLightColor() ); - pWindows[i]->SetBackground( Wallpaper( aStyle.GetShadowColor() ) ); - } +void OTitleWindow::ApplySettings(vcl::RenderContext& rRenderContext) +{ + // FIXME RenderContext + AllSettings aAllSettings = rRenderContext.GetSettings(); + StyleSettings aStyle = aAllSettings.GetStyleSettings(); + aStyle.SetMonoColor(aStyle.GetActiveBorderColor());//GetMenuBorderColor()); + aAllSettings.SetStyleSettings(aStyle); + rRenderContext.SetSettings(aAllSettings); + + const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); + vcl::Font aFont; + aFont = rStyleSettings.GetFieldFont(); + aFont.SetColor(rStyleSettings.GetWindowTextColor()); + SetPointFont(*this, aFont); + + rRenderContext.SetTextColor(rStyleSettings.GetFieldTextColor()); + rRenderContext.SetTextFillColor(); + + rRenderContext.SetBackground(rStyleSettings.GetFieldColor()); } } // namespace dbaui - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/app/AppTitleWindow.hxx b/dbaccess/source/ui/app/AppTitleWindow.hxx index 875f693107ab..888ec32462be 100644 --- a/dbaccess/source/ui/app/AppTitleWindow.hxx +++ b/dbaccess/source/ui/app/AppTitleWindow.hxx @@ -42,6 +42,8 @@ namespace dbaui virtual void Resize() SAL_OVERRIDE; virtual void GetFocus() SAL_OVERRIDE; + virtual void ApplySettings(vcl::RenderContext& rRenderContext) SAL_OVERRIDE; + /** sets the child window which should be displayed below the title. It will be destroyed at the end. @param _pChild The child window. |