Skip to content

Commit 5130c19

Browse files
authored
CSS: modernize for Gtk 4.20+ (#299)
1 parent 2e0a5dc commit 5130c19

3 files changed

Lines changed: 20 additions & 20 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ a Gtk notification server for Pantheon
88
You'll need the following dependencies:
99
* libcanberra
1010
* libgranite-7-dev (>=7.7.0)
11-
* libgtk-4-dev
11+
* libgtk-4-dev (>=4.20)
1212
* libadwaita-1-dev (>=1.0.0)
1313
* meson
1414
* valac

‎data/application.css‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ window,
77
}
88

99
button.osd {
10-
border-radius: 100%;
11-
background: @BLACK_500;
12-
box-shadow:
13-
inset 0 0 0 1px alpha(#fff, 0.02),
14-
inset 0 1px 0 0 alpha(#fff, 0.07),
15-
inset 0 -1px 0 0 alpha(#fff, 0.01),
16-
0 0 0 1px alpha(#000, 0.7),
17-
0 1px 2px alpha(#000, 0.16),
18-
0 2px 3px alpha(#000, 0.23);
19-
margin: 3px;
20-
-gtk-icon-shadow: 0 1px 1px alpha(#000, 0.6);
21-
-gtk-icon-size: 24px;
10+
border-radius: 100%;
11+
background: @BLACK_500;
12+
box-shadow:
13+
inset 0 0 0 1px color-mix(in srgb, white 2%, transparent),
14+
inset 0 1px 0 0 color-mix(in srgb, white 7%, transparent),
15+
inset 0 -1px 0 0 color-mix(in srgb, white 1%, transparent),
16+
0 0 0 1px color-mix(in srgb, black 7%, transparent),
17+
0 1px 2px color-mix(in srgb, black 16%, transparent),
18+
0 2px 3px color-mix(in srgb, black 23%, transparent);
19+
margin: 3px;
20+
-gtk-icon-shadow: 0 1px 1px color-mix(in srgb, black 6%, transparent);
21+
-gtk-icon-size: 24px;
2222
}
2323

2424
.notification stack > box,
@@ -35,13 +35,13 @@ button.osd {
3535
background: alpha(@base_color, 0.8);
3636
border-radius: 9px;
3737
box-shadow:
38-
inset 0 -1px 0 0 alpha(@highlight_color, 0.4),
39-
inset 0 1px 0 0 alpha(@highlight_color, 0.6),
40-
inset 1px 0 0 0 alpha(@highlight_color, 0.14),
41-
inset -1px 0 0 0 alpha(@highlight_color, 0.14),
38+
inset 0 -1px 0 0 color-mix(in srgb, @highlight_color 40%, transparent),
39+
inset 0 1px 0 0 color-mix(in srgb, @highlight_color 60%, transparent),
40+
inset 1px 0 0 0 color-mix(in srgb, @highlight_color 14%, transparent),
41+
inset -1px 0 0 0 color-mix(in srgb, @highlight_color 14%, transparent),
4242
0 0 0 1px @borders,
43-
0 1px 3px alpha(black, 0.2),
44-
0 3px 9px alpha(black, 0.3);
43+
0 1px 3px color-mix(in srgb, black 20%, transparent),
44+
0 3px 9px color-mix(in srgb, black 30%, transparent);
4545
margin: 16px;
4646
}
4747

‎meson.build‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ executable(
3535
dependency ('gobject-2.0'),
3636
dependency ('gio-2.0'),
3737
dependency ('granite-7', version: '>=7.7.0'),
38-
dependency ('gtk4'),
38+
dependency ('gtk4', version: '>=4.20'),
3939
dependency('gtk4-wayland'),
4040
dependency('gtk4-x11'),
4141
dependency ('gtk4-x11'),

0 commit comments

Comments
 (0)