Add gtk-layer-shell overlay ability
Signed-off-by: Vasiliy Doylov <nekocwd@mainlining.org>
This commit is contained in:
parent
87b4f223c7
commit
f9442af5ed
2 changed files with 16 additions and 3 deletions
|
@ -8,6 +8,7 @@ pipetap_deps = [
|
|||
config_dep,
|
||||
dependency('gtk4'),
|
||||
dependency('libadwaita-1', version: '>= 1.4'),
|
||||
dependency('gtk4-layer-shell-0'),
|
||||
]
|
||||
|
||||
blueprints = custom_target(
|
||||
|
|
|
@ -18,12 +18,24 @@
|
|||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
[GtkTemplate (ui = "/io/gitlab/nekocwd/pipetap/window.ui")]
|
||||
[GtkTemplate(ui = "/io/gitlab/nekocwd/pipetap/window.ui")]
|
||||
public class PipeTap.Window : Adw.ApplicationWindow {
|
||||
[GtkChild]
|
||||
private unowned Gtk.Label label;
|
||||
|
||||
public Window (Gtk.Application app) {
|
||||
Object (application: app);
|
||||
public Window(Gtk.Application app) {
|
||||
Object(application: app);
|
||||
GtkLayerShell.init_for_window(this);
|
||||
set_position();
|
||||
}
|
||||
|
||||
void set_position() {
|
||||
GtkLayerShell.set_anchor(this, GtkLayerShell.Edge.BOTTOM, true);
|
||||
GtkLayerShell.set_anchor(this, GtkLayerShell.Edge.BOTTOM, true);
|
||||
GtkLayerShell.set_anchor(this, GtkLayerShell.Edge.LEFT, true);
|
||||
|
||||
GtkLayerShell.set_margin(this, GtkLayerShell.Edge.TOP, 100);
|
||||
GtkLayerShell.set_margin(this, GtkLayerShell.Edge.BOTTOM, 100);
|
||||
GtkLayerShell.set_margin(this, GtkLayerShell.Edge.LEFT, 100);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue