Move request/response tab switchers to bottom of panels
This commit is contained in:
parent
a6c389edd7
commit
38242f5c95
@ -149,8 +149,8 @@ class RequestTabWidget(Gtk.Box):
|
||||
request_switcher.set_margin_top(8)
|
||||
request_switcher.set_margin_bottom(8)
|
||||
|
||||
request_box.append(request_switcher)
|
||||
request_box.append(self.request_stack)
|
||||
request_box.append(request_switcher)
|
||||
|
||||
# Headers tab
|
||||
self._build_headers_tab()
|
||||
@ -166,12 +166,10 @@ class RequestTabWidget(Gtk.Box):
|
||||
# Response Panel
|
||||
response_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
||||
|
||||
# Stack switcher at the top
|
||||
# Stack switcher (placed in bottom bar together with status info)
|
||||
response_switcher = Gtk.StackSwitcher()
|
||||
response_switcher.set_halign(Gtk.Align.CENTER)
|
||||
response_switcher.set_margin_top(8)
|
||||
response_switcher.set_margin_bottom(8)
|
||||
response_box.append(response_switcher)
|
||||
response_switcher.set_halign(Gtk.Align.START)
|
||||
response_switcher.set_valign(Gtk.Align.CENTER)
|
||||
|
||||
# Create a vertical paned for response stack and result panels
|
||||
self.response_main_paned = Gtk.Paned(orientation=Gtk.Orientation.VERTICAL)
|
||||
@ -358,13 +356,20 @@ class RequestTabWidget(Gtk.Box):
|
||||
# Add the main paned to response_box
|
||||
response_box.append(self.response_main_paned)
|
||||
|
||||
# Status Bar
|
||||
status_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=12)
|
||||
status_box.set_margin_start(12)
|
||||
status_box.set_margin_end(12)
|
||||
status_box.set_margin_top(6)
|
||||
status_box.set_margin_bottom(6)
|
||||
# Bottom bar: response tabs (left) + status info (right)
|
||||
bottom_bar = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=0)
|
||||
bottom_bar.set_margin_start(6)
|
||||
bottom_bar.set_margin_end(12)
|
||||
bottom_bar.set_margin_top(4)
|
||||
bottom_bar.set_margin_bottom(4)
|
||||
|
||||
bottom_bar.append(response_switcher)
|
||||
|
||||
spacer = Gtk.Box()
|
||||
spacer.set_hexpand(True)
|
||||
bottom_bar.append(spacer)
|
||||
|
||||
status_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=12)
|
||||
self.status_label = Gtk.Label(label="Ready")
|
||||
self.status_label.add_css_class("heading")
|
||||
status_box.append(self.status_label)
|
||||
@ -375,12 +380,9 @@ class RequestTabWidget(Gtk.Box):
|
||||
self.size_label = Gtk.Label(label="")
|
||||
status_box.append(self.size_label)
|
||||
|
||||
# Spacer
|
||||
spacer = Gtk.Box()
|
||||
spacer.set_hexpand(True)
|
||||
status_box.append(spacer)
|
||||
bottom_bar.append(status_box)
|
||||
|
||||
response_box.append(status_box)
|
||||
response_box.append(bottom_bar)
|
||||
|
||||
split_pane.set_end_child(response_box)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user