From f03cdd007f9a9f1a899318710cf1d5f98871b80e Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Sat, 10 Dec 2016 16:35:25 +0100 Subject: [PATCH] A little more organization, separating into theme fixes that must be applied to correct rendering, and theme styling changes that may or may not be desired. Still needs config option. --- terminatorlib/terminator.py | 26 +++++++++++-------- .../Adwaita/gtk-3.0/apps/terminator.css | 3 ++- ...{terminator.css => terminator_styling.css} | 0 ...{terminator.css => terminator_styling.css} | 0 .../Raleigh/gtk-3.0/apps/terminator.css | 1 + 5 files changed, 18 insertions(+), 12 deletions(-) rename terminatorlib/themes/Ambiance/gtk-3.0/apps/{terminator.css => terminator_styling.css} (100%) rename terminatorlib/themes/Radiance/gtk-3.0/apps/{terminator.css => terminator_styling.css} (100%) diff --git a/terminatorlib/terminator.py b/terminatorlib/terminator.py index 44fc6940..2fc045a3 100755 --- a/terminatorlib/terminator.py +++ b/terminatorlib/terminator.py @@ -415,17 +415,21 @@ class Terminator(Borg): settings=Gtk.Settings().get_default() theme_name = settings.get_property('gtk-theme_name') - for theme_dir in [usr_theme_dir, app_theme_dir]: - path_to_theme_specific_css = os.path.join(theme_dir, - theme_name, - 'gtk-3.0/apps', - 'terminator.css') - if os.path.isfile(path_to_theme_specific_css): - print path_to_theme_specific_css, os.path.isfile(path_to_theme_specific_css) - style_provider = Gtk.CssProvider() - style_provider.load_from_path(path_to_theme_specific_css) - self.style_providers.append(style_provider) - break + + theme_part_list = ['terminator.css'] + if 1: # checkbox_style - needs adding to prefs + theme_part_list.append('terminator_styling.css') + for theme_part_file in theme_part_list: + for theme_dir in [usr_theme_dir, app_theme_dir]: + path_to_theme_specific_css = os.path.join(theme_dir, + theme_name, + 'gtk-3.0/apps', + theme_part_file) + if os.path.isfile(path_to_theme_specific_css): + style_provider = Gtk.CssProvider() + style_provider.load_from_path(path_to_theme_specific_css) + self.style_providers.append(style_provider) + break # Size the GtkPaned splitter handle size. if self.config['handle_size'] in xrange(0, 21): diff --git a/terminatorlib/themes/Adwaita/gtk-3.0/apps/terminator.css b/terminatorlib/themes/Adwaita/gtk-3.0/apps/terminator.css index c47de344..faaf58ab 100644 --- a/terminatorlib/themes/Adwaita/gtk-3.0/apps/terminator.css +++ b/terminatorlib/themes/Adwaita/gtk-3.0/apps/terminator.css @@ -1,4 +1,5 @@ -GtkPaned { +/* Fixes oversized hover area preventing selecting characters. */ +.terminator-terminal-window GtkPaned { margin: 0 0 0 0; padding: 0 0 0 0; } diff --git a/terminatorlib/themes/Ambiance/gtk-3.0/apps/terminator.css b/terminatorlib/themes/Ambiance/gtk-3.0/apps/terminator_styling.css similarity index 100% rename from terminatorlib/themes/Ambiance/gtk-3.0/apps/terminator.css rename to terminatorlib/themes/Ambiance/gtk-3.0/apps/terminator_styling.css diff --git a/terminatorlib/themes/Radiance/gtk-3.0/apps/terminator.css b/terminatorlib/themes/Radiance/gtk-3.0/apps/terminator_styling.css similarity index 100% rename from terminatorlib/themes/Radiance/gtk-3.0/apps/terminator.css rename to terminatorlib/themes/Radiance/gtk-3.0/apps/terminator_styling.css diff --git a/terminatorlib/themes/Raleigh/gtk-3.0/apps/terminator.css b/terminatorlib/themes/Raleigh/gtk-3.0/apps/terminator.css index 24f86de1..880a541c 100644 --- a/terminatorlib/themes/Raleigh/gtk-3.0/apps/terminator.css +++ b/terminatorlib/themes/Raleigh/gtk-3.0/apps/terminator.css @@ -1,3 +1,4 @@ +/* Raleigh is so old, it doesn't use the correct public colours */ .terminator-terminal-window { background-color: alpha(@bg_color,0); }