After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 50286 - Improvements to default theme
Improvements to default theme
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
1.3.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 58544 (view as bug list)
Depends on: 50285
Blocks:
 
 
Reported: 2001-01-03 17:19 UTC by Owen Taylor
Modified: 2011-02-04 16:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Theme improvements (61.85 KB, patch)
2001-10-01 13:23 UTC, Soren Sandmann Pedersen
none Details | Review
visual feedback when checkbuttons are depressed (9.87 KB, patch)
2002-02-09 15:34 UTC, Soren Sandmann Pedersen
none Details | Review
make buttons request extra space based on child displacement (1.15 KB, patch)
2002-02-09 15:44 UTC, Soren Sandmann Pedersen
none Details | Review
spinbutton cleanups (24.19 KB, patch)
2002-02-09 18:28 UTC, Soren Sandmann Pedersen
none Details | Review
patch to draw arrows without the extra line + arrow_displacement for ranges (15.06 KB, patch)
2002-02-09 20:54 UTC, Soren Sandmann Pedersen
none Details | Review
new arrow patch that produces better results for 14 pixels wide scrollbars. (13.85 KB, patch)
2002-02-12 00:13 UTC, Soren Sandmann Pedersen
none Details | Review
new spinbutton patch that produce unbalanced buttons instead of a pixel gap (23.22 KB, patch)
2002-02-12 00:25 UTC, Soren Sandmann Pedersen
none Details | Review
new feedback patch (11.49 KB, patch)
2002-02-20 18:49 UTC, Soren Sandmann Pedersen
none Details | Review
new feedback patch (13.72 KB, patch)
2002-02-22 00:23 UTC, Soren Sandmann Pedersen
none Details | Review
New arrow patch that draws arrows the size the widget asks (23.00 KB, patch)
2002-02-23 23:43 UTC, Soren Sandmann Pedersen
none Details | Review

Description Owen Taylor 2001-01-03 17:19:52 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.
Comment 1 Havoc Pennington 2001-01-29 19:39:50 UTC
Put all GTK 1.3.x bugs on 2.0.0 milestone
Comment 2 Owen Taylor 2001-05-03 10:32:02 UTC
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
Comment 3 Soren Sandmann Pedersen 2001-10-01 13:23:24 UTC
Created attachment 5734 [details] [review]
Theme improvements
Comment 4 Soren Sandmann Pedersen 2001-10-01 13:28:00 UTC
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.

Comment 5 Soren Sandmann Pedersen 2001-10-01 13:29:16 UTC
*** Bug 58544 has been marked as a duplicate of this bug. ***
Comment 6 Owen Taylor 2002-01-30 15:16:54 UTC
Putting on 1.3.14 milestone for patch.
Comment 7 Soren Sandmann Pedersen 2002-02-09 15:34:54 UTC
Created attachment 6664 [details] [review]
visual feedback when checkbuttons are depressed
Comment 8 Soren Sandmann Pedersen 2002-02-09 15:44:11 UTC
Created attachment 6665 [details] [review]
make buttons request extra space based on child displacement
Comment 9 Soren Sandmann Pedersen 2002-02-09 18:28:07 UTC
Created attachment 6667 [details] [review]
spinbutton cleanups
Comment 10 Soren Sandmann Pedersen 2002-02-09 20:54:33 UTC
Created attachment 6670 [details] [review]
patch to draw arrows without the extra line + arrow_displacement for ranges
Comment 11 Soren Sandmann Pedersen 2002-02-09 21:02:15 UTC
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
Comment 12 Soren Sandmann Pedersen 2002-02-12 00:13:06 UTC
Created attachment 6698 [details] [review]
new arrow patch that produces better results for 14 pixels wide scrollbars.
Comment 13 Soren Sandmann Pedersen 2002-02-12 00:25:04 UTC
Created attachment 6699 [details] [review]
new spinbutton patch that produce unbalanced buttons instead of a pixel gap
Comment 14 Owen Taylor 2002-02-15 04:33:20 UTC
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.
Comment 15 Soren Sandmann Pedersen 2002-02-20 18:47:56 UTC
> 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.
Comment 16 Soren Sandmann Pedersen 2002-02-20 18:49:21 UTC
Created attachment 6796 [details] [review]
new feedback patch
Comment 17 Soren Sandmann Pedersen 2002-02-20 18:52:32 UTC
> 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.
Comment 18 Owen Taylor 2002-02-21 05:24:28 UTC
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.
Comment 19 Soren Sandmann Pedersen 2002-02-22 00:23:57 UTC
Created attachment 6814 [details] [review]
new feedback patch
Comment 20 Owen Taylor 2002-02-22 02:41:05 UTC
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 ]
Comment 21 Soren Sandmann Pedersen 2002-02-22 14:39:39 UTC
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.

)
Comment 22 Owen Taylor 2002-02-23 04:54:32 UTC
ChangeLog entry doesn't seem relevant; looks like the
change crept in accidentally with my commit of 
25-Aug-2001.
Comment 23 Owen Taylor 2002-02-23 20:47:34 UTC
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.
Comment 24 Soren Sandmann Pedersen 2002-02-23 23:43:21 UTC
Created attachment 6834 [details] [review]
New arrow patch that draws arrows the size the widget asks
Comment 25 Soren Sandmann Pedersen 2002-02-26 23:52:25 UTC
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)
Comment 26 Soren Sandmann Pedersen 2002-02-26 23:53:02 UTC
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)
Comment 27 Matthias Clasen 2002-05-16 14:00:14 UTC
I think all outstanding patches on this bug have been applied.
Comment 28 Owen Taylor 2002-05-16 16:03:07 UTC
The bug is being kept open for the link at the top to a mail
where I mentioned some changes to scrollbars, etc.
Comment 29 Matthias Clasen 2002-05-17 11:58:59 UTC
I just wanted to explain why I removed the PATCH keyword.
Comment 30 David Kennedy 2002-12-14 04:31:17 UTC
*** Bug 78072 has been marked as a duplicate of this bug. ***
Comment 31 Owen Taylor 2004-02-24 17:57:59 UTC
I don't think there is much point in keeping this one still open.