Author Topic: Default color themes.  (Read 61909 times)

i got no legs

  • Guest
Default color themes.
« on: March 17, 2007, 03:46:48 am »
I am a new user to Code::Blocks. It is my favorite IDE out of the few I tried. I am still only learning to write in C, so there is not much I can do to actually help develop it. However, I figured that maybe I could help by submitting afew more color themes. What I would like to do is ask the users who submitted textmate themes here:

http://macromates.com/wiki/Themes/UserSubmittedThemes

If I could re-do the theme for Code::Blocks. If they say yes, I will convert it over and submit a link to the .reg file here. I know it's really not very much, but I think it would be one nice little thing for Code::Blocks to have.

As an example, I have already converted over the RubyBlue theme. (which for some reason doesn't seem to have an actual author attached to it.)

You can get it here:
http://www.mistersampo.com/what/rubyblue.reg

Offline jamieo

  • Multiple posting newcomer
  • *
  • Posts: 26
Re: Default color themes.
« Reply #1 on: March 17, 2007, 10:48:45 pm »
Hi, some alternative colour schemes would be nice - I looked on the site you linked to and there are some nice ones there if you ignore the bulk of light-on-dark that seems popular...

However, it seems you're using version 1.0 RC2 from the main page which is a bit old now - while there's nothing wrong with that the newer versions (see the nightly forum) don't save settings into the registry any more so are unable to load your schemes.  I'd recommend having a look at the nightly builds before investing time converting a lot of schemes to .reg format.

Settings in the latest version are held in an xml file - the path on my system is: %AppData%\CodeBlocks\default.conf

Jamie

i got no legs

  • Guest
Re: Default color themes.
« Reply #2 on: March 18, 2007, 12:12:29 am »
I grabbed the latest nightly, and things seem way different, for the better. The problem is that I cannot seem to find where it saves sytax highlighting styles. There is no .conf file and I tried doing a search for files containing a style name I added. I found nothing, but I think it might save stuff in \share\CodeBlocks\lexers? It's not clear how or where it saves this information.

Offline jamieo

  • Multiple posting newcomer
  • *
  • Posts: 26
Re: Default color themes.
« Reply #3 on: March 20, 2007, 01:17:12 am »
The .conf file should be where I originally said:  %AppData%\CodeBlocks\default.conf...

However, codeblocks only saves the changes you make.  Therefore, a default install will not have any styles in that conf - even if you make a duplicate of a theme, no colors will be saved until you actually change some to be different than the defaults (which, as you've found, are in share\CodeBlocks\lexers).  This makes sense as each theme can hold a configuration for all the supported languages (nearly 30) so the overhead would be huge otherwise.

To test I made a new scheme and changed the comment and preprocessor colours for c++ and the comment colour for css, closed codeblocks, opened my .conf and searched for 'mycolours' (the name of my theme).  First hit was an entry setting it as the active theme, the next hit follows:-

Code: [Select]
<mycolours>
<NAME>
<str>
<![CDATA[mycolours]]>
</str>
</NAME>
<css>
<style9>
<FORE>
<colour r="0" g="160" b="0" />
</FORE>
<NAME>
<str>
<![CDATA[Comment]]>
</str>
</NAME>
</style9>
<NAME>
<str>
<![CDATA[CSS]]>
</str>
</NAME>
</css>
<cc>
<style1>
<FORE>
<colour r="0" g="160" b="0" />
</FORE>
<NAME>
<str>
<![CDATA[Comment (normal)]]>
</str>
</NAME>
</style1>
<style2>
<FORE>
<colour r="0" g="160" b="0" />
</FORE>
<NAME>
<str>
<![CDATA[Comment (normal)]]>
</str>
</NAME>
</style2>
<style14>
<FORE>
<colour r="160" g="160" b="160" />
</FORE>
<NAME>
<str>
<![CDATA[Preprocessor]]>
</str>
</NAME>
</style14>
<NAME>
<str>
<![CDATA[C/C++]]>
</str>
</NAME>
</cc>
</mycolours>

I then copied the xml block above and changed the name to 'mycolours2' (in all three places), messed with the RGB values and deleted the css section.  Restarting codeblocks I now have another theme where the c++ comment and preprocessor colours are ugly (since I used random numbers!) and the css colours are back to the default settings.

Unfortunately, the xml looks nothing like the lexer settings you found so I wouldn't mess with trying to use them as a template -  the best way to start would be to make a scheme where you just change every setting to something slightly different (change a single digit?) and then keep that as a template.  Then you should be able to change the name, set the colours and paste into the config.  Not as easy as a reg file but more configurable - maybe you could work on some import and export buttons!  ;)

Btw, In the xml above I noticed both style 1 + 2 are called 'Comment (normal)'.  One is for a block comment and the other is for a normal comment but the gui config presents them as one setting and just sets them to the same value.  By editing the xml by hand you can set them differently.

Hope that helps, I look forward to trying your schemes.

Jamie

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Default color themes.
« Reply #4 on: March 20, 2007, 09:16:52 am »
Has nobody heard of cb_share_config??
Messing with the config file manually can only lead to problems.

Morten, you need to advertise it :)
Be patient!
This bug will be fixed soon...

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Default color themes.
« Reply #5 on: March 20, 2007, 09:18:35 am »
I don't know why it's not distributed with Nightlies? :?

If I compile from SVN, it gets compiled and copied to proper directory, but it's missing in Nightlies. :)
« Last Edit: March 20, 2007, 09:25:37 am by Biplab »
Be a part of the solution, not a part of the problem.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9479
Re: Default color themes.
« Reply #6 on: March 20, 2007, 10:25:58 am »
Has nobody heard of cb_share_config??
Morten, you need to advertise it :)
Hehe... right. ;-)
Anyways: cb_share_config currently only takes care of "important" settings:
- tools
- compiler settings
- custom compiler settings
- help files
- environment variables
- global compiler variables
...but: It can be extended easily upon request and/or self-made...

With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline jamieo

  • Multiple posting newcomer
  • *
  • Posts: 26
Re: Default color themes.
« Reply #7 on: March 20, 2007, 07:13:24 pm »
I'd never heard of cb_share_config until I noticed it in a portable package posted recently.  Is there any reason it is not bundled or built in to codeblocks?

It did occur to me to try it for this topic but as Morten says, it does not handle font settings etc.  However, I'm sure a build that does would be appreciated!   :)
« Last Edit: March 20, 2007, 07:17:11 pm by jamieo »

Offline stardust

  • Multiple posting newcomer
  • *
  • Posts: 55
    • http://www.hightec-rt.com
Re: Default color themes.
« Reply #8 on: March 26, 2007, 02:18:52 pm »
I would appreciate better colors very much.



C::B's color settings imply that you love "black-on-white" style. If not, you are out on a limb.....

  • The inactive tab's colors are set explicitely and do not care about the contrast.
  • The colors of xrc's and headers' file names are invisible. In a "black-on-white" environment these colors are grayed out, quite confusing... This color does not come from the GUI system, is not configurable by C::B and does not care about a convenient contrast.
Own SVN builds (quite new) SuSE Linux 10.0 Linux kernel 2.6.13-15-default
gcc 4.0.2 (20050901)
wxGTK-2.6.1.0-4 KDE 3.4.2b gtk2 2.8.3-4

Offline amirseg

  • Single posting newcomer
  • *
  • Posts: 3
Re: Default color themes.
« Reply #9 on: August 27, 2007, 09:53:00 pm »
Hi,
I noticed you are all talking about the colors in codeblocks, and I have a question.
I am a new user to Linux and codeblocks, but I have a problem that I cannot see anythinf in the editor section in the codeblocks.
All I see is a white page. If I write somethng and save it and open in the editor - it save what I typed, but I can't relly work like that...
Is there anything you think I can do?
I am getting crazy here.....

Amir

Onanymous

  • Guest
Re: Default color themes.
« Reply #10 on: November 01, 2009, 06:24:20 pm »
C::B's color settings imply that you love "black-on-white" style. If not, you are out on a limb.....
now 2 years afterwards it is still the same.... :(
and it is the same with the forum engine here by the way :)