New button style more closely follows GNOME HIG
This commit is contained in:
@@ -27,12 +27,12 @@ public class MainWindow
|
|||||||
}
|
}
|
||||||
shortcutsGroup = group;
|
shortcutsGroup = group;
|
||||||
|
|
||||||
var addButton = builder.GetObject("add_shortcut_button") as ButtonRow;
|
var addButton = builder.GetObject("add_shortcut_button") as Gtk.Button;
|
||||||
if (addButton == null)
|
if (addButton == null)
|
||||||
{
|
{
|
||||||
throw new Exception("Failed to load UI element with ID: add_shortcut_button");
|
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
|
// Initialize the observable collection with property binding
|
||||||
shortcuts = new PasswordStoreShortcutCollection(shortcutsGroup);
|
shortcuts = new PasswordStoreShortcutCollection(shortcutsGroup);
|
||||||
|
|||||||
@@ -26,7 +26,17 @@
|
|||||||
<property name="child">
|
<property name="child">
|
||||||
<object class="AdwToolbarView">
|
<object class="AdwToolbarView">
|
||||||
<child type="top">
|
<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>
|
</child>
|
||||||
<property name="content">
|
<property name="content">
|
||||||
<object class="AdwPreferencesPage">
|
<object class="AdwPreferencesPage">
|
||||||
@@ -35,17 +45,6 @@
|
|||||||
<!-- Dynamic rows will be added here via model binding -->
|
<!-- Dynamic rows will be added here via model binding -->
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</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>
|
</object>
|
||||||
</property>
|
</property>
|
||||||
</object>
|
</object>
|
||||||
|
|||||||
Reference in New Issue
Block a user