[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
Re: [XaraXtreme-dev] Hello Xara!
- From: JLM <jsado_sc5@xxxxxxxxxxxxx>
- Date: Sun, 27 May 2007 10:21:59 -0400
- Subject: Re: [XaraXtreme-dev] Hello Xara!
After some further investigation of Xara, wxWidgets, and GTK+, I have
started to come to the same conclusion as you that the only truly
correct way to render widgets is to have GTK+ do it. I tried to get GTK+
to give me the color values for some parts of the UI, and a lot of them
are set to black. Further, thinking this was just a problem with my
theme, I looked for others and realized that widgets can take on almost
any arbitrary look, and the only way for Xara to mimic that is to use
the same rendering engine.
So for now I am running Xara like this:
Which overrides the default locations to look for GTK+ rc files, and
finding none, runs the application with the default theme. This may be
useful information if other people have non-default themes and complain
of UI problems. The other option is to set the gtk-theme-name property
of the GtkSettings struct, but I am not certain if that can be done
through wxWidgets so will probably not be portable.
Also, while working on this I have downloaded the latest wxGTK, 2.8.4. I
have installed that and made modifications to Xara to compile against
that. Is this a useful endeavor? If so I will continue the work on it
and can submit the diffs. I suspect I will have to add "#if wxgtk2_8" or
similar around my changes as some of the class names have changed.
Additionally, while I have Xara compiling and running with wxGTK 2.8.4,
I did notice two problems: The keyboard shortcuts are mapped to
different commands (ex: F4 chooses selector tool), and dialog boxes do
not update their contents properly.
Alex Bligh wrote:
> --On 24 May 2007 19:33 -0400 JLM <jsado_sc5@xxxxxxxxxxxxx> wrote:
>> obtaining from wxWidgets is wxSYS_COLOUR_WINDOW. wxWidgets always
>> returns white for that value. I think the more appropriate enum is
>> wxSYS_COLOR_BACKGROUND. So in wxOil/dlgcol.cpp on line 207 change it
>> GetOSColour(&mTextBack, wxSYS_COLOUR_WINDOW);
>> GetOSColour(&mTextBack, wxSYS_COLOUR_BACKGROUND);
> Ignore my previous reasoning for this bit. I think I now understand
> what you are saying, and the answer is this:
> Under MSW (and possibly the Mac, I don't know) there is a default colour
> for a workspace window (so, for instance, what the background colour
> would be under say Notepad), which is white. That's the gallery background
> colour. It isn't intended to by light gray which is dialog background
> colour. However, GTK doesn't have this concept as a customisable colour
> (or at least it isn't read by wxWidgets) which is why it hard codes
> it to white. So whilst I don't think the change you present above is
> correct, I am unsure what the answer is.