summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2012-08-01 17:01:44 +0100
committerNoel Power <noel.power@suse.com>2012-09-28 17:27:23 +0100
commite74c879c6f9a2d80941c11a4fb57eb9874795349 (patch)
tree2eccd3645ffc340581f338b7df5b2f1a0dd81221 /vcl/source
parentee6a1c0797ca839e50d7b5ab522088d8d2f6501e (diff)
simpler fix fo fdo#51336, bnc#757602 - change vcl checkbox no-label behaviour
Change-Id: I1563dc2afc49c7b1115192db00fbd08a7524154e
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/control/button.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 3e09946ed16f..96507fde1621 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2188,9 +2188,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;
@@ -2417,7 +2417,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 );
@@ -2426,7 +2426,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 );
@@ -3252,9 +3252,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();
@@ -3350,7 +3350,7 @@ void CheckBox::ImplCheck()
// -----------------------------------------------------------------------
CheckBox::CheckBox( Window* pParent, WinBits nStyle ) :
- Button( WINDOW_CHECKBOX )
+ Button( WINDOW_CHECKBOX ), mbLegacyNoTextAlign( false )
{
ImplInitCheckBoxData();
ImplInit( pParent, nStyle );
@@ -3359,7 +3359,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 );