Browse Source

Renamed juci.xml to juci-light.xml, and added a juci-dark style to be used with dark gtk theme variants.

merge-requests/365/head
eidheim 10 years ago
parent
commit
544a3a5849
  1. 8
      src/config.cc
  2. 71
      src/files.h

8
src/config.cc

@ -32,9 +32,13 @@ void MainConfig::find_or_create_config_files() {
boost::filesystem::create_directories(boost::filesystem::path(Singleton::style_dir())); boost::filesystem::create_directories(boost::filesystem::path(Singleton::style_dir()));
boost::filesystem::path juci_style_path=Singleton::style_dir(); boost::filesystem::path juci_style_path=Singleton::style_dir();
juci_style_path+="juci.xml"; juci_style_path+="juci-light.xml";
if(!boost::filesystem::exists(juci_style_path)) if(!boost::filesystem::exists(juci_style_path))
juci::filesystem::write(juci_style_path, juci_style); juci::filesystem::write(juci_style_path, juci_light_style);
juci_style_path=Singleton::style_dir();
juci_style_path+="juci-dark.xml";
if(!boost::filesystem::exists(juci_style_path))
juci::filesystem::write(juci_style_path, juci_dark_style);
} }
void MainConfig::GenerateSource() { void MainConfig::GenerateSource() {

71
src/files.h

@ -6,7 +6,7 @@ const std::string configjson =
" \"variant\": \"\" //Use \"\" for default variant, and \"dark\" for dark theme variant\n" " \"variant\": \"\" //Use \"\" for default variant, and \"dark\" for dark theme variant\n"
" },\n" " },\n"
" \"source\": {\n" " \"source\": {\n"
" \"style\": \"juci\", //Use \"\" for default style. Styles from normal gtksourceview install: classic, cobalt, kate, oblivion, solarized-dark, solarized-light, tango\n" " \"style\": \"juci-light\", //Use \"\" for default style, and for instance juci-dark together with dark gtk_theme variant. Styles from normal gtksourceview install: classic, cobalt, kate, oblivion, solarized-dark, solarized-light, tango\n"
" \"font\": \"Monospace\", //Use \"\" for default font, and for instance \"Monospace 12\" to also set size.\n" " \"font\": \"Monospace\", //Use \"\" for default font, and for instance \"Monospace 12\" to also set size.\n"
" \"clang_types\": {\n" " \"clang_types\": {\n"
" \"8\": \"def:function\",\n" " \"8\": \"def:function\",\n"
@ -126,10 +126,10 @@ const std::string menuxml =
" </menubar>\n" " </menubar>\n"
"</ui>\n"; "</ui>\n";
const std::string juci_style = const std::string juci_light_style =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"\n" "\n"
"<style-scheme id=\"juci\" _name=\"juci\" version=\"1.0\">\n" "<style-scheme id=\"juci-light\" _name=\"juci\" version=\"1.0\">\n"
" <author>juCi++ team</author>\n" " <author>juCi++ team</author>\n"
" <_description>Default juCi++ style</_description>\n" " <_description>Default juCi++ style</_description>\n"
"\n" "\n"
@ -142,15 +142,15 @@ const std::string juci_style =
" <color name=\"blue\" value=\"#0000FF\"/>\n" " <color name=\"blue\" value=\"#0000FF\"/>\n"
" <color name=\"dark-blue\" value=\"#002299\"/>\n" " <color name=\"dark-blue\" value=\"#002299\"/>\n"
" <color name=\"yellow\" value=\"#FFFF00\"/>\n" " <color name=\"yellow\" value=\"#FFFF00\"/>\n"
" <color name=\"orange\" value=\"#FF8800\"/>\n" " <color name=\"orange\" value=\"#EE7700\"/>\n"
" <color name=\"purple\" value=\"#990099\"/>\n" " <color name=\"purple\" value=\"#990099\"/>\n"
"\n" "\n"
" <!-- Current Line Highlighting -->\n" " <!-- Current Line Highlighting -->\n"
" <style name=\"current-line\" background=\"#eeeeec\"/>\n" " <style name=\"current-line\" background=\"#EEEEEE\"/>\n"
" <style name=\"current-line-number\" background=\"#eeeeec\"/>\n" " <style name=\"current-line-number\" background=\"#EEEEEE\"/>\n"
"\n" "\n"
" <!-- Bracket Matching -->\n" " <!-- Bracket Matching -->\n"
" <style name=\"bracket-match\" foreground=\"white\" background=\"#BEBEBE\" bold=\"true\"/>\n" " <style name=\"bracket-match\" foreground=\"white\" background=\"gray\" bold=\"true\"/>\n"
" <style name=\"bracket-mismatch\" foreground=\"white\" background=\"#FF0000\" bold=\"true\"/>\n" " <style name=\"bracket-mismatch\" foreground=\"white\" background=\"#FF0000\" bold=\"true\"/>\n"
"\n" "\n"
" <!-- Search Matching -->\n" " <!-- Search Matching -->\n"
@ -181,6 +181,63 @@ const std::string juci_style =
"\n" "\n"
"</style-scheme>\n"; "</style-scheme>\n";
const std::string juci_dark_style =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"\n"
"<style-scheme id=\"juci-dark\" _name=\"juci\" version=\"1.0\">\n"
" <author>juCi++ team</author>\n"
" <_description>Default juCi++ style</_description>\n"
"\n"
" <!-- Palette -->\n"
" <color name=\"white\" value=\"#FFFFFF\"/>\n"
" <color name=\"black\" value=\"#000000\"/>\n"
" <color name=\"gray\" value=\"#888888\"/>\n"
" <color name=\"red\" value=\"#FF8888\"/>\n"
" <color name=\"green\" value=\"#779955\"/>\n"
" <color name=\"blue\" value=\"#8888FF\"/>\n"
" <color name=\"dark-blue\" value=\"#6666CC\"/>\n"
" <color name=\"yellow\" value=\"#666600\"/>\n"
" <color name=\"orange\" value=\"#FF8800\"/>\n"
" <color name=\"purple\" value=\"#DD88DD\"/>\n"
"\n"
" <style name=\"text\" foreground=\"#BBBBBB\"/>\n"
"\n"
" <!-- Current Line Highlighting -->\n"
" <style name=\"current-line\" background=\"#444444\"/>\n"
" <style name=\"current-line-number\" background=\"#444444\"/>\n"
"\n"
" <!-- Bracket Matching -->\n"
" <style name=\"bracket-match\" foreground=\"black\" background=\"gray\" bold=\"true\"/>\n"
" <style name=\"bracket-mismatch\" foreground=\"black\" background=\"#FF0000\" bold=\"true\"/>\n"
"\n"
" <!-- Search Matching -->\n"
" <style name=\"search-match\" background=\"yellow\"/>\n"
"\n"
" <!-- Language specifics -->\n"
" <style name=\"def:builtin\" foreground=\"blue\"/>\n"
" <style name=\"def:constant\" foreground=\"blue\"/>\n"
" <style name=\"def:boolean\" foreground=\"red\"/>\n"
" <style name=\"def:decimal\" foreground=\"red\"/>\n"
" <style name=\"def:base-n-integer\" foreground=\"red\"/>\n"
" <style name=\"def:floating-point\" foreground=\"red\"/>\n"
" <style name=\"def:complex\" foreground=\"red\"/>\n"
" <style name=\"def:character\" foreground=\"red\"/>\n"
" <style name=\"def:special-char\" foreground=\"red\"/>\n"
"\n\n"
" <!-- Language specifics used by clang-parser in default config -->\n"
" <style name=\"def:string\" foreground=\"red\"/>\n"
" <style name=\"def:comment\" foreground=\"gray\"/>\n"
" <style name=\"def:statement\" foreground=\"blue\"/>\n"
" <style name=\"def:type\" foreground=\"blue\"/>\n"
" <style name=\"def:function\" foreground=\"dark-blue\"/>\n"
" <style name=\"def:identifier\" foreground=\"purple\"/>\n"
" <style name=\"def:preprocessor\" foreground=\"green\"/>\n"
" <style name=\"def:error\" foreground=\"red\"/>\n"
" <style name=\"def:warning\" foreground=\"orange\"/>\n"
" <style name=\"def:note\" foreground=\"#BBBBBB\" background=\"yellow\"/>\n"
"\n"
"</style-scheme>\n";
const std::string pluginspy = const std::string pluginspy =
"#!/usr/bin/python \n" "#!/usr/bin/python \n"
"import juci_to_python_api as juci \n" "import juci_to_python_api as juci \n"

Loading…
Cancel
Save