Fix narrow mode: sync stack visible child to button state on re-entry

This commit is contained in:
Pavel Baksy 2026-05-21 21:10:51 +02:00
parent e25e5db846
commit 50e3725686

View File

@ -429,6 +429,14 @@ class RequestTabWidget(Gtk.Box):
self.narrow_stack.add_named(self.request_panel, "request")
self.narrow_stack.add_named(self.response_panel, "response")
# Sync stack visible child to match current button state
# (button state persists across wide↔narrow transitions)
if self.narrow_response_btn.get_active():
self.narrow_stack.set_visible_child_name("response")
else:
self.narrow_stack.set_visible_child_name("request")
self.append(self.narrow_box)
else:
self.narrow_stack.remove(self.request_panel)