diff --git a/CMakeLists.txt b/CMakeLists.txt index 57b2166..8618152 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.5) project(juci) -set(JUCI_VERSION "1.8.0.1") +set(JUCI_VERSION "1.8.0.2") set(CPACK_PACKAGE_NAME "jucipp") set(CPACK_PACKAGE_CONTACT "Ole Christian Eidheim ") diff --git a/src/config.cpp b/src/config.cpp index 4484be9..663864d 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -134,11 +134,11 @@ void Config::read(const JSON &cfg) { source.smart_brackets = true; source.show_map = source_json.boolean("show_map", JSON::ParseOptions::accept_string); source.map_font_size = source_json.integer("map_font_size", JSON::ParseOptions::accept_string); - source.space_between_lines = source_json.integer("space_between_lines", JSON::ParseOptions::accept_string); source.show_git_diff = source_json.boolean("show_git_diff", JSON::ParseOptions::accept_string); source.show_background_pattern = source_json.boolean("show_background_pattern", JSON::ParseOptions::accept_string); source.show_right_margin = source_json.boolean("show_right_margin", JSON::ParseOptions::accept_string); source.right_margin_position = source_json.integer("right_margin_position", JSON::ParseOptions::accept_string); + source.pixels_between_lines = source_json.integer("pixels_between_lines", JSON::ParseOptions::accept_string); source.spellcheck_language = source_json.string("spellcheck_language"); auto default_tab_char_str = source_json.string("default_tab_char"); if(default_tab_char_str.size() == 1) @@ -280,11 +280,11 @@ std::string Config::default_config() { "smart_inserts": true, "show_map": true, "map_font_size": 1, - "space_between_lines": 1, "show_git_diff": true, "show_background_pattern": true, "show_right_margin": false, "right_margin_position": 80, + "pixels_between_lines": 0, "spellcheck_language_comment": "Use \"\" to set language from your locale settings", "spellcheck_language": "en_US", "auto_tab_char_and_size_comment": "Use false to always use default tab char and size", diff --git a/src/config.hpp b/src/config.hpp index 22e0115..ebc0e15 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -80,12 +80,12 @@ public: bool smart_inserts; bool show_map; - float space_between_lines; unsigned map_font_size; bool show_git_diff; bool show_background_pattern; bool show_right_margin; unsigned right_margin_position; + unsigned pixels_between_lines; bool auto_tab_char_and_size; char default_tab_char; diff --git a/src/source.cpp b/src/source.cpp index 83f978f..c7baeac 100644 --- a/src/source.cpp +++ b/src/source.cpp @@ -497,6 +497,8 @@ void Source::View::configure() { gtk_source_view_set_background_pattern(this->gobj(), GTK_SOURCE_BACKGROUND_PATTERN_TYPE_NONE); if((property_show_right_margin() = Config::get().source.show_right_margin)) property_right_margin_position() = Config::get().source.right_margin_position; + set_pixels_above_lines(Config::get().source.pixels_between_lines / 2); + set_pixels_below_lines(Config::get().source.pixels_between_lines / 2 + Config::get().source.pixels_between_lines % 2); // Create tags for diagnostic warnings and errors: auto scheme = get_source_buffer()->get_style_scheme(); diff --git a/src/source_base.cpp b/src/source_base.cpp index 00fb8be..0c152d4 100644 --- a/src/source_base.cpp +++ b/src/source_base.cpp @@ -383,8 +383,6 @@ Source::BaseView::BaseView(const boost::filesystem::path &file_path, const Glib: extra_cursor_selection = get_buffer()->create_tag(); - this->set_pixels_below_lines(Config::get().source.space_between_lines); - get_buffer()->signal_mark_set().connect([this](const Gtk::TextIter &iter, const Glib::RefPtr &mark) { if(mark->get_name() == "insert") { keep_clipboard = false; diff --git a/src/window.cpp b/src/window.cpp index 3ab2d8d..c443709 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -282,11 +282,8 @@ void Window::configure() { Menu::get().set_keys(); Terminal::get().configure(); Directories::get().update(); - if(auto view = Notebook::get().get_current_view()) { - // Special call since this property is not part of CSS - view->set_pixels_below_lines(Config::get().source.space_between_lines); + if(auto view = Notebook::get().get_current_view()) Notebook::get().update_status(view); - } } void Window::set_menu_actions() {