Kaydet (Commit) 6558878d authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

refacotr DbGridControl::NavigationBar to use RenderContext

Change-Id: I0675158d83d37706be60dab430e6b9f7ea749bc7
üst efd4f9b9
......@@ -722,27 +722,29 @@ void DbGridControl::NavigationBar::Paint(vcl::RenderContext& rRenderContext, con
Point aAbsolutePos = m_aAbsolute->GetPosPixel();
Size aAbsoluteSize = m_aAbsolute->GetSizePixel();
DrawLine(Point(aAbsolutePos.X() - 1, 0 ),
Point(aAbsolutePos.X() - 1, aAbsolutePos.Y() + aAbsoluteSize.Height()));
rRenderContext.DrawLine(Point(aAbsolutePos.X() - 1, 0 ),
Point(aAbsolutePos.X() - 1, aAbsolutePos.Y() + aAbsoluteSize.Height()));
DrawLine(Point(aAbsolutePos.X() + aAbsoluteSize.Width() + 1, 0 ),
Point(aAbsolutePos.X() + aAbsoluteSize.Width() + 1, aAbsolutePos.Y() + aAbsoluteSize.Height()));
rRenderContext.DrawLine(Point(aAbsolutePos.X() + aAbsoluteSize.Width() + 1, 0 ),
Point(aAbsolutePos.X() + aAbsoluteSize.Width() + 1, aAbsolutePos.Y() + aAbsoluteSize.Height()));
}
void DbGridControl::NavigationBar::StateChanged( StateChangedType nType )
{
Control::StateChanged( nType );
vcl::Window* pWindows[] = { m_aRecordText.get(),
m_aAbsolute.get(),
m_aRecordOf.get(),
m_aRecordCount.get(),
m_aFirstBtn.get(),
m_aPrevBtn.get(),
m_aNextBtn.get(),
m_aLastBtn.get(),
m_aNewBtn.get()
};
vcl::Window* pWindows[] =
{
m_aRecordText.get(),
m_aAbsolute.get(),
m_aRecordOf.get(),
m_aRecordCount.get(),
m_aFirstBtn.get(),
m_aPrevBtn.get(),
m_aNextBtn.get(),
m_aLastBtn.get(),
m_aNewBtn.get()
};
switch ( nType )
{
......@@ -759,9 +761,9 @@ void DbGridControl::NavigationBar::StateChanged( StateChangedType nType )
Fraction aZoom = GetZoom();
// not all of these controls need to know the new zoom, but to be sure ...
vcl::Font aFont( GetSettings().GetStyleSettings().GetFieldFont() );
if ( IsControlFont() )
aFont.Merge( GetControlFont() );
vcl::Font aFont(GetSettings().GetStyleSettings().GetFieldFont());
if (IsControlFont())
aFont.Merge(GetControlFont());
for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i)
{
......
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