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 125295 - allow gnome-about's colours to be themed
allow gnome-about's colours to be themed
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: gnome-about
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
AP2
Depends on:
Blocks:
 
 
Reported: 2003-10-23 13:45 UTC by Patrick Wade
Modified: 2007-12-03 19:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
modfied demos/gtk-demo/appwindow.c (12.17 KB, text/plain)
2004-02-09 13:12 UTC, Ghee Teo
  Details
gnome-about patch (3.58 KB, patch)
2004-02-09 15:19 UTC, Ghee Teo
none Details | Review
screen-shot in highconstrat reverse theme (50.83 KB, image/png)
2004-02-09 17:21 UTC, Ghee Teo
  Details
Patch to get the text color working on theme change (9.87 KB, patch)
2004-04-02 15:20 UTC, Vijaykumar Patwari
none Details | Review
gnome-about-mockup-all.png (312.07 KB, image/png)
2007-12-01 18:02 UTC, Luca Cavalli
  Details

Description Patrick Wade 2003-10-23 13:45:33 UTC
Using the theme "HighContrastLargePrintInverse" and an application font
"Sans 28" :-

The text in Gnome-About remains as Black-On-White. It should invert to
White-On-Black like the rest of the desktop.
Comment 1 bill.haneman 2003-11-14 13:25:45 UTC
high visibility bug in an embarassing place, therefore AP2 (otherwise
would be AP3)
Comment 2 Ghee Teo 2004-02-03 14:05:00 UTC
in gnome-about, the part of the screen where the text and background
does not respond to theme changes is written as gnome_canvas in a
gdkpixbuf. Since gdkpixbuf is a layer below gtk/gdk, I don't think
there is an easy fix to this bug unless the app is rewritten.
(see also gtk-demo under gdkpixbuf option)

But I can't seem to think the value add in rewritten an apps such as
gnome-about which only list the list of contributors in a fancy way.
Comment 3 Calum Benson 2004-02-03 16:15:56 UTC
Hmm... could potentially be reasonably important to fix somehow, as
some distros (e.g. JDS) put licensing information here too.  I guess
that could always be provided elsewhere instead, though.
  
Since it sounds like there's no painless solution to this, I suspect
we might just have to live with it for 2.6 :/  The only other thing I
can think of would be to provide a 'regular' about box as well (like
you get in other applications), and provide a gconf key or something
for distros to set which one gets displayed when you select "About
GNOME".  But that goes somewhat against our mantra of 'you shouldn't
need to do anything special for accessibility to work'...
Comment 4 Ghee Teo 2004-02-03 16:44:40 UTC
Any GUI rewrite will involve a GUI changes which is probably not
acceptable at this stage of the release cylce, or is it?
Comment 5 bill.haneman 2004-02-03 16:52:53 UTC
The functionality is non-essential, that's true.  The problem is that
all users of inverse themes will see this high-visibility bug sooner
or later.  So, how much weight to give the bug on the basis of its
high visibility?

I believe that until hard UI freeze this week, there is a window of
opportunity to fix this bug.  A rewrite might not be that enormous -
in fact, since the GtkStyle foreground and background colors should be
relatively easy to obtain, I don't see why the canvas can't use these
colors for foreground and background when drawing the text etc. into
the about box.  IOW, I don't think a rewrite is necessary to fix this
bug.
Comment 6 Ghee Teo 2004-02-04 18:06:21 UTC
After some study of the code, the biggest problem with making a fix
based on what billh suggested is that gnome-about uses a white
background so that the black to grey text can be properly animated.
(Notice that the white background does not change regardless of theme
changes be it a reverse mode or not) Removing this white background to
use the default theme background exposes some pretty ugly side effect
on the animated names.

So I CC: Gman MarkMc, jdub and Malcom whose names are in the
gnome-about.c file. Should the gnome-about white background not use
the default background instead of hard coded to WHITE.
Comment 7 Ghee Teo 2004-02-05 15:07:39 UTC
Okay. after spending another days on this.I can easily change this to
respect the theme by removing the WHITE background and the scrolling of
name without some ugly tracing boxes. 

However getting the whole of current gnome-about to reponse to
- font sizes
- text colour
- proper links to be captured by GOK
are the changes needed to make gnome-about to be truly accessible. The
changes are huge.

This app is not designed with accessibility in mind because the
current accessibility framework just does not work well a the
gnome_canvas level. One has to hack around some many pieces of
gnome_canvas_item, the code just gets into a mess.

I think a proper solution is to redesign the app and for accessibility
to work, just drop the 'flying' hackers.
Comment 8 bill.haneman 2004-02-05 15:25:18 UTC
Ghee: I tend to agree that redesigning the app might be less work.

However, the various issues you raise regarding 'complete'
accessibility may have different priorities.  As long as keynav of
some sort is available for all gnome-about actions (including link
following), we can have nominal accessibility with a few theme-related
changes.

Sounds to me as if you've got text and background color issues solved
- so I don't see why you mention text color above (if you can fix the
background color issue, why not the text color?  Isn't it potentially
as simple as setting the GtkGC used to render the text?)

Font size - arguably this is not important for the 'flying hackers',
and it seems that we should be able to base the other text sizes
pretty easily from the current font settings.  I don't see why this is
"huge".  And if the links are not keyboard navigable, that's really a
stopper (that's a core requirement for all our accessibility, and one
that we probably cannot ignore even for the About box).
Comment 9 bill.haneman 2004-02-05 15:27:41 UTC
regarding the links: it occurs to me that we could provide an F10
keybinding that treated them as though the horizontal list of links
were a menu bar.  That would avoid the need to implement AtkHypertext,
etc.  Similarly, if we created a context menu for gnome-about, which
was exposed as an action on the toplevel accessible, we could put all
the links there.  We could then avoid the necessity to make the links
keyboard navigable since we'd have equivalent functionality available
from the keyboard.
Comment 10 Ghee Teo 2004-02-05 16:31:20 UTC
Bill, two things.
(1) Since the gnome-about is written with many of the gnome_canvas and
item, each of the 'item' on the dialog is created as a local variable
which if we are to handle "style-set" event in one go, all these local
variables will have to be organised into one place. Hence, the 'huge'
changes in terms of code reorganisation rather than difficult. 

The difficult bit is though that the animation changes is based on a
fixed size dialog when the name of the hackers reduces/increases
pending the position on the text. When the font changes size, the
whole position changes and need to be re-calculated.

(2) On the links issue, I don't know how GOK works to grab the action
on a window. Though I think these links are the only other useful
services provided to the users other than the license term. These are
gnome_canvas_item (), why can't GOK grabs a gnome_canvas_item ?


Comment 11 Malcolm Tredinnick 2004-02-05 23:14:36 UTC
Although I have been recently CC'd on this bug, I cannot really
contribute substantively. However, I can think of no reason why it
shouldn't respect the theme (although my contribution to the code had
nothing to do with the canvas setup).

But, seriously, gnome-about has severe usability problems and the
presentation of contributors' names needs to be redesigned in GNOME
2.8 (I wanted to do it for 2.6, but time got away from me -- three
months is not as long as it should be sometimes).
Comment 12 Ghee Teo 2004-02-09 13:12:15 UTC
Created attachment 24230 [details]
modfied demos/gtk-demo/appwindow.c
Comment 13 Ghee Teo 2004-02-09 13:13:26 UTC
Malcom,
Thanks for the update :) appreciated for the info.

Bill,
The root cause of the problem seems to be in 2 parts with regards to
the foreground and background colours.
(1) All the hard coded colors within gnome-about, which I am going to
create a patch to address this.
(2) There is another problem with the hc-reverse theme itself.
I tried print out the value of the fg colour and it is always
( 0 0 0 ) which is black. Hence, the colour theme for reverse
 does not work.

Attached is the modified gtk-demo program.

Comment 14 Ghee Teo 2004-02-09 15:19:33 UTC
Created attachment 24236 [details] [review]
gnome-about patch
Comment 15 Ghee Teo 2004-02-09 15:25:57 UTC
The attached gnome-about patch fixes the following problems:
- The background and foreground colours honour theme changes correctly
- For HC-Reverse theme, I believe there is a bug outside gnome-about
  therefore, despite it honours the theme changes, the text is not
  very visible
- I also removed the colour animation for the contributors and only 
  keeping the size animation. The reason for doing so is that now we
  are using the theme color rather than the black colour as standing
  point which produces some jumping behaviour based on the default
  foreground color.

- Apart from the start, this patch is simply removed the hardcoding of
  color and let the theming engine does the rest.

Please review the patch and see this can be committed.
Comment 16 bill.haneman 2004-02-09 15:52:53 UTC
ghee: I suspect the visibility problem with inverse themes has to do
with how antialiasing works for white text on black (not very well!).

Perhaps the HighContrast themes should be able to turn off
antialiasing, or at least select a more visible form.  Do things
improve if you change the smoothing/antialiasing settings in the Font
capplet?
Comment 17 Ghee Teo 2004-02-09 16:38:34 UTC
Bill, unfortunately setting to no antialiasing or not has no effect on
the foreground color. It is still black when it is supposed to be white
in the HC Reverse Theme.
Comment 18 bill.haneman 2004-02-09 17:09:35 UTC
I did not understand your comment - I thought you were talking about
antialiasing problems.  Can you please explain the issue in more
detail (about which you say there 'is a bug outside gnome-about' ?)
Comment 19 Ghee Teo 2004-02-09 17:21:04 UTC
Created attachment 24242 [details]
screen-shot in highconstrat reverse theme
Comment 20 Ghee Teo 2004-02-09 17:28:09 UTC
Bill, see attached screen shot. You should see lots of black text
behind the blue background. I tested the app as well as with the gtk+
demo app, it seems like doing

- wid = gtk-new-widget();
- style = gtk_widget_get_style (wid)
  g_print ("gtkstyle fg color: ( %d %d %d )\n",
                   style->fg[0].red, style->fg[0].green, 
                   style->fg[0].blue);

I would expect that value to be 65535, 65535, 65535 but instead I got
0,0,0.

This is what I meant the bug lied outside gnome-about.Could be in the 
theme engine or else where.

Comment 21 bill.haneman 2004-02-09 18:51:16 UTC
Ghee: obviously the GtkStyle does work with inverse themes in the
general case.  So, question is, what's different about your test case?
Comment 22 bill.haneman 2004-02-09 18:52:35 UTC
oh also - Ghee, text is normally drawn in text_gc on a background of
base_gc, not fg_gc over bg_gc.  However for HCI themes both text_gc
and fg_gc should be white and base_gc and bg_gc should be nearly black.
Comment 23 Mark McLoughlin 2004-02-16 09:10:49 UTC
Okay, looks like progress is being made. The patch looks reasonably
sane to me, but obviously we want it actually working nicely under the
various themes before committing.
Comment 24 bill.haneman 2004-02-17 13:45:02 UTC
ghee, any progress in tracking down the problem with text color (0,0,0) ?
Comment 25 bill.haneman 2004-02-27 18:47:51 UTC
We are only days from 2.6 code freeze.  Is this bug still being worked on?
Comment 26 Ghee Teo 2004-03-01 15:33:55 UTC
No was done to this over the last 2 weeks...I am afraid :)
Comment 27 bill.haneman 2004-03-01 16:28:49 UTC
what is the plan for resolving this THIS WEEK ?  thanks.
Comment 28 Ghee Teo 2004-03-02 14:00:17 UTC
Okay. While I found out what is the major difference why the
gnome-about is not behaving properly. 
The problem is that many of the text used in this dialog box are of type
gnome_canvas_text which provides Markup text support, but does not
take into consideration for gtkstyle changes. By comparison, the
scrolling license text is based on gnome_canvas_rich_text which does
not provides the Markup text support does have code to take into
consideration of gtkstyle colors. The question is how can
gnome_canvas_text be modified to consider the gtkstyle values?


Comment 29 Ghee Teo 2004-03-02 17:44:02 UTC
Looked a bit more in gnome-canvas-text.c where the gtkstyle stuff
should be stuck in. But it seems non-trivial. So if anyone else want
to pick it :)
Comment 30 bill.haneman 2004-03-07 13:51:45 UTC
Do we really need the markup in the (gnome-canvas-text) gnome-about
text, or can we provide it another way (via gnome_canvas_rich_text)?
Comment 31 Vijaykumar Patwari 2004-04-02 15:20:57 UTC
Created attachment 26259 [details] [review]
Patch to get the text color working on theme change 

Took Ghee's patch and added the fix for foreground text color changes. All the
foreground text respond to the theme changes, except the introductory messages
only in a partcular scenario. The foreground color changes don't get reflected
on these intro messages only when we have the dialog up and we change the
theme. This is because the intro messages are put using gnome_canvas_rich_text.
At this moment there is no property to set the color. I am looking in to this.
In the meantime kindly have a look at the attached patch.
Comment 32 Muktha 2004-04-08 14:58:08 UTC
Bugzilla bug #139485 has a patch for the remaining issue mentioned above
Comment 33 Mark McLoughlin 2004-04-19 12:19:19 UTC
I haven't looked at the patch in great detail, but I've tried it out. I think
its fairly sad that we can't figure out a way to use a white background - grey
looks really dull in this case

I'll look at it more after we branch
Comment 34 bill.haneman 2004-04-19 12:27:10 UTC
If gray is being used when HCLPI theme is in used, then the patch isn't working
correctly; HCLPI should be using white text on a nearly-black background.
If a "dull grey" is appearing using 'default' themes, then probably the
gnome-canvas is using bg_gc where it should logically be using base_gc.
Comment 35 bill.haneman 2004-04-19 12:29:11 UTC
Yes I think this part of the patch is wrong:

+	for (l = list_item; l; l = l->next) 
+		gnome_canvas_item_set (GNOME_CANVAS_ITEM (l->data),
+				       "fill_color_gdk", GTK_WIDGET (canvas)->style->fg, NULL);        
+}

This should be using (canvas)->style->base.
Comment 36 bill.haneman 2004-04-19 12:32:28 UTC
sorry for repeated serial comments, but something else possibly important
occurred to me: gtk+ "normally" uses a style that gives GtkTextView and GtkEntry
a different base gc from other widgets (i.e. 'white' or nearly white).  So if
fixing the patch above to use base doesn't solve the 'grey background' issue,
then we may need to grab the style info for GtkTextView and shove that GdkGC
into the canvas fill color call instead of use the default canvas fill color.

Hard-coding the canvas fill color ignores the canvas style, probably the desire
to "whiten" it is what partly led to the theming problems in the first place.
Comment 37 Calum Benson 2004-10-21 16:50:21 UTC
Apologies for spam-- ensuring Sun a11y team are cc'ed on all current a11y bugs.
 Filter on "SUN A11Y SPAM" to ignore.
Comment 38 Calum Benson 2006-04-26 17:08:23 UTC
Apologies for spam... ensuring Sun a11y folks are cc'ed on all current accessibility bugs.
Comment 39 Christian Persch 2007-08-30 20:10:40 UTC
The patch still applies (except for the ChangeLog entry) and fixes the bug except for the GNOME foot icon (I guess we need a HCI variant of that logo). Can it be applied for 2.20 ?
Comment 40 Vincent Untz 2007-11-12 22:13:27 UTC
gnome-about has been rewritten in python and doesn't use a canvas anymore. This bug is fixed now. See bug 481585 for more details.
Comment 41 Luca Cavalli 2007-12-01 18:02:08 UTC
Created attachment 99984 [details]
gnome-about-mockup-all.png

Having a themed gnome logo with some backgrounds it produces unexpected results (and, I think, also not compliant with the logo guidelines[1]). I have made a couple of mockups to mimic the branding used in gnome-system-monitor (indeed not sure about the result :).

[1] - http://live.gnome.org/BrandGuidelines?action=show
Comment 42 Vincent Untz 2007-12-03 19:27:51 UTC
Luca: the bug here is that we're using a image header, which is breaking stuff anyway. See bug 125293.