Fix GTK assertion error - set min/max heights in correct order
This commit is contained in:
parent
0c139d2a3b
commit
95175cb01d
@ -134,12 +134,14 @@ class HistoryItem(Gtk.Box):
|
||||
|
||||
if self.request_expanded:
|
||||
# Expand to show full scrollable content
|
||||
self.request_body_scroll.set_min_content_height(300)
|
||||
# Set max first, then min to avoid assertion errors
|
||||
self.request_body_scroll.set_max_content_height(300)
|
||||
self.request_body_scroll.set_min_content_height(300)
|
||||
self.request_expander_label.set_text("Collapse request")
|
||||
print("DEBUG: Expanded request to 300px")
|
||||
else:
|
||||
# Collapse to show only few lines
|
||||
# Set min first, then max to avoid assertion errors
|
||||
self.request_body_scroll.set_min_content_height(60)
|
||||
self.request_body_scroll.set_max_content_height(60)
|
||||
self.request_expander_label.set_text("Show full request")
|
||||
@ -155,12 +157,14 @@ class HistoryItem(Gtk.Box):
|
||||
|
||||
if self.response_expanded:
|
||||
# Expand to show full scrollable content
|
||||
self.response_body_scroll.set_min_content_height(300)
|
||||
# Set max first, then min to avoid assertion errors
|
||||
self.response_body_scroll.set_max_content_height(300)
|
||||
self.response_body_scroll.set_min_content_height(300)
|
||||
self.response_expander_label.set_text("Collapse response")
|
||||
print("DEBUG: Expanded response to 300px")
|
||||
else:
|
||||
# Collapse to show only few lines
|
||||
# Set min first, then max to avoid assertion errors
|
||||
self.response_body_scroll.set_min_content_height(60)
|
||||
self.response_body_scroll.set_max_content_height(60)
|
||||
self.response_expander_label.set_text("Show full response")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user