GNOME Bugzilla – Bug 50286
Improvements to default theme
Last modified: 2011-02-04 16:16:03 UTC
Revisions need to be made to the default GTK+ theme before GTK+-2.0 to make it more useable and attractive. A prototype for this is the Raleigh theme, based on a patched version of GTK+-1.2: http://www.gtk.org/~otaylor/gtk/ui/gtk+-1.2.8-theme.patch http://www.gtk.org/~otaylor/gtk/ui/raleigh-0.1.tar.gz To do this right for GTK+-2.0 will require the style property mechanism.
Put all GTK 1.3.x bugs on 2.0.0 milestone
Modified theme is now the default theme; still some additional tweaks that should be done: http://mail.gnome.org/archives/gtk-devel-list/2001-May/msg00000.html
Created attachment 5734 [details] [review] Theme improvements
This patch changes the way check, radio and spin buttons look and adds arrow_displacement_x/y to gtkrange. It includes the changes to the radio button look from bug 58544, which I am marking as a duplicate of this one. See the included ChangeLog entry for more information.
*** Bug 58544 has been marked as a duplicate of this bug. ***
Putting on 1.3.14 milestone for patch.
Created attachment 6664 [details] [review] visual feedback when checkbuttons are depressed
Created attachment 6665 [details] [review] make buttons request extra space based on child displacement
Created attachment 6667 [details] [review] spinbutton cleanups
Created attachment 6670 [details] [review] patch to draw arrows without the extra line + arrow_displacement for ranges
I have broken the patch into smaller pieces now. Notes: - The feedback is blue if the patch from #69513 is not applied - The buttons should probably only request one times the child_displacement extra space, not two times - The spinbutton patch look weird wihout the arrow patch
Created attachment 6698 [details] [review] new arrow patch that produces better results for 14 pixels wide scrollbars.
Created attachment 6699 [details] [review] new spinbutton patch that produce unbalanced buttons instead of a pixel gap
Hmm, for future reference, separate bugs as well as separate patches probably would be good; I'm having trouble keeping track of what is what. For the checkbutton feedback patch - I find the disappearnce of the prelight visually distracting; for buttons it's OK since the who button draws differently, but for checkbuttons, it just looks sort of flickery. - gtk_widget_set_state() already queues a draw. - The change to the state should be OK - Most of the other little code cleanups look good, but they do make it hard to read the patch. - Is the toggle button patch supposed to make it draw with the active color when the user clicks in it? Doens't seem to work for me in testgtk. ` For the displacement patch, why 2 * the displacement? The spinbutton patch looks good to commit. There are some mismerges in it: + g_return_if_fail (GTK_IS_SPIN_BUTTON (widget)); + g_return_if_fail (allocation != NULL); + g_return_val_if_fail (GTK_IS_SPIN_BUTTON (widget), FALSE); + g_return_val_if_fail (event != NULL, FALSE); + These were removed and are apparently reintroduced by your patch. I think the arrow patch still needs some more thought. I don't think it makes sense for external callers to pass artificially large bounds to arrows to get the size of arrows they want, so I think we should draw an arrow as large as fits in the box passed in. Since our default arrow is rather unbalanced in aspect ratio, if people pass in square boxes, there will be some room for making bigger arrows with less extreme aspect ratios.
> For the checkbutton feedback patch > - I find the disappearnce of the prelight visually distracting; > for buttons it's OK since the who button draws differently, > but for checkbuttons, it just looks sort of flickery. The prelight doesn't disappear with the new patch. > - gtk_widget_set_state() already queues a draw. Only if the state changes. The queue_draw() is needed, otherwise the feedback won't appear when you uncheck a checkbutton with the keyboard and mouse cursor is not hovering above it. > - Is the toggle button patch supposed to make it draw > with the active color when the user clicks in it? Doens't > seem to work for me in testgtk. ` No, it is supposed to make inconsistent check- and radiobuttons look activated when the user clicks in them.
Created attachment 6796 [details] [review] new feedback patch
> For the displacement patch, why 2 * the displacement? because I thought it looked slightly better than just 1 * the displacement. But I can change it, it looks okay with 1 * the displacement, too.
Hmm, that's what I meant by "draw with the active color" - look activated. All it does for me is make the prelight disappear, it doesn't draw with the active color or drawn depressed. (Not sure if drawing depressed would make sense.) Still don't understand the queue_draw() issue -- gtk_button_update_state does two things - call set_depressed() and set_state() - both will queue a draw if necessary. I think it would be quite confusing if some widgets used twice the displacement. A theme can specify different displacements for different widgets.
Created attachment 6814 [details] [review] new feedback patch
I think the feedback patch looks ready to commit. Two comments (if you want to commit and we can deal with these afterwards, go ahead.) * I think the indicator should be drawn with the PRELIGHT state when the widget is prelit, to allow themes that want to prelight the indicator but perhaps not the main area. * I think toggle buttons should always display depressed when the mouse or keyboard is down, instead of as it is now: - depressed => out - inconsistent => inconsistent - out => depressed After, you push down on a real life toggle button to pop it back out. A button popping out when you click down on it before you release seems odd to me. [ Yes, I know the mouse behavior was like that before your patch ]
I have committed the feedback patch with a change so that the indicator is drawn with the PRELIGHT.state. I agree that the toggle buttons shouldn't pop out when the mouse or keyboard is down - I'll look at that. (But note that the current behavior is a deliberate change from 1.2: Thu Sep 27 16:46:36 2001 Jonathan Blandford <jrb@redhat.com> [...] * gtk/gtkstyle.c: Draw togglebutton better. )
ChangeLog entry doesn't seem relevant; looks like the change crept in accidentally with my commit of 25-Aug-2001.
Sat Feb 23 15:43:46 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtktogglebutton.c: Make button draw depressed whenever the user clicks / activates it, whether it's off/on/inconsistent. Remaining outstanding patch here is the arrow patch, after that, other work on the theme is a post-2.0.0 issue.
Created attachment 6834 [details] [review] New arrow patch that draws arrows the size the widget asks
Wed Feb 27 00:45:39 2002 Soeren Sandmann <sandmann@daimi.au.dk> * gtk/gtkarrow.c, gtk/gtkmenuitem.c, gtk/gtkrange.c gtk/gtkspinbutton.c gtk/gtkstyle.c: Draw arrows better (without extra baseline)
I think all outstanding patches on this bug have been applied.
The bug is being kept open for the link at the top to a mail where I mentioned some changes to scrollbars, etc.
I just wanted to explain why I removed the PATCH keyword.
*** Bug 78072 has been marked as a duplicate of this bug. ***
I don't think there is much point in keeping this one still open.