From 98feeabfa44524bf52524c52a1eaf6aead387298 Mon Sep 17 00:00:00 2001 From: itdominator <1itdominator@gmail.com> Date: Sun, 28 Nov 2021 15:16:21 -0600 Subject: [PATCH] Improved visual que of which notebook is active --- .../PyFM/new/pyfm/resources/stylesheet.css | 8 ++++++++ .../new/pyfm/signal_classes/mixins/WindowMixin.py | 15 +++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/versions/pyfm-0.0.1/PyFM/new/pyfm/resources/stylesheet.css b/src/versions/pyfm-0.0.1/PyFM/new/pyfm/resources/stylesheet.css index 9f1bc35..44b70dc 100644 --- a/src/versions/pyfm-0.0.1/PyFM/new/pyfm/resources/stylesheet.css +++ b/src/versions/pyfm-0.0.1/PyFM/new/pyfm/resources/stylesheet.css @@ -17,6 +17,7 @@ notebook > header > tabs > tab:checked { background-color: rgba(0, 232, 255, 0.25); /* Dark Bergundy */ /* background-color: rgba(116, 0, 0, 0.25); */ + color: rgba(255, 255, 255, 0.5); } @@ -24,6 +25,13 @@ 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 { diff --git a/src/versions/pyfm-0.0.1/PyFM/new/pyfm/signal_classes/mixins/WindowMixin.py b/src/versions/pyfm-0.0.1/PyFM/new/pyfm/signal_classes/mixins/WindowMixin.py index f76fe3f..2441b46 100644 --- a/src/versions/pyfm-0.0.1/PyFM/new/pyfm/signal_classes/mixins/WindowMixin.py +++ b/src/versions/pyfm-0.0.1/PyFM/new/pyfm/signal_classes/mixins/WindowMixin.py @@ -3,14 +3,12 @@ import copy from os.path import isdir, isfile -# Lib imports -from . import TabMixin - +# Gtk imports import gi - from gi.repository import Gdk # Application imports +from . import TabMixin from . import WidgetMixin @@ -54,8 +52,17 @@ class WindowMixin(TabMixin): def set_window_title(self): wid, tid = self.window_controller.get_active_data() + notebook = self.builder.get_object(f"window_{wid}") view = self.get_fm_window(wid).get_view_by_id(tid) dir = view.get_current_directory() + + for _notebook in self.notebooks: + ctx = _notebook.get_style_context() + ctx.remove_class("notebook-selected-focus") + + ctx = notebook.get_style_context() + ctx.add_class("notebook-selected-focus") + self.window.set_title("PyFM ~ " + dir) self.set_bottom_labels(view)