Page 1 of 2

text colors on gnome desktop

Posted: Sun May 08, 2011 11:00 pm
by underdoeg
Hi, I use a relatively dark theme (Equinox) on Ubuntu / Gnome 2

Overall CodeLite reacts really well within the theme. I just have a few issues regarding the text colors. Compile errors for example appear white on a bright background. And so do debugging messages (see screenshots). Is there any way one could reassign those colors? Or do you know which colors of the system theme are used? I use CodeLite as often I'd be willing to change them...

Image
Image

thanks for any help and an awesome IDE

lg.ph

Re: text colors on gnome desktop

Posted: Mon May 09, 2011 12:05 pm
by nemesis
hej!

there is no setting to fix this (yet ;) ). the only way to solve this issue is to manually set the (hardcoded) fontcolor in the source, recompile and replace the codelite binary (did that myself).
the place to look for the buildpane is in "LiteEditor/buidltab.cpp:163" (and 166 - just search for 'BLACK' - and yes, the filename has a typo):

Code: Select all

sci->StyleSetForeground ( wxSCI_LEX_GCC_OUTPUT, wxT("BLACK") );
sci->StyleSetBackground ( wxSCI_LEX_GCC_OUTPUT, wxSystemSettings::GetColour ( wxSYS_COLOUR_WINDOW ) );

sci->StyleSetForeground ( wxSCI_LEX_GCC_BUILDING, wxT("BLACK") );
change the color to what you want it to be. i don't know whether this is the same colorsource for the debuggerpane.
actually i already started to write a patch, but it's not complete yet and currently i'm a little bit out of time :) but it'll come.

regards,
nem

Re: text colors on gnome desktop

Posted: Mon May 09, 2011 4:02 pm
by underdoeg
thanks!

Good thing I already compiled the software from source. :)

The patch your about to write is to have a settings pane for that?

lg.ph

Re: text colors on gnome desktop

Posted: Mon May 09, 2011 4:59 pm
by nemesis
yes, i'll probably add it to the settings.

Re: text colors on gnome desktop

Posted: Tue May 10, 2011 4:03 pm
by underdoeg
Sounds good...

I dug around in the code a little. Actually I had to add to change LiteEditor/errorstab.cpp

Code: Select all

m_treeListCtrl->SetItemTextColour(newItem, wxT("BLACK"));
on line 155 somewhere after:

Code: Select all

int imgId = isError ? 0 : 1;
	wxTreeItemId newItem = m_treeListCtrl->AppendItem(item, displayText, imgId, imgId, new ErrorsTabItemData(lineInfo));
	m_treeListCtrl->SetItemText(newItem, 1, wxString::Format(wxT("%ld"), lineInfo.linenum + 1));
and on line 262 I added:

Code: Select all

m_treeListCtrl->SetItemTextColour(statusItem, wxT("BLACK"));
That fixed the error messages. I didn't find the debugger output. But it's not as important.

thanks

Re: text colors on gnome desktop

Posted: Wed May 11, 2011 3:18 pm
by eranif
Your fixes are "hard coded" and will only fix the problem on some machines - this is why they will not go into the main source tree.

However, since I do think it is a problem, I committed into svn another fix which addresses this problem by taking the colors from GTK itself (wx's colors seems buggy atm).
In additions it fixes the colors for other windows as well as other windows (e.g. build, find-in-files, debugger output, debugger views: locals & watches etc.)

There is still room for improvements - but it is a good start.
If you plan on providing future patches, please have a look at the changes I made and use this code as "template"

Eran

Re: text colors on gnome desktop

Posted: Wed May 11, 2011 3:45 pm
by underdoeg
Hi

Yes, of course. I think you misunderstood me. I never meant those "fixes" to be included in any source tree.
I just posted them as detailed so if anybody else had this problem, they could easily solve it in a really dirty way until there's a better solution.

lg.ph

Re: text colors on gnome desktop

Posted: Wed May 11, 2011 3:48 pm
by eranif
underdoeg wrote: they could easily solve it in a really dirty way until there's a better solution
There is already a better solution and it is committed to SVN - just do svn update and build codelite

Eran

Re: text colors on gnome desktop

Posted: Wed May 11, 2011 4:03 pm
by underdoeg
Yes, I just did and it works fine. Thank you.

Re: text colors on gnome desktop [RESOLVED]

Posted: Wed May 11, 2011 4:39 pm
by nemesis
cool, thanks eran :) kind of how i had in mind to patch it.