diff options
author | Noel Power <noel.power@novell.com> | 2012-08-01 17:01:44 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2012-08-01 17:03:07 +0100 |
commit | ff54a3c291b8aa104992a0285207166cf25ddd86 (patch) | |
tree | c5a3b8e26ac14b7926b3c66f12635209d956bc7d /vcl/source/control | |
parent | d616ea80b27e65d83710f811a6f32637f3c7284a (diff) |
simpler fix fo fdo#51336 - change vcl checkbox no-label behaviour
Change-Id: I1563dc2afc49c7b1115192db00fbd08a7524154e
Diffstat (limited to 'vcl/source/control')
-rw-r--r-- | vcl/source/control/button.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 1770bf8c0e12..37752bbcc50e 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -2193,9 +2193,9 @@ void RadioButton::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, } else { - if ( nWinStyle & WB_CENTER ) + if ( mbLegacyNoTextAlign && ( nWinStyle & WB_CENTER ) ) rStateRect.Left() = rPos.X()+((rSize.Width()-rImageSize.Width())/2); - else if ( nWinStyle & WB_RIGHT ) + else if ( mbLegacyNoTextAlign && ( nWinStyle & WB_RIGHT ) ) rStateRect.Left() = rPos.X()+rSize.Width()-rImageSize.Width(); //-1; else rStateRect.Left() = rPos.X(); //+1; @@ -2421,7 +2421,7 @@ void RadioButton::ImplCallClick( sal_Bool bGrabFocus, sal_uInt16 nFocusFlags ) // ----------------------------------------------------------------------- RadioButton::RadioButton( Window* pParent, WinBits nStyle ) : - Button( WINDOW_RADIOBUTTON ) + Button( WINDOW_RADIOBUTTON ), mbLegacyNoTextAlign( false ) { ImplInitRadioButtonData(); ImplInit( pParent, nStyle ); @@ -2430,7 +2430,7 @@ RadioButton::RadioButton( Window* pParent, WinBits nStyle ) : // ----------------------------------------------------------------------- RadioButton::RadioButton( Window* pParent, const ResId& rResId ) : - Button( WINDOW_RADIOBUTTON ) + Button( WINDOW_RADIOBUTTON ), mbLegacyNoTextAlign( false ) { ImplInitRadioButtonData(); rResId.SetRT( RSC_RADIOBUTTON ); @@ -3256,9 +3256,9 @@ void CheckBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, } else { - if ( nWinStyle & WB_CENTER ) + if ( mbLegacyNoTextAlign && ( nWinStyle & WB_CENTER ) ) rStateRect.Left() = rPos.X()+((rSize.Width()-rImageSize.Width())/2); - else if ( nWinStyle & WB_RIGHT ) + else if ( mbLegacyNoTextAlign && ( nWinStyle & WB_RIGHT ) ) rStateRect.Left() = rPos.X()+rSize.Width()-rImageSize.Width(); else rStateRect.Left() = rPos.X(); @@ -3354,7 +3354,7 @@ void CheckBox::ImplCheck() // ----------------------------------------------------------------------- CheckBox::CheckBox( Window* pParent, WinBits nStyle ) : - Button( WINDOW_CHECKBOX ) + Button( WINDOW_CHECKBOX ), mbLegacyNoTextAlign( false ) { ImplInitCheckBoxData(); ImplInit( pParent, nStyle ); @@ -3363,7 +3363,7 @@ CheckBox::CheckBox( Window* pParent, WinBits nStyle ) : // ----------------------------------------------------------------------- CheckBox::CheckBox( Window* pParent, const ResId& rResId ) : - Button( WINDOW_CHECKBOX ) + Button( WINDOW_CHECKBOX ), mbLegacyNoTextAlign( false ) { ImplInitCheckBoxData(); rResId.SetRT( RSC_CHECKBOX ); |