Author: sh-sh-sh Date: Wed Sep 10 17:16:48 2008 New Revision: 50982 URL: http://svn.opensuse.org/viewcvs/yast?rev=50982&view=rev Log: Force [Help] button left-aligned in GNOME button order Modified: trunk/libyui/package/yast2-libyui.changes trunk/libyui/src/YButtonBox.cc trunk/libyui/src/YButtonBox.h Modified: trunk/libyui/package/yast2-libyui.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/libyui/package/yast2-libyui.chang... ============================================================================== --- trunk/libyui/package/yast2-libyui.changes (original) +++ trunk/libyui/package/yast2-libyui.changes Wed Sep 10 17:16:48 2008 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Wed Sep 10 17:15:52 CEST 2008 - sh@suse.de + +- Force [Help] button left-aligned in GNOME button order + +------------------------------------------------------------------- Tue Sep 9 17:05:23 CEST 2008 - sh@suse.de - Added YDialogSpy for interactive introspection of a widget tree Modified: trunk/libyui/src/YButtonBox.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/libyui/src/YButtonBox.cc?rev=5098... ============================================================================== --- trunk/libyui/src/YButtonBox.cc (original) +++ trunk/libyui/src/YButtonBox.cc Wed Sep 10 17:16:48 2008 @@ -111,6 +111,7 @@ policy.equalSizeButtons = true; policy.alignment[ YD_HORIZ ] = YAlignEnd; // Align right policy.alignment[ YD_VERT ] = YAlignBegin; // Align top + policy.addExcessSpaceToHelpButtonExtraMargin = true; return policy; } @@ -267,21 +268,28 @@ { int excessWidth = width - prefWidth; - switch ( _layoutPolicy.alignment[ YD_HORIZ ] ) + if ( _layoutPolicy.addExcessSpaceToHelpButtonExtraMargin && helpButton ) { - case YAlignCenter: - margins.left += excessWidth / 2; - margins.right += excessWidth / 2; - break; - - case YAlignBegin: - case YAlignUnchanged: - margins.right += excessWidth; - break; - - case YAlignEnd: - margins.left += excessWidth; - break; + margins.helpButtonExtraSpacing += excessWidth; + } + else + { + switch ( _layoutPolicy.alignment[ YD_HORIZ ] ) + { + case YAlignCenter: + margins.left += excessWidth / 2; + margins.right += excessWidth / 2; + break; + + case YAlignBegin: + case YAlignUnchanged: + margins.right += excessWidth; + break; + + case YAlignEnd: + margins.left += excessWidth; + break; + } } } Modified: trunk/libyui/src/YButtonBox.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/libyui/src/YButtonBox.h?rev=50982... ============================================================================== --- trunk/libyui/src/YButtonBox.h (original) +++ trunk/libyui/src/YButtonBox.h Wed Sep 10 17:16:48 2008 @@ -37,6 +37,7 @@ YButtonBoxLayoutPolicy() : buttonOrder( YKDEButtonOrder ) , equalSizeButtons( false ) + , addExcessSpaceToHelpButtonExtraMargin( false ) { alignment[ YD_HORIZ ] = YAlignCenter; alignment[ YD_VERT ] = YAlignBegin; // Align top @@ -44,6 +45,7 @@ YButtonOrder buttonOrder; // YKDEButtonOrder / YGnomeButtonOrder bool equalSizeButtons; // Make all buttons the same size? + bool addExcessSpaceToHelpButtonExtraMargin; // Alignment for the YButtonBox itself YAlignmentType alignment[ YUIAllDimensions ]; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org