summaryrefslogtreecommitdiff
path: root/vcl/source/control
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2012-07-31 20:41:51 +0100
committerNoel Power <noel.power@novell.com>2012-08-01 17:03:07 +0100
commit59d9a39abc6d4915fce55e55008107a7081b38d9 (patch)
tree2cbac3863cdd0ce4db40802b280189eee8d4e28c /vcl/source/control
parente3c2e0fab67bbb812e8c693aab987fb5c374e5e0 (diff)
Revert "fdo#51336 - change vcl checkbox no-label behaviour"
Diffstat (limited to 'vcl/source/control')
-rw-r--r--vcl/source/control/button.cxx18
1 files changed, 6 insertions, 12 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 406377bccbf4..75c28dabadae 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -3261,9 +3261,12 @@ void CheckBox::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();
+ else
+ rStateRect.Left() = rPos.X();
if ( nWinStyle & WB_VCENTER )
rStateRect.Top() = rPos.Y()+((rSize.Height()-rImageSize.Height())/2);
else if ( nWinStyle & WB_BOTTOM )
@@ -3305,15 +3308,6 @@ void CheckBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
// -----------------------------------------------------------------------
-void CheckBox:: ImplHandleHoriAlign( const Point& rPos, const Size& /*rSize*/,
- const Size& /*rImageSize*/, Rectangle& rStateRect )
-{
- // align Checkbox image left ( always )
- rStateRect.Left() = rPos.X();
-}
-
-// -----------------------------------------------------------------------
-
void CheckBox::ImplDrawCheckBox( bool bLayout )
{
Size aImageSize = ImplGetCheckImageSize();