From a3e1cf8a37a87690bda623c5c1bacb8d9ad075f2 Mon Sep 17 00:00:00 2001 From: itdominator <1itdominator@gmail.com> Date: Mon, 6 Dec 2021 19:38:59 -0600 Subject: [PATCH] Style changes; startup select defaulting changes; cleanup --- .../SolarFM/new/solarfm/__init__.py | 2 +- .../solarfm/signal_classes/mixins/TabMixin.py | 2 ++ .../signal_classes/mixins/WindowMixin.py | 26 ++++++++++++----- user_config/solarfm/stylesheet.css | 29 +++++++++++++------ 4 files changed, 42 insertions(+), 17 deletions(-) diff --git a/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/__init__.py b/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/__init__.py index 14e08ac..e7aa1ca 100644 --- a/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/__init__.py +++ b/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/__init__.py @@ -44,6 +44,6 @@ class Main(Builtins): methods = inspect.getmembers(c, predicate=inspect.ismethod) handlers.update(methods) except Exception as e: - pass + print(repr(e)) settings.builder.connect_signals(handlers) diff --git a/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/mixins/TabMixin.py b/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/mixins/TabMixin.py index 5d61a18..5e30425 100644 --- a/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/mixins/TabMixin.py +++ b/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/mixins/TabMixin.py @@ -46,6 +46,8 @@ class TabMixin(WidgetMixin): notebook.show_all() notebook.set_current_page(index) + ctx = notebook.get_style_context() + ctx.add_class("notebook-unselected-focus") notebook.set_tab_reorderable(scroll, True) self.load_store(view, store) self.set_window_title() diff --git a/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/mixins/WindowMixin.py b/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/mixins/WindowMixin.py index 79e9ecd..139d473 100644 --- a/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/mixins/WindowMixin.py +++ b/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/mixins/WindowMixin.py @@ -23,13 +23,26 @@ class WindowMixin(TabMixin): object = self.builder.get_object(f"tggl_notebook_{i}") views = value[0]["window"]["views"] self.window_controller.create_window() - object.set_active(True) for view in views: self.create_new_view_notebook(None, i, view) if isHidden: self.toggle_notebook_pane(object) + + if not self.is_pane4_hidden: + widget = self.window4.get_children()[1].get_children()[0] + widget.event(Gdk.Event().new(type=Gdk.EventType.BUTTON_RELEASE)) + elif not self.is_pane3_hidden: + widget = self.window3.get_children()[1].get_children()[0] + widget.event(Gdk.Event().new(type=Gdk.EventType.BUTTON_RELEASE)) + elif not self.is_pane2_hidden: + widget = self.window2.get_children()[1].get_children()[0] + widget.event(Gdk.Event().new(type=Gdk.EventType.BUTTON_RELEASE)) + elif not self.is_pane1_hidden: + widget = self.window1.get_children()[1].get_children()[0] + widget.event(Gdk.Event().new(type=Gdk.EventType.BUTTON_RELEASE)) + else: for j in range(0, 4): i = j + 1 @@ -81,8 +94,10 @@ class WindowMixin(TabMixin): for _notebook in self.notebooks: ctx = _notebook.get_style_context() ctx.remove_class("notebook-selected-focus") + ctx.add_class("notebook-unselected-focus") ctx = notebook.get_style_context() + ctx.remove_class("notebook-unselected-focus") ctx.add_class("notebook-selected-focus") self.window.set_title("SolarFM ~ " + dir) @@ -122,13 +137,10 @@ class WindowMixin(TabMixin): self.execute_files() return - wid, tid = self.window_controller.get_active_data() - notebook = self.builder.get_object(f"window_{wid}") - path_entry = self.builder.get_object(f"path_entry") - tab_label = self.get_tab_label(notebook, iconview) - view = self.get_fm_window(wid).get_view_by_id(tid) - store = iconview.get_model() + wid, tid, view, _iconview, store = self.get_current_state() + notebook = self.builder.get_object(f"window_{wid}") + tab_label = self.get_tab_label(notebook, iconview) fileName = store[item][1] dir = view.get_current_directory() diff --git a/user_config/solarfm/stylesheet.css b/user_config/solarfm/stylesheet.css index cc42a9a..4c11309 100644 --- a/user_config/solarfm/stylesheet.css +++ b/user_config/solarfm/stylesheet.css @@ -25,17 +25,9 @@ notebook > header > tabs > tab:checked { font: 16px "Monospace"; } -.notebook-selected-focus { - /* Neon Blue 00e8ff border */ - border: 2px solid rgba(0, 232, 255, 0.25); - /* Dark Bergundy */ - /* border: 2px solid rgba(116, 0, 0, 0.64); */ -} - - .view:selected, .view:selected:hover { - box-shadow: inset 0 0 0 9999px rgba(21, 158, 167, 0.57); + box-shadow: inset 0 0 0 9999px rgba(21, 158, 167, 0.34); color: rgba(255, 255, 255, 0.5); } @@ -43,6 +35,25 @@ notebook > header > tabs > tab:checked { border: 2px solid rgba(116, 0, 0, 0.64); } +.notebook-selected-focus { + /* Neon Blue 00e8ff border */ + border: 2px solid rgba(0, 232, 255, 0.34); + /* Dark Bergundy */ + /* border: 2px solid rgba(116, 0, 0, 0.64); */ +} + +.notebook-unselected-focus { + /* Neon Blue 00e8ff border */ + /* border: 2px solid rgba(0, 232, 255, 0.25); */ + /* Dark Bergundy */ + /* border: 2px solid rgba(116, 0, 0, 0.64); */ + /* Snow White */ + border: 2px solid rgba(255, 255, 255, 0.24); +} + + + + /* * { background: rgba(0, 0, 0, 0.14);