New button style more closely follows GNOME HIG
This commit is contained in:
@@ -27,12 +27,12 @@ public class MainWindow
|
||||
}
|
||||
shortcutsGroup = group;
|
||||
|
||||
var addButton = builder.GetObject("add_shortcut_button") as ButtonRow;
|
||||
var addButton = builder.GetObject("add_shortcut_button") as Gtk.Button;
|
||||
if (addButton == null)
|
||||
{
|
||||
throw new Exception("Failed to load UI element with ID: add_shortcut_button");
|
||||
}
|
||||
addButton.OnActivated += OnAddShortcutClicked;
|
||||
addButton.OnClicked += OnAddShortcutClicked;
|
||||
|
||||
// Initialize the observable collection with property binding
|
||||
shortcuts = new PasswordStoreShortcutCollection(shortcutsGroup);
|
||||
|
||||
@@ -26,7 +26,17 @@
|
||||
<property name="child">
|
||||
<object class="AdwToolbarView">
|
||||
<child type="top">
|
||||
<object class="AdwHeaderBar" />
|
||||
<object class="AdwHeaderBar">
|
||||
<child type="start">
|
||||
<object class="GtkButton" id="add_shortcut_button">
|
||||
<property name="icon-name">list-add-symbolic</property>
|
||||
<property name="valign">center</property>
|
||||
<style>
|
||||
<class name="flat" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<property name="content">
|
||||
<object class="AdwPreferencesPage">
|
||||
@@ -35,17 +45,6 @@
|
||||
<!-- Dynamic rows will be added here via model binding -->
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="AdwPreferencesGroup">
|
||||
<child>
|
||||
<object class="AdwButtonRow" id="add_shortcut_button">
|
||||
<property name="start-icon-name">list-add-symbolic</property>
|
||||
<property name="title" translatable="yes" context="button" comments="Verb. This button allows the user to add additional password collections.">Add</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
Reference in New Issue
Block a user