diff options
author | Trevor Bramble <inbox@trevorbramble.com> | 2013-06-26 22:37:59 -0700 |
---|---|---|
committer | Trevor Bramble <inbox@trevorbramble.com> | 2013-06-26 22:37:59 -0700 |
commit | d9d19cfcc1a1b61ce24b90f45e381bf08cbf1fa6 (patch) | |
tree | 6eaa3b2212cb1c2113d8c597310d5373321ec2b5 | |
parent | 6d8a9ead9c8f246343ff5547d0fefa3e5a76c904 (diff) | |
download | solarized-d9d19cfcc1a1b61ce24b90f45e381bf08cbf1fa6.tar.gz |
add qtcreator back as a subtree
-rw-r--r-- | qtcreator/QtCreator.png | bin | 0 -> 115287 bytes | |||
-rw-r--r-- | qtcreator/README.md | 68 | ||||
-rwxr-xr-x | qtcreator/generate-styles.pl | 47 | ||||
-rw-r--r-- | qtcreator/qtcreator-template.xml | 63 | ||||
-rw-r--r-- | qtcreator/solarized-dark.xml | 57 | ||||
-rw-r--r-- | qtcreator/solarized-light.xml | 60 |
6 files changed, 295 insertions, 0 deletions
diff --git a/qtcreator/QtCreator.png b/qtcreator/QtCreator.png Binary files differnew file mode 100644 index 0000000..ac64611 --- /dev/null +++ b/qtcreator/QtCreator.png 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\<user name>\Application Data\Nokia\qtcreator\styles + +On Windows 7: + + Users\<user name>\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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<style-scheme version="1.0" name="Solarized ($variant)"> + <!-- + Solarized theme ($variant background) + --> + + <style name="Text" foreground="$text" background="$bg"/> + <style name="LineNumber" foreground="$lite" background="$bg1"/> + <style name="CurrentLine" background="$bg1"/> + <!-- inveted background --> + <style name="Selection" foreground="$bg1" background="$lite"/> + <style name="Occurrences" background="$lite"/> + + <!-- non-solarized backgrounds --> +[% IF variant == 'light' %] + <!-- light yellow overlay that works on solarized background as well as + on top of default SearchScope --> + <style name="SearchResult" background="#FFFFB0"/> +[% ELSE %] + <style name="SearchResult" background="#555000"/> + <style name="SearchScope" background="#222000"/> +[% END %] + + <style name="DisabledCode" foreground="$base1"/> + <style name="Comment" foreground="$base1"/> + <style name="Doxygen.Comment" foreground="$base1"/> + <style name="Keyword" foreground="$base01" bold="true"/> + <style name="Operator" foreground="$base01"/> + <style name="Label" foreground="$base01" bold="true"/> + <style name="CurrentLineNumber" foreground="$base01" bold="true"/> + + <!-- highlights --> + <style name="Number" foreground="$cyan"/> + <style name="String" foreground="$cyan"/> + <style name="Type" foreground="$yellow"/> + <style name="Link" foreground="$blue"/> + <style name="Preprocessor" foreground="$violet"/> + <style name="Parentheses" foreground="$red"/> + + <!-- WIP --> + <style name="Static" foreground="$green" italic="true"/> + <style name="Doxygen.Tag" foreground="$cyan"/> + + <style name="DiffFile" foreground="$green"/> + <style name="DiffLocation" foreground="$yellow"/> + <style name="AddedLine" foreground="$cyan"/> + <style name="RemovedLine" foreground="$red"/> + + <!-- no color / default --> + <style name="VirtualMethod" italic="true"/> + + <!-- let QtCreator choose: these colors are composed on top of + existing text, I can't find a nice way to stay compatible with + Solarized and produce readable results. + + <style name="Occurrences.Rename"/> +[% IF variant == 'light' %] + <style name="SearchScope"/> +[% END %] + <style name="Field"/> + <style name="Local"/> + --> +</style-scheme> diff --git a/qtcreator/solarized-dark.xml b/qtcreator/solarized-dark.xml new file mode 100644 index 0000000..0545319 --- /dev/null +++ b/qtcreator/solarized-dark.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?> +<style-scheme version="1.0" name="Solarized (dark)"> + <!-- + Solarized theme (dark background) + --> + + <style name="Text" foreground="#839496" background="#002b36"/> + <style name="LineNumber" foreground="#586e75" background="#073642"/> + <style name="CurrentLine" background="#073642"/> + <!-- inveted background --> + <style name="Selection" foreground="#073642" background="#586e75"/> + <style name="Occurrences" background="#586e75"/> + + <!-- non-solarized backgrounds --> + + <style name="SearchResult" background="#555000"/> + <style name="SearchScope" background="#222000"/> + + + <style name="DisabledCode" foreground="#93a1a1"/> + <style name="Comment" foreground="#93a1a1"/> + <style name="Doxygen.Comment" foreground="#93a1a1"/> + <style name="Keyword" foreground="#586e75" bold="true"/> + <style name="Operator" foreground="#586e75"/> + <style name="Label" foreground="#586e75" bold="true"/> + <style name="CurrentLineNumber" foreground="#586e75" bold="true"/> + + <!-- highlights --> + <style name="Number" foreground="#2aa198"/> + <style name="String" foreground="#2aa198"/> + <style name="Type" foreground="#b58900"/> + <style name="Link" foreground="#268bd2"/> + <style name="Preprocessor" foreground="#6c71c4"/> + <style name="Parentheses" foreground="#dc322f"/> + + <!-- WIP --> + <style name="Static" foreground="#859900" italic="true"/> + <style name="Doxygen.Tag" foreground="#2aa198"/> + + <style name="DiffFile" foreground="#859900"/> + <style name="DiffLocation" foreground="#b58900"/> + <style name="AddedLine" foreground="#2aa198"/> + <style name="RemovedLine" foreground="#dc322f"/> + + <!-- no color / default --> + <style name="VirtualMethod" italic="true"/> + + <!-- let QtCreator choose: these colors are composed on top of + existing text, I can't find a nice way to stay compatible with + Solarized and produce readable results. + + <style name="Occurrences.Rename"/> + + <style name="Field"/> + <style name="Local"/> + --> +</style-scheme> diff --git a/qtcreator/solarized-light.xml b/qtcreator/solarized-light.xml new file mode 100644 index 0000000..1e4cb8d --- /dev/null +++ b/qtcreator/solarized-light.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<style-scheme version="1.0" name="Solarized (light)"> + <!-- + Solarized theme (light background) + --> + + <style name="Text" foreground="#657b83" background="#fdf6e3"/> + <style name="LineNumber" foreground="#93a1a1" background="#eee8d5"/> + <style name="CurrentLine" background="#eee8d5"/> + <!-- inveted background --> + <style name="Selection" foreground="#eee8d5" background="#93a1a1"/> + <style name="Occurrences" background="#93a1a1"/> + + <!-- non-solarized backgrounds --> + + <!-- light yellow overlay that works on solarized background as well as + on top of default SearchScope --> + <style name="SearchResult" background="#FFFFB0"/> + + + <style name="DisabledCode" foreground="#93a1a1"/> + <style name="Comment" foreground="#93a1a1"/> + <style name="Doxygen.Comment" foreground="#93a1a1"/> + <style name="Keyword" foreground="#586e75" bold="true"/> + <style name="Operator" foreground="#586e75"/> + <style name="Label" foreground="#586e75" bold="true"/> + <style name="CurrentLineNumber" foreground="#586e75" bold="true"/> + + <!-- highlights --> + <style name="Number" foreground="#2aa198"/> + <style name="String" foreground="#2aa198"/> + <style name="Type" foreground="#b58900"/> + <style name="Link" foreground="#268bd2"/> + <style name="Preprocessor" foreground="#6c71c4"/> + <style name="Parentheses" foreground="#dc322f"/> + + <!-- WIP --> + <style name="Static" foreground="#859900" italic="true"/> + <style name="Doxygen.Tag" foreground="#2aa198"/> + + <style name="DiffFile" foreground="#859900"/> + <style name="DiffLocation" foreground="#b58900"/> + <style name="AddedLine" foreground="#2aa198"/> + <style name="RemovedLine" foreground="#dc322f"/> + + <!-- no color / default --> + <style name="VirtualMethod" italic="true"/> + + <!-- let QtCreator choose: these colors are composed on top of + existing text, I can't find a nice way to stay compatible with + Solarized and produce readable results. + + <style name="Occurrences.Rename"/> + + <style name="SearchScope"/> + + <style name="Field"/> + <style name="Local"/> + --> +</style-scheme> |