Style changes; startup select defaulting changes; cleanup

This commit is contained in:
itdominator 2021-12-06 19:38:59 -06:00
parent 5c0dcd02e2
commit a3e1cf8a37
4 changed files with 42 additions and 17 deletions

View File

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

View File

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

View File

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

View File

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