Skip to content

Commit b05a60d

Browse files
authored
RepeatPanel: gtk4 friendly text and image button (#919)
1 parent 98019c7 commit b05a60d

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

src/EventEdition/RepeatPanel.vala

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,14 @@ public class Maya.View.EventEdition.RepeatPanel : Gtk.Bin {
147147
};
148148
exceptions_list.set_placeholder (no_exceptions_label);
149149

150-
var add_button = new Gtk.Button.with_label (_("Add Exception")) {
151-
always_show_image = true,
152-
image = new Gtk.Image.from_icon_name ("list-add-symbolic", Gtk.IconSize.BUTTON),
153-
margin_top = 3,
154-
margin_end = 3,
155-
margin_bottom = 3,
156-
margin_start = 3
150+
var add_button_box = new Gtk.Box (HORIZONTAL, 0);
151+
add_button_box.add (new Gtk.Image.from_icon_name ("list-add-symbolic", BUTTON));
152+
add_button_box.add (new Gtk.Label (_("Add Exception")));
153+
154+
var add_button = new Gtk.Button () {
155+
child = add_button_box,
156+
relief = NONE
157157
};
158-
add_button.get_style_context ().add_class (Gtk.STYLE_CLASS_FLAT);
159158

160159
var inline_toolbar = new Gtk.ActionBar ();
161160
inline_toolbar.get_style_context ().add_class (Gtk.STYLE_CLASS_FLAT);

0 commit comments

Comments
 (0)