Improved visual que of which notebook is active

This commit is contained in:
itdominator 2021-11-28 15:16:21 -06:00
parent 27ceca4e75
commit 98feeabfa4
2 changed files with 19 additions and 4 deletions

View File

@ -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 {

View File

@ -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)