Kaydet (Commit) 1d7600a2 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl Kaydeden (comit) Jan Holesovsky

fix Base's titlewindow font, font color and background

Change-Id: Ide9c30385d15d0b8303f25d1a9eef132a32ec7d2
Signed-off-by: 's avatarJan Holesovsky <kendy@collabora.com>
üst 6b0e066b
......@@ -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: */
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment