[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
Re: [XaraXtreme-dev] Hello Xara!
- From: JLM <jsado_sc5@xxxxxxxxxxxxx>
- Date: Fri, 25 May 2007 20:41:57 -0400
- Subject: Re: [XaraXtreme-dev] Hello Xara!
I have downloaded wxGTK 2.8.4 (I am currently running with 22.214.171.124) and
although they did modify the GetColourFromGTKWidget function slightly
between the two versions, it is still fundamentally the same. That is,
it creates a new widget (by default, and in our case a gtk_button), and
then calls gtk_rc_get_style(widget). If that fails, then it calls
It then returns (by default, and in our case) the background color for a
button in state GTK_STATE_NORMAL.
This results in (with the default GTK theme) a light gray color.
I tested this with the default GTK theme and wxGTK 126.96.36.199.
Are you saying that other versions of wxWidgets did not return a light
gray color for wxSYS_COLOUR_BACKGROUND?
If instead you want white, maybe it should be using
wxSYS_COLOUR_LISTBOX. That returns white on the GTK default theme, and a
complimentary color under my theme.
At any rate, I hope that at least my other modification can be taken. I
have attached it as a diff. This one affects the color of text in a
Gallery on the line with the folder icon. Since Xara explicitly sets the
background color to a light gray, I think it should also explicitly set
the foreground color. In other words, if you want to override the
default theme color for either the background or the foreground, you
should override them both.
I should be able to get you a signed agreement by Tuesday.
Alex Bligh wrote:
> --On 24 May 2007 19:33 -0400 JLM <jsado_sc5@xxxxxxxxxxxxx> wrote:
>> GetOSColour(&mTextBack, wxSYS_COLOUR_WINDOW);
>> GetOSColour(&mTextBack, wxSYS_COLOUR_BACKGROUND);
> This may have been fixed in a newer version of wxWidgets, but with 2.6 the
> problem was this didn't return the right colour. I spent rather a long time
> making sure greys matched up on Ubuntu. It is indeed illogical in where it
> gets the colours from (and, in particular, where the highlight, and
> mouseover shades for the buttons come from), but it does work on all the
> mainstream versions with normal themes, which it did not doing it the
> "logical" way. If wxWidgets have fixed this, we probably need some
> version dependent code, because the last thing we want to do is break
> standard themes. The ones I checked were Ubuntu, Suse, and Fedora.
--- sgtree.cpp (revision 1766)
+++ sgtree.cpp (working copy)
@@ -5005,6 +5005,9 @@
DocColour Col(192, 192, 192); //128, 128, 128);
Col.SetSeparable(FALSE); // Do not colour correct or separate this colour!
+ DocColour TextCol(COLOUR_BLACK);
@@ -5056,7 +5059,7 @@
- RedrawInfo->Renderer->SetFixedSystemTextColours(&RedrawInfo->Foreground, &Col);
+ RedrawInfo->Renderer->SetFixedSystemTextColours(&TextCol, &Col);
// Space between text and glyph
MyRect.lo.x += DevicePixels(MiscInfo, 3);