Removed alt button box from ui file
This commit is contained in:
@@ -191,22 +191,6 @@
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButtonBox" id="alt_actions_button_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<property name="layout-style">expand</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<style>
|
||||
<class name="notification"/>
|
||||
</style>
|
||||
|
@@ -10,13 +10,15 @@ namespace SwayNotificatonCenter {
|
||||
[GtkChild]
|
||||
unowned Gtk.Button default_button;
|
||||
|
||||
[GtkChild]
|
||||
unowned Gtk.Box base_box;
|
||||
|
||||
[GtkChild]
|
||||
unowned Gtk.Revealer close_revealer;
|
||||
[GtkChild]
|
||||
unowned Gtk.Button close_button;
|
||||
|
||||
[GtkChild]
|
||||
unowned Gtk.ButtonBox alt_actions_button_box;
|
||||
private Gtk.ButtonBox alt_actions_box;
|
||||
|
||||
[GtkChild]
|
||||
unowned Gtk.Label summary;
|
||||
@@ -156,14 +158,18 @@ namespace SwayNotificatonCenter {
|
||||
|
||||
private void set_actions () {
|
||||
if (param.actions.length > 0) {
|
||||
alt_actions_box = new Gtk.ButtonBox (Gtk.Orientation.HORIZONTAL);
|
||||
alt_actions_box.set_homogeneous (true);
|
||||
alt_actions_box.set_layout (Gtk.ButtonBoxStyle.EXPAND);
|
||||
foreach (var action in param.actions) {
|
||||
var actionButton = new Gtk.Button.with_label (action._name);
|
||||
actionButton.clicked.connect (() => action_clicked (action));
|
||||
actionButton.get_style_context ().add_class ("notification-action");
|
||||
actionButton.can_focus = false;
|
||||
alt_actions_button_box.add (actionButton);
|
||||
alt_actions_box.add (actionButton);
|
||||
}
|
||||
alt_actions_button_box.show_all ();
|
||||
alt_actions_box.show_all ();
|
||||
base_box.add (alt_actions_box);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user