summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2012-07-31 20:42:04 +0100
committerNoel Power <noel.power@novell.com>2012-08-01 17:03:07 +0100
commitd616ea80b27e65d83710f811a6f32637f3c7284a (patch)
tree984abc0681ec9d041563ac8a7bec6e3276719383 /vcl
parent59d9a39abc6d4915fce55e55008107a7081b38d9 (diff)
Revert "additional fix for fdo#51336 for radiobuttons"
This reverts commit 2bc2d09bba2e3f34e8ce13571de9ff7007e1c2b6.
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/vcl/button.hxx4
-rw-r--r--vcl/source/control/button.cxx17
2 files changed, 6 insertions, 15 deletions
diff --git a/vcl/inc/vcl/button.hxx b/vcl/inc/vcl/button.hxx
index 719feaa0add3..9c5d6a323cf8 100644
--- a/vcl/inc/vcl/button.hxx
+++ b/vcl/inc/vcl/button.hxx
@@ -314,10 +314,6 @@ private:
protected:
using Control::ImplInitSettings;
using Window::ImplInit;
- // allows the behaviour of horizontal placement of the checbox image to be
- // overridden.
- virtual void ImplHandleHoriAlign( const Point& rPos, const Size& rSize,
- const Size& rImageSize, Rectangle& rStateRect );
SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 75c28dabadae..1770bf8c0e12 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2129,14 +2129,6 @@ 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,
@@ -2201,9 +2193,12 @@ void RadioButton::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
}
else
{
- // allow specific handling of WB_CENTER, WB_LEFT & WB_RIGHT by
- // by subclasses
- ImplHandleHoriAlign( rPos, rSize, rImageSize, rStateRect );
+ 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;
if ( nWinStyle & WB_VCENTER )
rStateRect.Top() = rPos.Y()+((rSize.Height()-rImageSize.Height())/2);
else if ( nWinStyle & WB_BOTTOM )