text colors on gnome desktop

General questions regarding the usage of CodeLite
underdoeg
CodeLite Enthusiast
Posts: 16
Joined: Sun May 01, 2011 11:43 pm
Genuine User: Yes
IDE Question: c++
Contact:

text colors on gnome desktop

Post 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
Last edited by underdoeg on Mon May 23, 2011 3:41 pm, edited 2 times in total.
nemesis
CodeLite Enthusiast
Posts: 37
Joined: Fri Oct 01, 2010 8:32 pm
Genuine User: Yes
IDE Question: all
Contact:

Re: text colors on gnome desktop

Post 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
underdoeg
CodeLite Enthusiast
Posts: 16
Joined: Sun May 01, 2011 11:43 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: text colors on gnome desktop

Post 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
nemesis
CodeLite Enthusiast
Posts: 37
Joined: Fri Oct 01, 2010 8:32 pm
Genuine User: Yes
IDE Question: all
Contact:

Re: text colors on gnome desktop

Post by nemesis »

yes, i'll probably add it to the settings.
underdoeg
CodeLite Enthusiast
Posts: 16
Joined: Sun May 01, 2011 11:43 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: text colors on gnome desktop

Post 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
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: text colors on gnome desktop

Post 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
Make sure you have read the HOW TO POST thread
underdoeg
CodeLite Enthusiast
Posts: 16
Joined: Sun May 01, 2011 11:43 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: text colors on gnome desktop

Post 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
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: text colors on gnome desktop

Post 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
Make sure you have read the HOW TO POST thread
underdoeg
CodeLite Enthusiast
Posts: 16
Joined: Sun May 01, 2011 11:43 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: text colors on gnome desktop

Post by underdoeg »

Yes, I just did and it works fine. Thank you.
nemesis
CodeLite Enthusiast
Posts: 37
Joined: Fri Oct 01, 2010 8:32 pm
Genuine User: Yes
IDE Question: all
Contact:

Re: text colors on gnome desktop [RESOLVED]

Post by nemesis »

cool, thanks eran :) kind of how i had in mind to patch it.
Post Reply