Fix narrow-window layout: response panel stays, request shrinks, send button always visible

This commit is contained in:
Pavel Baksy 2026-05-20 23:35:34 +02:00
parent b620016397
commit 1af59b3539
2 changed files with 11 additions and 4 deletions

View File

@ -115,6 +115,7 @@ class RequestTabWidget(Gtk.Box):
self.url_entry = Gtk.Entry()
self.url_entry.set_placeholder_text("Enter URL...")
self.url_entry.set_hexpand(True)
self.url_entry.add_css_class("url-entry")
self.url_box.append(self.url_entry)
# Send Button
@ -131,10 +132,10 @@ class RequestTabWidget(Gtk.Box):
split_pane = Gtk.Paned(orientation=Gtk.Orientation.HORIZONTAL)
split_pane.set_vexpand(True)
split_pane.set_position(UI_PANE_REQUEST_RESPONSE_POSITION)
split_pane.set_shrink_start_child(False)
split_pane.set_shrink_end_child(False)
split_pane.set_resize_start_child(True)
split_pane.set_resize_end_child(True)
split_pane.set_shrink_start_child(True) # request can collapse to 0
split_pane.set_shrink_end_child(False) # response stays
split_pane.set_resize_start_child(True) # request gives up space first
split_pane.set_resize_end_child(False) # response keeps its size
# Request Panel
request_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
@ -165,6 +166,7 @@ class RequestTabWidget(Gtk.Box):
# Response Panel
response_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
response_box.set_size_request(250, -1)
# Stack switcher (placed in bottom bar together with status info)
response_switcher = Gtk.StackSwitcher()

View File

@ -213,6 +213,11 @@ class RosterWindow(Adw.ApplicationWindow):
font-weight: 600;
}
/* URL entry can shrink to near-zero so the Send button stays visible */
entry.url-entry {
min-width: 0;
}
/* Method chips in sidebar request list */
.method-chip {
border-radius: 4px;