summaryrefslogtreecommitdiff
path: root/core/src/widget/overlay.vala
diff options
context:
space:
mode:
authorAylur <[email protected]>2024-10-15 01:26:32 +0200
committerAylur <[email protected]>2024-10-15 01:26:32 +0200
commit2f71cd4c08bb4514efe43533e6a5d03535204c29 (patch)
treefc991a12e159ad645187862c90f40731794d6e47 /core/src/widget/overlay.vala
parent9fab13452a26ed55c01047d4225f699f43bba20d (diff)
refactor lua and gjs lib
Diffstat (limited to 'core/src/widget/overlay.vala')
-rw-r--r--core/src/widget/overlay.vala59
1 files changed, 0 insertions, 59 deletions
diff --git a/core/src/widget/overlay.vala b/core/src/widget/overlay.vala
deleted file mode 100644
index 207aaa7..0000000
--- a/core/src/widget/overlay.vala
+++ /dev/null
@@ -1,59 +0,0 @@
-namespace Astal {
-public class Overlay : Gtk.Overlay {
- public bool pass_through { get; set; }
-
- public Gtk.Widget? overlay {
- get { return overlays.nth_data(0); }
- set {
- foreach (var ch in get_children()) {
- if (ch != child)
- remove(ch);
- }
-
- if (value != null)
- add_overlay(value);
- }
- }
-
- public List<weak Gtk.Widget> overlays {
- owned get { return get_children(); }
- set {
- foreach (var ch in get_children()) {
- if (ch != child)
- remove(ch);
- }
-
- foreach (var ch in value)
- add_overlay(ch);
- }
- }
-
- public new Gtk.Widget? child {
- get { return get_child(); }
- set {
- var ch = get_child();
- if (ch != null)
- remove(ch);
-
- if (value != null)
- add(value);
- }
- }
-
- construct {
- notify["pass-through"].connect(() => {
- update_pass_through();
- });
- }
-
- private void update_pass_through() {
- foreach (var child in get_children())
- set_overlay_pass_through(child, pass_through);
- }
-
- public new void add_overlay(Gtk.Widget widget) {
- base.add_overlay(widget);
- set_overlay_pass_through(widget, pass_through);
- }
-}
-}