Fixed Notifiactions going out of screen
This commit is contained in:
1 parent
5cc25f839b
commit
1eef83e941
2 files changed
+8
-3
No files matched your search
@@ -506,7 +506,7 @@ class NotificationWidget(Box):
|
|||||||
name="notification-summary",
|
name="notification-summary",
|
||||||
markup=notification.summary.replace("\n", " "),
|
markup=notification.summary.replace("\n", " "),
|
||||||
h_align="start",
|
h_align="start",
|
||||||
max_chars_width=30,
|
max_chars_width=40,
|
||||||
ellipsization="end",
|
ellipsization="end",
|
||||||
),
|
),
|
||||||
# Label(
|
# Label(
|
||||||
@@ -521,6 +521,7 @@ class NotificationWidget(Box):
|
|||||||
Label(
|
Label(
|
||||||
markup=notification.body.replace("\n", " "),
|
markup=notification.body.replace("\n", " "),
|
||||||
h_align="start",
|
h_align="start",
|
||||||
|
max_chars_width=45,
|
||||||
ellipsization="end",
|
ellipsization="end",
|
||||||
)
|
)
|
||||||
if notification.body
|
if notification.body
|
||||||
|
|||||||
@@ -361,7 +361,9 @@ class ExpandableNotificationGroup(Box):
|
|||||||
GLib.timeout_add(125, self._show_collapsed_midway)
|
GLib.timeout_add(125, self._show_collapsed_midway)
|
||||||
|
|
||||||
# After crossfade completes, start slide-up animation (just for cleanup)
|
# After crossfade completes, start slide-up animation (just for cleanup)
|
||||||
GLib.timeout_add(260, lambda: self.notifications_revealer.set_reveal_child(False))
|
GLib.timeout_add(
|
||||||
|
260, lambda: self.notifications_revealer.set_reveal_child(False)
|
||||||
|
)
|
||||||
|
|
||||||
logger.debug(f"Collapsed notification group: {self.app_name}")
|
logger.debug(f"Collapsed notification group: {self.app_name}")
|
||||||
|
|
||||||
@@ -374,6 +376,7 @@ class ExpandableNotificationGroup(Box):
|
|||||||
def _complete_collapse(self):
|
def _complete_collapse(self):
|
||||||
"""Complete the collapse animation - no longer needed but kept for compatibility"""
|
"""Complete the collapse animation - no longer needed but kept for compatibility"""
|
||||||
return False # Don't repeat timeout
|
return False # Don't repeat timeout
|
||||||
|
|
||||||
def close_all(self, *args):
|
def close_all(self, *args):
|
||||||
# Close all notifications in this group
|
# Close all notifications in this group
|
||||||
for notification in self.notifications:
|
for notification in self.notifications:
|
||||||
@@ -490,6 +493,7 @@ class NotificationCenterWidget(NotificationWidget):
|
|||||||
name="notification-summary",
|
name="notification-summary",
|
||||||
markup=notification.summary.replace("\n", " "),
|
markup=notification.summary.replace("\n", " "),
|
||||||
h_align="start",
|
h_align="start",
|
||||||
|
max_chars_width=30,
|
||||||
ellipsization="end",
|
ellipsization="end",
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -498,6 +502,7 @@ class NotificationCenterWidget(NotificationWidget):
|
|||||||
Label(
|
Label(
|
||||||
markup=notification.body.replace("\n", " "),
|
markup=notification.body.replace("\n", " "),
|
||||||
h_align="start",
|
h_align="start",
|
||||||
|
max_chars_width=35,
|
||||||
ellipsization="end",
|
ellipsization="end",
|
||||||
)
|
)
|
||||||
if notification.body
|
if notification.body
|
||||||
@@ -798,4 +803,3 @@ class NotificationCenter(Window):
|
|||||||
notification_service.disconnect("notify::count", self.on_count_changed)
|
notification_service.disconnect("notify::count", self.on_count_changed)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Error disconnecting signals: {e}")
|
logger.error(f"Error disconnecting signals: {e}")
|
||||||
|
|
||||||
Reference in new issue
Block a user