corner added

This commit is contained in:
sankalp committed 2025-02-04 19:39:50 +05:45
1 parent 97eb764ace
commit 737d712383
3 files changed
+77 -1

No files matched your search

+2
View File
@@ -9,6 +9,7 @@ from modules.bar.bar import Bar
from modules.launcher.launcher import Launcher
from modules.notification_popup import NotificationPopup
from modules.osd import OSDContainer
from modules.corners import Corners
from services import sc
for log in [
@@ -43,6 +44,7 @@ if __name__ == "__main__":
update_main_css()
sc = sc
bar = Bar()
corners = Corners()
osd = OSDContainer()
notif = NotificationPopup()
launcher = Launcher()
+64
View File
@@ -0,0 +1,64 @@
from fabric.widgets.box import Box
from fabric.widgets.wayland import WaylandWindow as Window
from fabric.widgets.shapes import Corner
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()
+11 -1
View File
@@ -1,4 +1,4 @@
@import url(../../../.cache/material/colors.css);
@import url(../../.cache/material/colors.css);
@import "./bar.css";
@import "./notification.css";
@import "./osd.css";
@@ -12,6 +12,16 @@
sans-serif;
}
#corner {
background-color: @surface;
border-radius: 0;
}
#corner-container {
min-width: 20px;
min-height: 20px;
}
/*
* ── tooltip ───────────────────────────────────────────────────────────
*/