-
-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathcorners.py
65 lines (60 loc) · 1.82 KB
/
corners.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
from fabric.widgets.box import Box
from fabric.widgets.centerbox import CenterBox
from fabric.widgets.button import Button
from fabric.widgets.wayland import WaylandWindow as Window
from fabric.widgets.shapes import Corner
from gi.repository import GLib
class MyCorner(Box):
def __init__(self, corner):
super().__init__(
name="corner-container",
children=Corner(
name="corner",
orientation=corner,
size=20,
),
)
class Corners(Window):
def __init__(self):
super().__init__(
name="corners",
layer="top",
anchor="top bottom left right",
exclusivity="normal",
pass_through=True,
visible=False,
all_visible=False,
)
self.all_corners = Box(
name="all-corners",
orientation="v",
h_expand=True,
v_expand=True,
h_align="fill",
v_align="fill",
children=[
Box(
name="top-corners",
orientation="h",
h_align="fill",
children=[
MyCorner("top-left"),
Box(h_expand=True),
MyCorner("top-right"),
],
),
Box(v_expand=True),
Box(
name="bottom-corners",
orientation="h",
h_align="fill",
children=[
MyCorner("bottom-left"),
Box(h_expand=True),
MyCorner("bottom-right"),
],
),
],
)
self.add(self.all_corners)
self.show_all()