diff options
-rw-r--r-- | vcl/source/control/imivctl.hxx | 2 | ||||
-rw-r--r-- | vcl/source/control/imivctl1.cxx | 11 |
2 files changed, 6 insertions, 7 deletions
diff --git a/vcl/source/control/imivctl.hxx b/vcl/source/control/imivctl.hxx index f79e0100b1d2..95435c7c4d9e 100644 --- a/vcl/source/control/imivctl.hxx +++ b/vcl/source/control/imivctl.hxx @@ -237,7 +237,7 @@ class SvxIconChoiceCtrl_Impl void SetOrigin( const Point& ); void ShowFocus ( tools::Rectangle const & rRect ); - void DrawFocusRect(vcl::RenderContext& rRenderContext); + void DrawFocusRect(vcl::RenderContext& rRenderContext, SvxIconChoiceCtrlEntry* pEntry); bool IsMnemonicChar( sal_Unicode cChar, sal_uLong& rPos ) const; diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx index 3b26c6b7ff81..bb4d9a48c12e 100644 --- a/vcl/source/control/imivctl1.cxx +++ b/vcl/source/control/imivctl1.cxx @@ -1368,11 +1368,7 @@ void SvxIconChoiceCtrl_Impl::PaintItem(const tools::Rectangle& rRect, rRenderContext.DrawText(rRect, aText, nCurTextDrawFlags); if (pEntry->IsFocused()) - { - tools::Rectangle aRect (CalcFocusRect(pEntry)); - ShowFocus(aRect); - DrawFocusRect(rRenderContext); - } + DrawFocusRect(rRenderContext, pEntry); } else { @@ -2465,8 +2461,11 @@ void SvxIconChoiceCtrl_Impl::ShowFocus ( tools::Rectangle const & rRect ) aFocus.aRect = rRect; } -void SvxIconChoiceCtrl_Impl::DrawFocusRect(vcl::RenderContext& rRenderContext) +void SvxIconChoiceCtrl_Impl::DrawFocusRect(vcl::RenderContext& rRenderContext, SvxIconChoiceCtrlEntry* pEntry) { + tools::Rectangle aRect (CalcFocusRect(pEntry)); + ShowFocus(aRect); + rRenderContext.SetLineColor(aFocus.aPenColor); rRenderContext.SetFillColor(); tools::Polygon aPolygon (aFocus.aRect); |