GNOME Bugzilla – Bug 336159
GtkButtonBox should also have a Center style.
Last modified: 2007-02-08 12:13:17 UTC
GtkButtonBoxStyle should also include Center, in that case GtkButtonBox will place the buttons grouped in the middle of the box.
Created attachment 80601 [details] [review] Implementation of GTK_BUTTONBOX_CENTER A possible implementation of GTK_BUTTONBOX_CENTER. I added the new enum member to the end and changed the checks for correct values because I guess adding it to the middle would count as an ABI change. I'll also attach a simple testcase.
Created attachment 80602 [details] testcase
Xan, can you please add a license to your test case, e.g. LGPL? we can't take unlicensed contrbutions. as for the _CENTER patch, it looks unsymmetric in that the vertical case doesn't update secondary_y, while the horizontal case does update secondary_x. i suppose that needs fixing? and if so, the test case should prolly be extended to catch the omission of (not) updating secondary coordinates in the h/v cases.
Yes, the secondary_y setting is missing in the vertical box part, I'll add it. About extending the test case, do you want it to check the coordinates of the secondary button when they are enabled and print a warning if they don't change? Or what other kind of catching do you have in mind other than the current lack of visual effect?
(In reply to comment #4) > Yes, the secondary_y setting is missing in the vertical box part, I'll add it. > About extending the test case, do you want it to check the coordinates of the > secondary button when they are enabled and print a warning if they don't > change? Or what other kind of catching do you have in mind other than the > current lack of visual effect? i was just thinkink of the current lack of visual effect.
Any idea for a better feedback than the current idea? Also, if this is going to be a proper test inside GTK+ I'd probably add a way to test the vertical button box too.
Created attachment 81069 [details] [review] Fixed patch Update secondary_y in GtkVButtonBox.
Created attachment 81070 [details] Updated testcase.
Created attachment 82090 [details] [review] ready-to-commit patch Tested it and it seems to work perfectly.
thanks, applied.