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