Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: atronoush on January 19, 2018, 09:11:32 am

Title: Color Themes - Code::Blocks - Fortran
Post by: atronoush on January 19, 2018, 09:11:32 am
Ten color themes for Code::Blocks Fortran language is available at:

https://github.com/kookma/CB-Fortran-Color-Theme (https://github.com/kookma/CB-Fortran-Color-Theme)

to be used with Fortran plugin in Code::Blocks.

Sample theme:

(https://github.com/kookma/CB-Fortran-Color-Theme/raw/master/img/oblivion.png)

For Developper



NOTE



Recommendation


keywords:
Fortran, Color Themes, Color Scheme, Syntax highlighting
Title: Re: Color Themes - Code::Blocks - Fortran
Post by: oBFusCATed on January 19, 2018, 10:34:24 am
Recommendation

  • It would be great to have these themes included in the new release of Code::Blocks
This can happen if the provided theme supports most popular languages (c/c++, php, html, js, python, shell, makefiles, etc). We cannot add a theme for a single language. It is not user friendly.
Title: Re: Color Themes - Code::Blocks - Fortran
Post by: atronoush on January 19, 2018, 10:47:44 am
The code for generation color theme is open, if other people with knowledge of other popular languages can help, I would be happy to modify themes to cover such popular languages.
Title: Re: Color Themes - Code::Blocks - Fortran
Post by: BlueHazzard on January 19, 2018, 05:02:45 pm
Sadly the theme color management in codeblocks is a mess... I have tried to create a program to manage the themes easily so for example all comments on all languages use the same color. As far as i understand the colors are managed by ID numbers and all languages use different ID for the same group. For example c++ uses for "line comments" the ID=1 and fortran uses the ID=22 . It seems that they are completely random. I would suggest to try to unify them. Making a list with
TypeID
Line comment1
Block comment2
numeric3
......
This would make things a lot more easy to make "universal" themes. Of course are there language features that are not supported by other languages but we could say that this start with id>100 or something like this... Any thoughts on this?

PS. Also related: https://sourceforge.net/p/codeblocks/tickets/587/
Title: Re: Color Themes - Code::Blocks - Fortran
Post by: atronoush on January 19, 2018, 06:18:50 pm
@BlueHazzard,

 That is quite true! You have to create the same theme for all language one by one and it is far from a programming standard!

The xml file in default.conf has many repeated lines to set for example green color for comment line (you have to repeat it for each language separately). It would be great if a base setting could be set and only those elements dedicated to a specific language defined separately in theme.
Title: Re: Color Themes - Code::Blocks - Fortran
Post by: oBFusCATed on January 20, 2018, 01:26:47 am
Not possible at the moment because the language elements are dictated by the editor component (scintilla) we're using.
The new version of the component has this thing reworked, but I've not tired it yet.
Title: Re: Color Themes - Code::Blocks - Fortran
Post by: BlueHazzard on January 20, 2018, 10:27:45 pm
Are you talking about the most recent version of scintilla? With c++14 dependency?
Title: Re: Color Themes - Code::Blocks - Fortran
Post by: oBFusCATed on January 21, 2018, 02:48:53 am
Yes...