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

use RenderContext in user draw, use ApplySettings

Change-Id: I6cc22677000459a5f19bfb207007f5c246f187e0
Signed-off-by: 's avatarJan Holesovsky <kendy@collabora.com>
üst 8c7e2b27
......@@ -564,11 +564,11 @@ private:
bool mbInUserDraw : 1;
bool mbEdgeBlending : 1;
void ImplDraw( bool bLayout = false );
void ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout = false);
protected:
virtual void FillLayoutData() const SAL_OVERRIDE;
public:
public:
ImplWin( vcl::Window* pParent, WinBits nWinStyle = 0 );
virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
......@@ -598,7 +598,8 @@ public:
void EnableUserDraw( bool bUserDraw ) { mbUserDrawEnabled = bUserDraw; }
bool IsUserDrawEnabled() const { return mbUserDrawEnabled; }
void DrawEntry( bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos = false, bool bLayout = false );
void DrawEntry(vcl::RenderContext& rRenderContext, bool bDrawImage, bool bDrawText,
bool bDrawTextAtImagePos = false, bool bLayout = false);
bool GetEdgeBlending() const { return mbEdgeBlending; }
void SetEdgeBlending(bool bNew) { mbEdgeBlending = bNew; }
......@@ -606,7 +607,6 @@ public:
virtual void ShowFocus(const Rectangle& rRect) SAL_OVERRIDE;
using Control::ImplInitSettings;
void ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
virtual void ApplySettings(vcl::RenderContext& rRenderContext) SAL_OVERRIDE;
};
......
......@@ -1131,7 +1131,7 @@ void ComboBox::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines
void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
{
mpImplLB->GetMainWindow()->ImplInitSettings( true, true, true );
mpImplLB->GetMainWindow()->ApplySettings(*pDev);
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
......
This diff is collapsed.
......@@ -375,7 +375,7 @@ void ListBox::ApplySettings(vcl::RenderContext& rRenderContext)
void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
{
mpImplLB->GetMainWindow()->ImplInitSettings( true, true, true );
mpImplLB->GetMainWindow()->ApplySettings(*pDev);
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
......@@ -555,7 +555,7 @@ void ListBox::DataChanged( const DataChangedEvent& rDCEvt )
if ( mpImplWin )
{
mpImplWin->SetSettings( GetSettings() ); // If not yet set...
mpImplWin->ImplInitSettings(true, true, true);
mpImplWin->ApplySettings(*this);
mpBtn->SetSettings( GetSettings() );
ImplInitDropDownButton( mpBtn );
......@@ -1386,7 +1386,7 @@ void ListBox::DrawEntry(const UserDrawEvent& rEvt, bool bDrawImage, bool bDrawTe
if (rEvt.GetDevice() == mpImplLB->GetMainWindow())
mpImplLB->GetMainWindow()->DrawEntry(*rEvt.GetDevice(), rEvt.GetItemId(), bDrawImage, bDrawText, bDrawTextAtImagePos );
else if (rEvt.GetDevice() == mpImplWin)
mpImplWin->DrawEntry(bDrawImage, bDrawText, bDrawTextAtImagePos);
mpImplWin->DrawEntry(*rEvt.GetDevice(), bDrawImage, bDrawText, bDrawTextAtImagePos);
}
void ListBox::SetUserItemSize( const Size& rSz )
......
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