diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-18 11:14:17 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-18 11:22:49 +0900 |
commit | e27ee95cced755e52b62d6cb095bc911ca3fbbe6 (patch) | |
tree | 202ccf724d68ddbf791f483ad6cc8672195c2b75 /dbaccess | |
parent | a97fc29f726b7fcc5ab36496e117e2a1aec9747d (diff) |
pass RenderContext to PreparePaint in TreeListBox
Change-Id: I32961f5cd511b9ecc756e99ca95e4e9ddbc6b795
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/app/AppDetailView.cxx | 23 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppDetailView.hxx | 4 |
2 files changed, 14 insertions, 13 deletions
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index bd4ba2f048c0..0ae17bf52169 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -98,31 +98,32 @@ void OCreationList::Paint(vcl::RenderContext& rRenderContext, const Rectangle& _ rRenderContext.SetFont(m_aOriginalFont); } -void OCreationList::PreparePaint( SvTreeListEntry* _pEntry ) +void OCreationList::PreparePaint(vcl::RenderContext& rRenderContext, SvTreeListEntry* _pEntry) { - Wallpaper aEntryBackground( m_aOriginalBackgroundColor ); - if ( _pEntry ) + Wallpaper aEntryBackground(m_aOriginalBackgroundColor); + if (_pEntry) { - if ( _pEntry == GetCurEntry() ) + if (_pEntry == GetCurEntry()) { // draw a selection background bool bIsMouseDownEntry = ( _pEntry == m_pMouseDownEntry ); - DrawSelectionBackground( GetBoundingRect( _pEntry ), bIsMouseDownEntry ? 1 : 2, false, true, false ); + vcl::RenderTools::DrawSelectionBackground(rRenderContext, *this, GetBoundingRect(_pEntry), + bIsMouseDownEntry ? 1 : 2, false, true, false ); - if ( bIsMouseDownEntry ) + if (bIsMouseDownEntry) { - vcl::Font aFont( GetFont() ); - aFont.SetColor( GetSettings().GetStyleSettings().GetHighlightTextColor() ); - Control::SetFont( aFont ); + vcl::Font aFont(rRenderContext.GetFont()); + aFont.SetColor(rRenderContext.GetSettings().GetStyleSettings().GetHighlightTextColor()); + rRenderContext.SetFont(aFont); } // and temporary set a transparent background, for all the other // paint operations the SvTreeListBox is going to do - aEntryBackground = Wallpaper( Color( COL_TRANSPARENT ) ); + aEntryBackground = Wallpaper(Color(COL_TRANSPARENT)); } } - SetBackground( aEntryBackground ); + rRenderContext.SetBackground(aEntryBackground); } void OCreationList::SelectSearchEntry( const void* _pEntry ) diff --git a/dbaccess/source/ui/app/AppDetailView.hxx b/dbaccess/source/ui/app/AppDetailView.hxx index e4f7974799e4..3b4286abe7ac 100644 --- a/dbaccess/source/ui/app/AppDetailView.hxx +++ b/dbaccess/source/ui/app/AppDetailView.hxx @@ -61,7 +61,7 @@ namespace dbaui virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE; + virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) SAL_OVERRIDE; virtual void StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) SAL_OVERRIDE; virtual void GetFocus() SAL_OVERRIDE; virtual void LoseFocus() SAL_OVERRIDE; @@ -71,7 +71,7 @@ namespace dbaui void updateHelpText(); protected: - virtual void PreparePaint( SvTreeListEntry* _pEntry ) SAL_OVERRIDE; + virtual void PreparePaint(vcl::RenderContext& rRenderContext, SvTreeListEntry* _pEntry) SAL_OVERRIDE; virtual Rectangle GetFocusRect( SvTreeListEntry* _pEntry, long _nLine ) SAL_OVERRIDE; virtual void ModelHasCleared() SAL_OVERRIDE; |