[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-dev] Hello Xara!

Hi, I enjoy Xara LX, and I also like programming so I decided to help
out with some development. My first contribution is rather simple, I
guess the equivalent of a "Hello World".

I am using a non-standard GTK theme. This one has light text on a dark
background. I have found that some parts of Xara's UI are illegible
because they expect dark text on a light background. These changes
should accommodate any GTK theme.

First, in the Gallery dialog the background is white, but any text or
even any line attributes in the line gallery are in the GTK theme's text
color. This makes it very difficult to read using my theme. After some
investigation I discovered that the text background color Xara is
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 from:

GetOSColour(&mTextBack, wxSYS_COLOUR_WINDOW);



Second, also in the Gallery dialog, the lines that contain the folder
icon and some text are also difficult to read. This is because the
background color is being forced to 192,192,192, but the foreground
color used is the theme's color. If the background color should be light
then the foreground color should be dark. This change forces the text on
these lines to black. In Kernel/sgtree.cpp I added these lines after 5006:

          DocColour TextCol(COLOUR_BLACK);

And then on line 5062 (was 5059) I changed from:



RedrawInfo->Renderer->SetFixedSystemTextColours(&TextCol, &Col);

I see also that a number of drop-down selectors have white backgrounds,
but my theme's text color, so I will tackle that problem next. I hope
you'll accept my contribution.