From 9ce37b9837908bdede097a2f034c50796cb15884 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Wed, 5 Aug 2026 06:10:02 +0545 Subject: [PATCH] feat(notch): add shared NotchPill container --- src/window/panel/notch/pill.py | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/window/panel/notch/pill.py diff --git a/src/window/panel/notch/pill.py b/src/window/panel/notch/pill.py new file mode 100644 index 0000000..095af42 --- /dev/null +++ b/src/window/panel/notch/pill.py @@ -0,0 +1,41 @@ +from fabric.widgets.box import Box +from fabric.widgets.centerbox import CenterBox +from fabric.widgets.shapes import Corner + + +class NotchPill(Box): + def __init__(self, center_widget, v_align="center", **kwargs): + super().__init__( + name="panel-notch-wrap", + orientation="h", + spacing=0, + v_align=v_align, + h_align="center", + h_expand=False, + **kwargs, + ) + self.left_corner = Corner( + name="panel-notch-corner", + orientation="top-right", + size=20, + h_align="start", + v_align="start", + ) + self.right_corner = Corner( + name="panel-notch-corner", + orientation="top-left", + size=20, + h_align="end", + v_align="start", + ) + self.center_widget = center_widget + self.notch_box = CenterBox( + name="panel-notch", + orientation="h", + h_align="center", + v_align="center", + start_children=self.left_corner, + center_children=center_widget, + end_children=self.right_corner, + ) + self.add(self.notch_box)