diff --git a/qtcreator/QtCreator.png b/qtcreator/QtCreator.png new file mode 100644 index 0000000..ac64611 Binary files /dev/null and b/qtcreator/QtCreator.png differ diff --git a/qtcreator/README.md b/qtcreator/README.md new file mode 100644 index 0000000..83ca2bb --- /dev/null +++ b/qtcreator/README.md @@ -0,0 +1,68 @@ +# Solarized colors for Qt Creator + +See Ethan's [Solarized page](http://ethanschoonover.com/solarized) for the +background information. + +[Dedicated repository of this port](https://github.com/artm/qtcreator-solarized-syntax). + +[Main Solarized repository](https://github.com/altercation/solarized). + +![Qt Creator with solarized (light) style](https://github.com/artm/qtcreator-solarized-syntax/raw/master/QtCreator.png) + +## Notes + +At this point only code editor's colors are affected. If you've +installed apple-colorpalette-solarized you can choose compatible +color for gui gradients, but most gui widgets and dialogs are +unaffected by this choice. + +On some platforms (Linux?) Qt style can be controlled by +`~/.config/Trolltech.conf` file, in which case you might find [gist by +booiiing (Patric Schenke)](https://gist.github.com/929469) useful. + +Apparently, Qt Creator: + + - ignores some of the attributes (e.g. `background` of + `CurrentLineNumber`, `foreground` of `SearchResult`) + - derives extra colors from the style (for example for the backgrounds + of nested blocks) + - derives gradients from some colors (e.g. `Occurences`). I haven't + found a way to control all aspects of these elements. I let Qt + Creator control the color of `Occurences.Rename` and (in the light + style) of `SearchScope`) + - composes the gradients / backgrounds in some cases which makes the + result differ from style color. This makes the current line background + lighter then expected, for example. + - different types of background highlight which keep the thext color, + mean I had to deviate from the canonical solarized. + + +I use light theme myself, dark one will probably have more issued at any given +time. + +## Installation + +### Linux / Mac OS X + +Use either: + + ln solarized-*.xml ~/.config/Nokia/qtcreator/styles + +or: + + cp solarized-*.xml ~/.config/Nokia/qtcreator/styles + +to install styles. + +### Windows + +On Windows XP styles should go to: + + Documents and Settings\\Application Data\Nokia\qtcreator\styles + +On Windows 7: + + Users\\AppData\Roaming\Nokia\qtcreator\styles + + + diff --git a/qtcreator/generate-styles.pl b/qtcreator/generate-styles.pl new file mode 100755 index 0000000..2c64117 --- /dev/null +++ b/qtcreator/generate-styles.pl @@ -0,0 +1,47 @@ +#!/usr/bin/env perl +use strict; +use Template; + +my $vars = { + base03 => "#002b36", + base02 => "#073642", + base01 => "#586e75", + base00 => "#657b83", + base0 => "#839496", + base1 => "#93a1a1", + base2 => "#eee8d5", + base3 => "#fdf6e3", + yellow => "#b58900", + orange => "#cb4b16", + red => "#dc322f", + magenta => "#d33682", + violet => "#6c71c4", + blue => "#268bd2", + cyan => "#2aa198", + green => "#859900", +}; + +my $tt = Template->new({INTERPOLATE=>1}) || die "$Template::ERROR\n"; + + +# first light variant... +$vars->{variant} = "light"; +$vars->{bg} = $vars->{base3}; +$vars->{bg1} = $vars->{base2}; +$vars->{text} = $vars->{base00}; +$vars->{emph} = $vars->{base01}; +$vars->{lite} = $vars->{base1}; + +$tt->process("qtcreator-template.xml", $vars, "solarized-light.xml"); + + + +$vars->{variant} = "dark"; +$vars->{bg} = $vars->{base03}; +$vars->{bg1} = $vars->{base02}; +$vars->{text} = $vars->{base0}; +$vars->{emph} = $vars->{base1}; +$vars->{lite} = $vars->{base01}; + +$tt->process("qtcreator-template.xml", $vars, "solarized-dark.xml"); + diff --git a/qtcreator/qtcreator-template.xml b/qtcreator/qtcreator-template.xml new file mode 100644 index 0000000..f7f0feb --- /dev/null +++ b/qtcreator/qtcreator-template.xml @@ -0,0 +1,63 @@ + + + + +