Replace send button text with play icon

This commit is contained in:
Pavel Baksy 2025-12-30 23:32:41 +01:00
parent 1a526f2f6b
commit a62c37f5f2
3 changed files with 15 additions and 18 deletions

View File

@ -66,20 +66,6 @@
</child>
</object>
</child>
<!-- Save Current Request Button -->
<child>
<object class="GtkButton" id="save_request_button">
<property name="label">Save Current Request</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<property name="margin-bottom">12</property>
<signal name="clicked" handler="on_save_request_clicked"/>
<style>
<class name="suggested-action"/>
</style>
</object>
</child>
</object>
</property>
</object>
@ -96,6 +82,18 @@
<property name="show-start-title-buttons">False</property>
<property name="show-end-title-buttons">False</property>
<!-- Left side buttons -->
<child type="start">
<object class="GtkButton" id="save_request_button">
<property name="icon-name">document-save-symbolic</property>
<property name="tooltip-text">Save Current Request (Ctrl+S)</property>
<signal name="clicked" handler="on_save_request_clicked"/>
<style>
<class name="flat"/>
</style>
</object>
</child>
<!-- Right side buttons -->
<child type="end">
<object class="GtkBox">

View File

@ -96,7 +96,8 @@ class RequestTabWidget(Gtk.Box):
self.url_box.append(self.url_entry)
# Send Button
self.send_button = Gtk.Button(label="Send")
self.send_button = Gtk.Button(icon_name="media-playback-start-symbolic")
self.send_button.set_tooltip_text("Send Request")
self.send_button.add_css_class("suggested-action")
self.url_box.append(self.send_button)

View File

@ -40,6 +40,7 @@ class RosterWindow(Adw.ApplicationWindow):
__gtype_name__ = 'RosterWindow'
# Top bar widgets
save_request_button = Gtk.Template.Child()
new_request_button = Gtk.Template.Child()
tab_view = Gtk.Template.Child()
tab_bar = Gtk.Template.Child()
@ -50,7 +51,6 @@ class RosterWindow(Adw.ApplicationWindow):
# Sidebar widgets
projects_listbox = Gtk.Template.Child()
add_project_button = Gtk.Template.Child()
save_request_button = Gtk.Template.Child()
# History (hidden but kept for compatibility)
history_listbox = Gtk.Template.Child()
@ -425,14 +425,12 @@ class RosterWindow(Adw.ApplicationWindow):
# Disable send button during request
widget.send_button.set_sensitive(False)
widget.send_button.set_label("Sending...")
# Execute async
def callback(response, error, user_data):
"""Callback runs on main thread."""
# Re-enable send button
widget.send_button.set_sensitive(True)
widget.send_button.set_label("Send")
# Update tab with response
if response: