From d57b18c14414208b11d8557a37a163647b848285 Mon Sep 17 00:00:00 2001 From: es Date: Mon, 15 Jun 2015 10:23:25 +0200 Subject: [PATCH 1/2] Add custom background color --- juci/config.json | 2 +- juci/source.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/juci/config.json b/juci/config.json index bcb8a45..7c0b9d1 100644 --- a/juci/config.json +++ b/juci/config.json @@ -1,7 +1,7 @@ { "source": { "colors": { - "text_color": "#333333", + "text_color": "black", "string": "#CC0000", "namespace_ref": "#990099", "type": "#0066FF", diff --git a/juci/source.cc b/juci/source.cc index 4069891..847b2cd 100644 --- a/juci/source.cc +++ b/juci/source.cc @@ -49,12 +49,13 @@ string Source::View::GetLineBeforeInsert() { return line; } -// Source::View::ApplyTheme() +// Source::View::ApplyConfig // Applies theme in textview void Source::View::ApplyConfig(const Source::Config &config) { override_font(Pango::FontDescription(config.font)); set_show_line_numbers(config.show_line_numbers); set_highlight_current_line(config.highlight_current_line); + this->override_background_color(Gdk::RGBA(config.background)); for (auto &item : config.tagtable()) { get_buffer()->create_tag(item.first)->property_foreground() = item.second; } From 1b1878f5c039486718c32c9cfc59f6d0f4b933c6 Mon Sep 17 00:00:00 2001 From: es Date: Mon, 15 Jun 2015 14:07:21 +0200 Subject: [PATCH 2/2] Remove printlines --- juci/config.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/juci/config.cc b/juci/config.cc index b4619dd..eaf4d62 100644 --- a/juci/config.cc +++ b/juci/config.cc @@ -26,15 +26,12 @@ void MainConfig::GenerateSource() { } if (i.first == "show_line_numbers") { source_cfg.show_line_numbers = i.second.get_value() == "1" ? true : false; - std::cout << source_cfg.show_line_numbers << std::endl; } if (i.first == "highlight_current_line") { source_cfg.highlight_current_line = i.second.get_value() == "1" ? true : false; - std::cout << source_cfg.highlight_current_line << std::endl; } if (i.first == "font") { source_cfg.font = i.second.get_value(); - std::cout << source_cfg.font << std::endl; } } source_cfg.tab_size = source_json.get("tab_size");