From 544a3a58494ee34d01ebad89039b3ba828d0e925 Mon Sep 17 00:00:00 2001 From: eidheim Date: Sat, 15 Aug 2015 13:17:44 +0200 Subject: [PATCH] Renamed juci.xml to juci-light.xml, and added a juci-dark style to be used with dark gtk theme variants. --- src/config.cc | 8 ++++-- src/files.h | 71 ++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 70 insertions(+), 9 deletions(-) diff --git a/src/config.cc b/src/config.cc index 366a7d4..7a433fb 100644 --- a/src/config.cc +++ b/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::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)) - 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() { diff --git a/src/files.h b/src/files.h index 48b759e..e842f00 100644 --- a/src/files.h +++ b/src/files.h @@ -6,7 +6,7 @@ const std::string configjson = " \"variant\": \"\" //Use \"\" for default variant, and \"dark\" for dark theme variant\n" " },\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" " \"clang_types\": {\n" " \"8\": \"def:function\",\n" @@ -126,10 +126,10 @@ const std::string menuxml = " \n" "\n"; -const std::string juci_style = +const std::string juci_light_style = "\n" "\n" -"\n" +"\n" " juCi++ team\n" " <_description>Default juCi++ style\n" "\n" @@ -142,15 +142,15 @@ const std::string juci_style = " \n" " \n" " \n" -" \n" +" \n" " \n" "\n" " \n" -"