From 0bd8af430472f9e7097b07f5eaf8d586b8d251c6 Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Mon, 12 Dec 2016 12:27:56 +0100 Subject: [PATCH] Add the ability to deactivate extra theme dependant styling --- terminatorlib/config.py | 1 + terminatorlib/preferences.glade | 122 ++++++++++++++++++-------------- terminatorlib/prefseditor.py | 8 +++ terminatorlib/terminator.py | 2 +- 4 files changed, 79 insertions(+), 54 deletions(-) diff --git a/terminatorlib/config.py b/terminatorlib/config.py index 813c56b3..2a6b254d 100755 --- a/terminatorlib/config.py +++ b/terminatorlib/config.py @@ -94,6 +94,7 @@ DEFAULTS = { 'geometry_hinting' : False, 'window_state' : 'normal', 'borderless' : False, + 'extra_styling' : True, 'tab_position' : 'top', 'broadcast_default' : 'group', 'close_button_on_tab' : True, diff --git a/terminatorlib/preferences.glade b/terminatorlib/preferences.glade index 6a1533ad..159bb2d3 100644 --- a/terminatorlib/preferences.glade +++ b/terminatorlib/preferences.glade @@ -355,10 +355,8 @@ False - 6 + 5 Terminator Preferences - 640 - 400 normal @@ -849,6 +847,36 @@ False 6 12 + + + Window borders + False + True + True + False + 0.5 + True + True + + + + 0 + 3 + 3 + + + + + True + False + Unfocused terminal font brightness: + 0 + + + 0 + 2 + + True @@ -858,23 +886,7 @@ 0 - 0 - - - - - True - False - -1 - right - 5 - 5 - 1 - 1 - - - 1 - 0 + 1 @@ -893,34 +905,6 @@ 2 - 0 - - - - - True - False - Unfocused terminal font brightness: - 0 - - - 0 - 1 - - - - - True - False - 100% - right - 5 - 5 - 1 - 1 - - - 1 1 @@ -940,24 +924,56 @@ 2 + 2 + + + + + True + False + -1 + right + 5 + 5 + 1 + 1 + + + 1 1 - - Window borders + + True + False + 100% + right + 5 + 5 + 1 + 1 + + + 1 + 2 + + + + + Extra Styling (Theme dependant) False True True False - 0.5 + 0 True True - + 0 - 2 + 0 3 diff --git a/terminatorlib/prefseditor.py b/terminatorlib/prefseditor.py index 736b17e7..85b5c60e 100755 --- a/terminatorlib/prefseditor.py +++ b/terminatorlib/prefseditor.py @@ -254,6 +254,9 @@ class PrefsEditor: # Window borders widget = guiget('winbordercheck') widget.set_active(not self.config['borderless']) + # Extra styling + widget = guiget('extrastylingcheck') + widget.set_active(self.config['extra_styling']) # Tab bar position option = self.config['tab_position'] widget = guiget('tabposcombo') @@ -692,6 +695,11 @@ class PrefsEditor: self.config['borderless'] = not widget.get_active() self.config.save() + def on_extrastylingcheck_toggled(self, widget): + """Extra styling setting changed""" + self.config['extra_styling'] = widget.get_active() + self.config.save() + def on_hidefromtaskbcheck_toggled(self, widget): """Hide from taskbar setting changed""" self.config['hide_from_taskbar'] = widget.get_active() diff --git a/terminatorlib/terminator.py b/terminatorlib/terminator.py index 2adcb863..977d8603 100755 --- a/terminatorlib/terminator.py +++ b/terminatorlib/terminator.py @@ -467,7 +467,7 @@ class Terminator(Borg): theme_name = self.gtk_settings.get_property('gtk-theme-name') theme_part_list = ['terminator.css'] - if 1: # checkbox_style - needs adding to prefs + if self.config['extra_styling']: # 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]: