Skip to content

Commit 447c2e7

Browse files
committed
Fix IconButton CSS for GTK 3.22
1 parent 443b022 commit 447c2e7

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

Screenshot.png

-2.03 KB
Loading

src/IconButton.vala

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,26 @@ public class AppEditor.IconButton : Gtk.MenuButton {
5151
}
5252
""";
5353

54+
private const string BUTTON_CSS_322 = """
55+
button {
56+
border-width: 1px;
57+
border-color: #c8c8c8;
58+
}
59+
""";
60+
5461
static construct {
5562
default_icon = new ThemedIcon ("application-x-executable");
5663
}
5764

5865
construct {
59-
Granite.Widgets.Utils.set_theming (this, BUTTON_CSS, "flat", Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
66+
string css;
67+
if (Application.has_gtk_322 ()) {
68+
css = BUTTON_CSS_322;
69+
} else {
70+
css = BUTTON_CSS;
71+
}
72+
73+
Granite.Widgets.Utils.set_theming (this, css, "flat", Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
6074

6175
icon_image = new Gtk.Image ();
6276
icon_image.pixel_size = 64;

0 commit comments

Comments
 (0)