summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-27 19:14:44 +0900
committerJan Holesovsky <kendy@collabora.com>2015-05-29 20:16:54 +0200
commit1d7600a2467ef2100665e43eb51f47b656d7405d (patch)
tree71d1df1c420cf801e5d1d79584ac57ab2789c5f6 /dbaccess
parent6b0e066b587ad494b799901e299625291f88484f (diff)
fix Base's titlewindow font, font color and background
Change-Id: Ide9c30385d15d0b8303f25d1a9eef132a32ec7d2 Signed-off-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/app/AppTitleWindow.cxx40
-rw-r--r--dbaccess/source/ui/app/AppTitleWindow.hxx2
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.