From 871c3cd90b8594d743e15ce86b1442b4d80c0bc2 Mon Sep 17 00:00:00 2001 From: Pavel Baksy Date: Thu, 18 Dec 2025 16:58:43 +0100 Subject: [PATCH] Replace collapsible history panel with resizable vertical pane --- src/main-window.ui | 53 ++++++++++++++++------------------------------ src/window.py | 34 +---------------------------- 2 files changed, 19 insertions(+), 68 deletions(-) diff --git a/src/main-window.ui b/src/main-window.ui index 328e34f..9769c0f 100644 --- a/src/main-window.ui +++ b/src/main-window.ui @@ -72,10 +72,21 @@ - + - + + vertical True + 600 + False + True + True + True + + + + + horizontal 250 False @@ -220,15 +231,6 @@ True - - - - - view-list-symbolic - Toggle History Panel - - - @@ -236,18 +238,12 @@ - + - - - - False - slide-up - - + + vertical - 200 @@ -268,14 +264,6 @@ - - - - go-down-symbolic - Hide history - - - @@ -283,6 +271,7 @@ True + 150 @@ -294,7 +283,7 @@ - + @@ -304,12 +293,6 @@ -
- - Toggle History - win.toggle-history - -
_Preferences diff --git a/src/window.py b/src/window.py index 97d8a34..cf14ad1 100644 --- a/src/window.py +++ b/src/window.py @@ -55,12 +55,9 @@ class RosterWindow(Adw.ApplicationWindow): # Status bar status_label = Gtk.Template.Child() time_label = Gtk.Template.Child() - history_toggle_button = Gtk.Template.Child() # History - history_revealer = Gtk.Template.Child() history_listbox = Gtk.Template.Child() - hide_history_button = Gtk.Template.Child() def __init__(self, **kwargs): super().__init__(**kwargs) @@ -100,9 +97,7 @@ class RosterWindow(Adw.ApplicationWindow): def _create_actions(self): """Create window-level actions.""" - action = Gio.SimpleAction.new("toggle-history", None) - action.connect("activate", self.on_toggle_history) - self.add_action(action) + pass def _setup_method_dropdown(self): """Populate HTTP method dropdown.""" @@ -409,33 +404,6 @@ class RosterWindow(Adw.ApplicationWindow): self._show_toast("Request loaded from history") - @Gtk.Template.Callback() - def on_toggle_history(self, *args): - """Toggle history panel visibility (from menu).""" - current = self.history_revealer.get_reveal_child() - self.history_revealer.set_reveal_child(not current) - - # Update toggle button state - self.history_toggle_button.set_active(not current) - - # Update hide button icon - if not current: - self.hide_history_button.set_icon_name("go-down-symbolic") - else: - self.hide_history_button.set_icon_name("go-up-symbolic") - - @Gtk.Template.Callback() - def on_history_toggle_button_toggled(self, button): - """Toggle history panel from bottom button.""" - active = button.get_active() - self.history_revealer.set_reveal_child(active) - - # Update hide button icon - if active: - self.hide_history_button.set_icon_name("go-down-symbolic") - else: - self.hide_history_button.set_icon_name("go-up-symbolic") - def _show_toast(self, message): """Show a toast notification.""" toast = Adw.Toast()