Skip to content
Snippets Groups Projects
Commit c7fa39ca authored by nkour's avatar nkour
Browse files

resize the history window on expander expanded and reset it to original size when if we dis-expand

parent ae50c294
No related branches found
No related tags found
No related merge requests found
......@@ -275,7 +275,14 @@ class HistoryWindow:
the True/False thingy depending if it's expanded or not
this function is called in a timeout just after expanded state changes'''
parent = widget.get_parent() # vbox
parent.child_set_property(widget, 'expand', widget.get_expanded())
expanded = widget.get_expanded()
w, h = self.window.get_size()
if expanded: # resize to larger in height the window
self.window.resize(w, int(h*1.3))
else: # resize to smaller in height the window
self.window.resize(w, int(h/1.3))
# now set expand so if manually resizing scrolledwindow resizes too
parent.child_set_property(widget, 'expand', expanded)
def on_search_expander_activate(self, widget):
if widget.get_expanded(): # it's the OPPOSITE!, it's not expanded
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment