Replace send button text with play icon
This commit is contained in:
parent
1a526f2f6b
commit
a62c37f5f2
@ -66,20 +66,6 @@
|
|||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</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>
|
</object>
|
||||||
</property>
|
</property>
|
||||||
</object>
|
</object>
|
||||||
@ -96,6 +82,18 @@
|
|||||||
<property name="show-start-title-buttons">False</property>
|
<property name="show-start-title-buttons">False</property>
|
||||||
<property name="show-end-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 -->
|
<!-- Right side buttons -->
|
||||||
<child type="end">
|
<child type="end">
|
||||||
<object class="GtkBox">
|
<object class="GtkBox">
|
||||||
|
|||||||
@ -96,7 +96,8 @@ class RequestTabWidget(Gtk.Box):
|
|||||||
self.url_box.append(self.url_entry)
|
self.url_box.append(self.url_entry)
|
||||||
|
|
||||||
# Send Button
|
# 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.send_button.add_css_class("suggested-action")
|
||||||
self.url_box.append(self.send_button)
|
self.url_box.append(self.send_button)
|
||||||
|
|
||||||
|
|||||||
@ -40,6 +40,7 @@ class RosterWindow(Adw.ApplicationWindow):
|
|||||||
__gtype_name__ = 'RosterWindow'
|
__gtype_name__ = 'RosterWindow'
|
||||||
|
|
||||||
# Top bar widgets
|
# Top bar widgets
|
||||||
|
save_request_button = Gtk.Template.Child()
|
||||||
new_request_button = Gtk.Template.Child()
|
new_request_button = Gtk.Template.Child()
|
||||||
tab_view = Gtk.Template.Child()
|
tab_view = Gtk.Template.Child()
|
||||||
tab_bar = Gtk.Template.Child()
|
tab_bar = Gtk.Template.Child()
|
||||||
@ -50,7 +51,6 @@ class RosterWindow(Adw.ApplicationWindow):
|
|||||||
# Sidebar widgets
|
# Sidebar widgets
|
||||||
projects_listbox = Gtk.Template.Child()
|
projects_listbox = Gtk.Template.Child()
|
||||||
add_project_button = Gtk.Template.Child()
|
add_project_button = Gtk.Template.Child()
|
||||||
save_request_button = Gtk.Template.Child()
|
|
||||||
|
|
||||||
# History (hidden but kept for compatibility)
|
# History (hidden but kept for compatibility)
|
||||||
history_listbox = Gtk.Template.Child()
|
history_listbox = Gtk.Template.Child()
|
||||||
@ -425,14 +425,12 @@ class RosterWindow(Adw.ApplicationWindow):
|
|||||||
|
|
||||||
# Disable send button during request
|
# Disable send button during request
|
||||||
widget.send_button.set_sensitive(False)
|
widget.send_button.set_sensitive(False)
|
||||||
widget.send_button.set_label("Sending...")
|
|
||||||
|
|
||||||
# Execute async
|
# Execute async
|
||||||
def callback(response, error, user_data):
|
def callback(response, error, user_data):
|
||||||
"""Callback runs on main thread."""
|
"""Callback runs on main thread."""
|
||||||
# Re-enable send button
|
# Re-enable send button
|
||||||
widget.send_button.set_sensitive(True)
|
widget.send_button.set_sensitive(True)
|
||||||
widget.send_button.set_label("Send")
|
|
||||||
|
|
||||||
# Update tab with response
|
# Update tab with response
|
||||||
if response:
|
if response:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user