summaryrefslogtreecommitdiffstats
path: root/vcl/source/control/button.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/control/button.cxx')
-rw-r--r--vcl/source/control/button.cxx17
1 files changed, 11 insertions, 6 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index e3ed723bc988..9ba7e8f0fbf6 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2124,6 +2124,14 @@ if ( bNativeOK == sal_False )
// -----------------------------------------------------------------------
+void RadioButton:: ImplHandleHoriAlign( const Point& rPos, const Size& /*rSize*/,
+ const Size& /*rImageSize*/, Rectangle& rStateRect )
+{
+ // align Checkbox image left ( always )
+ rStateRect.Left() = rPos.X();
+}
+// -----------------------------------------------------------------------
+
void RadioButton::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
const Point& rPos, const Size& rSize,
const Size& rImageSize, Rectangle& rStateRect,
@@ -2188,12 +2196,9 @@ void RadioButton::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
}
else
{
- if ( nWinStyle & WB_CENTER )
- rStateRect.Left() = rPos.X()+((rSize.Width()-rImageSize.Width())/2);
- else if ( nWinStyle & WB_RIGHT )
- rStateRect.Left() = rPos.X()+rSize.Width()-rImageSize.Width(); //-1;
- else
- rStateRect.Left() = rPos.X(); //+1;
+ // allow specific handling of WB_CENTER, WB_LEFT & WB_RIGHT by
+ // by subclasses
+ ImplHandleHoriAlign( rPos, rSize, rImageSize, rStateRect );
if ( nWinStyle & WB_VCENTER )
rStateRect.Top() = rPos.Y()+((rSize.Height()-rImageSize.Height())/2);
else if ( nWinStyle & WB_BOTTOM )