diff options
author | Aylur <[email protected]> | 2025-03-01 20:59:09 +0100 |
---|---|---|
committer | Aylur <[email protected]> | 2025-03-01 21:02:29 +0100 |
commit | 23cdbc8088b5c308a068b432a6b03213ede68f07 (patch) | |
tree | 1e8bd6ffde5273fcd80aca0d30cbb38dbe5f9461 /examples/gtk4/simple-bar/vala/src/ui | |
parent | dfd1f23c7562694e571d44c45aa74fcea9b1ba01 (diff) |
add gtk4 examples
Diffstat (limited to 'examples/gtk4/simple-bar/vala/src/ui')
-rw-r--r-- | examples/gtk4/simple-bar/vala/src/ui/Bar.blp | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/examples/gtk4/simple-bar/vala/src/ui/Bar.blp b/examples/gtk4/simple-bar/vala/src/ui/Bar.blp new file mode 100644 index 0000000..6e401e7 --- /dev/null +++ b/examples/gtk4/simple-bar/vala/src/ui/Bar.blp @@ -0,0 +1,84 @@ +using Gtk 4.0; +using Astal 4.0; + +template $Bar: Astal.Window { + CenterBox centerbox { + start-widget: Box { + MenuButton { + Label { + label: bind template.clock; + } + + popover: Popover popover { + Calendar calendar { + show-day-names: true; + show-heading: true; + show-week-numbers: true; + } + }; + } + }; + + center-widget: Box { + Box { + visible: bind template.mpris-visible; + + Image { + file: bind template.mpris-art; + } + + Label { + label: bind template.mpris-label; + } + } + }; + + end-widget: Box { + spacing: 4; + + Image { + visible: bind template.bluetooth-visible; + icon-name: "bluetooth-symbolic"; + } + + Image { + icon-name: bind template.power-profile-icon; + } + + Image { + icon-name: bind template.network-icon; + } + + Box { + Image { + icon-name: bind template.volume-icon; + } + + Scale { + width-request: 100; + change-value => $change_volume(); + + adjustment: Adjustment { + value: bind template.volume; + lower: 0; + upper: 1; + }; + } + } + + Box { + Image { + icon-name: bind template.battery-icon; + } + + Label { + label: bind template.battery-label; + } + } + + Box traybox { + spacing: 4; + } + }; + } +} |