Fixed Mistakes by ai

This commit is contained in:
tr1x_em committed 2025-08-02 21:43:07 +05:30
1 parent d7df11050e
commit 684a41ea38
6 files changed
+38 -24

No files matched your search

+1
View File
@@ -13,3 +13,4 @@ config/hypr/colors.conf
fabric/**
fabric/
# styles/colors.css
.aider*
+29 -19
View File
@@ -86,11 +86,11 @@ class NotificationWidget(Box):
self.notification = notification
self.timeout_ms = timeout_ms
self._timeout_id = None
# Add hover events to the main notification widget
self.connect("enter-notify-event", self._on_enter_notify)
self.connect("leave-notify-event", self._on_leave_notify)
self.start_timeout()
def create_header(self, notification):
@@ -343,9 +343,9 @@ class NotificationRevealer(SlideRevealer):
):
if self._is_closing:
return
self._is_closing = True
# Use left-to-right slide for auto-dismiss (expired), right-to-left for manual close
if reason == "expired":
# Left-to-right slide for auto-dismiss
@@ -405,7 +405,7 @@ class NotificationState:
HIDING = 2
class NotificationCenter(Window):
class ModusNoti(Window):
def __init__(self):
self._server = notification_service
self.notifications = Box(
@@ -466,30 +466,37 @@ class NotificationCenter(Window):
# Add new notification to queue
self.notification_queue.append(notification)
# Process the queue
self._process_notification_queue()
def _process_notification_queue(self):
# If we're currently showing a notification and there's a new one in queue
if (self.notification_state == NotificationState.SHOWING and
self.current_notification and
self.notification_queue):
if (
self.notification_state == NotificationState.SHOWING
and self.current_notification
and self.notification_queue
):
# Start hiding the current notification to make room for the new one
self._start_hiding_current_notification()
elif self.notification_state == NotificationState.IDLE and self.notification_queue:
elif (
self.notification_state == NotificationState.IDLE
and self.notification_queue
):
# If we're idle and have notifications in queue, show the next one
self._show_next_notification()
def _start_hiding_current_notification(self):
if (self.current_notification and
self.notification_state == NotificationState.SHOWING and
not self.current_notification._is_closing):
if (
self.current_notification
and self.notification_state == NotificationState.SHOWING
and not self.current_notification._is_closing
):
self.notification_state = NotificationState.HIDING
# Force close the current notification to trigger hiding animation
try:
self.current_notification.notification.close("dismissed-by-user")
@@ -497,7 +504,10 @@ class NotificationCenter(Window):
pass
def _show_next_notification(self):
if not self.notification_queue or self.notification_state != NotificationState.IDLE:
if (
not self.notification_queue
or self.notification_state != NotificationState.IDLE
):
return
notification = self.notification_queue.pop(0)
@@ -554,7 +564,7 @@ class NotificationCenter(Window):
if self.notification_queue:
self._transition_timer_id = GLib.timeout_add(
50, # Very short delay for seamless transitions
lambda: self._show_next_notification() or False
lambda: self._show_next_notification() or False,
)
def show_next_notification(self):
+2 -1
View File
@@ -1,5 +1,6 @@
#about-menu {
background-color: alpha(#001, 0.3);
background-color: alpha(#000, 0.34);
box-shadow: inset 0 -0.5px 0 .5px alpha(#555, 0.7), inset 0 0.5px 0 .5px alpha(#777, 0.7);
border: 1px solid alpha(#111, 0.3);
border-top: none;
+2 -1
View File
@@ -1,5 +1,6 @@
#noti-center-box {
background-color: alpha(#001, 0.3);
background-color: alpha(#fff, 0.09);
border: 1px solid alpha(#111, 0.3);
border-radius: 16px;
padding: 20px;
+1 -1
View File
@@ -1,5 +1,5 @@
#osd {
background-color: alpha(#000, 0.03);
background-color: alpha(#fff, 0.09);
padding: 12px 20px;
margin: 70px;
min-height: 200px;
+3 -2
View File
@@ -1,7 +1,8 @@
#panel {
background-color: alpha(#010101, 0.1);
background-color: alpha(#fff, 0.05);
border-bottom: 1px solid alpha(#010101, 0.025);
margin-top: -4;
margin-top: -4px;
margin-bottom: -4px;
transition: all 120ms ease-in-out;
}