mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 14:42:54 +01:00
chore: add comments
This commit is contained in:
1 parent
fbc500066f
commit
c254de2aec
1 file changed
+9
-7
+9
-7
@@ -172,10 +172,11 @@ status_tooltip = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def relative_widget(child):
|
def relative_widget(child):
|
||||||
# get target widget relative to source widget
|
# returns collection of outer widgets relative to source widget
|
||||||
# chiefly used for transient modals and parent member functions
|
# chiefly used for transient modals and accessing non-adjacent widget methods
|
||||||
# when calling non-adjacent widgets
|
# positions are always relative to grid sub-children
|
||||||
# positions are relative to grid members
|
# containers and nested buttons should never need to call this function directly
|
||||||
|
|
||||||
grid = child.get_parent().get_parent()
|
grid = child.get_parent().get_parent()
|
||||||
treeview = grid.scrollable_treelist.treeview
|
treeview = grid.scrollable_treelist.treeview
|
||||||
outer = grid.get_parent()
|
outer = grid.get_parent()
|
||||||
@@ -187,9 +188,9 @@ def relative_widget(child):
|
|||||||
}
|
}
|
||||||
|
|
||||||
supported = [
|
supported = [
|
||||||
"ModSelectionPanel",
|
"ModSelectionPanel", # Grid < RightPanel < ModSelectionPanel
|
||||||
"ButtonBox",
|
"ButtonBox", # Grid < RightPanel < ButtonBox
|
||||||
"TreeView"
|
"TreeView" # Grid < ScrollableTree < TreeView
|
||||||
]
|
]
|
||||||
|
|
||||||
if child.__class__.__name__ not in supported:
|
if child.__class__.__name__ not in supported:
|
||||||
@@ -590,6 +591,7 @@ class ButtonBox(Gtk.Box):
|
|||||||
button.set_size_request(10, 10)
|
button.set_size_request(10, 10)
|
||||||
else:
|
else:
|
||||||
button.set_size_request(50,50)
|
button.set_size_request(50,50)
|
||||||
|
#TODO: explore a more intuitive way of highlighting the active context
|
||||||
button.set_opacity(0.6)
|
button.set_opacity(0.6)
|
||||||
self.buttons.append(button)
|
self.buttons.append(button)
|
||||||
button.connect("clicked", self._on_selection_button_clicked)
|
button.connect("clicked", self._on_selection_button_clicked)
|
||||||
|
|||||||
Reference in new issue
Block a user