File tree Expand file tree Collapse file tree
src/Library/demos/Overlay Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ using Gtk 4.0;
2+ using Adw 1;
3+
4+ Adw.StatusPage {
5+ title: "Overlay";
6+ description: "Overlay widgets on top of a each other";
7+
8+ Adw.Clamp{
9+ Overlay {
10+ Picture picture {
11+ }
12+
13+ [overlay]
14+ Box toolbar{
15+ margin-start: 24;
16+ margin-end: 24;
17+ margin-bottom:18;
18+ valign: end;
19+
20+ Button {
21+ icon-name: "skip-backwards-10-symbolic";
22+ }
23+
24+ Button {
25+ icon-name: "play-large-symbolic";
26+ }
27+
28+ Button {
29+ icon-name: "skip-forward-10-symbolic";
30+ }
31+
32+ Scale {
33+ hexpand: true;
34+ orientation: horizontal;
35+ show-fill-level: true;
36+ adjustment:
37+ Adjustment {
38+ lower: 0;
39+ upper: 100;
40+ value:50;
41+ };
42+ }
43+
44+ Button {
45+ icon-name: "audio-volume-muted-symbolic";
46+ }
47+
48+ styles [
49+ "toolbar",
50+ "osd",
51+ "darken",
52+ ]
53+ }
54+ }
55+ }
56+ }
Original file line number Diff line number Diff line change 1+ .darken {
2+ transition : background-color 0.3s ease-in-out;
3+ }
4+
5+ .darken : hover {
6+ background-color : black;
7+ }
Original file line number Diff line number Diff line change 1+ import Gtk from "gi://Gtk" ;
2+ import Gio from "gi://Gio" ;
3+ import GLib from "gi://GLib" ;
4+
5+ const file = Gio . File . new_for_path ( pkg . pkgdatadir ) . resolve_relative_path (
6+ "Library/demos/Overlay/image.png" ,
7+ ) ;
8+
9+ const picture = workbench . builder . get_object ( "picture" ) ;
10+ picture . file = file ;
11+
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " Overlay" ,
3+ "category" : " user_interface" ,
4+ "description" : " Overlay widgets on top of each other" ,
5+ "panels" : [
6+ " ui" ,
7+ " preview"
8+ ],
9+ "autorun" : true
10+ }
You can’t perform that action at this time.
0 commit comments