Skip to content

Commit

Permalink
Added icon size options for GTK3
Browse files Browse the repository at this point in the history
  • Loading branch information
sakithb committed Sep 14, 2021
1 parent ceb5ef8 commit 92b2ce4
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,16 +445,21 @@ const addToBacklistListBox = (app) => {
halign: Gtk.Align.START,
});

let deleteButton = Gtk.Button.new_from_icon_name("edit-delete-symbolic", null);
let deleteButton = Gtk.Button.new_from_icon_name(
"edit-delete-symbolic",
Gtk.IconSize.BUTTON || Gtk.IconSize.NORMAL
);

deleteButton.visible = true;

deleteButton.connect("clicked", (widget) => {
widgetBacklistBox.remove(widget.get_parent().get_parent());
});

if (shellVersion < 40) {
box.pack_start(label, false, false, null);
box.pack_start(deleteButton, false, false, null);
widgetBacklistBox.insert_child(box, -1);
box.add(label);
box.add(deleteButton);
widgetBacklistBox.insert(box, -1);
} else {
box.append(label);
box.append(deleteButton);
Expand Down

0 comments on commit 92b2ce4

Please sign in to comment.