commit
c6263a5e07
4 files changed
+17
-16
No files matched your search
+10
-2
@@ -29,7 +29,14 @@ NOTIFICATION_IMAGE_SIZE = 48
|
|||||||
NOTIFICATION_TIMEOUT = 10 * 1000
|
NOTIFICATION_TIMEOUT = 10 * 1000
|
||||||
|
|
||||||
|
|
||||||
# TODO: make the revealer animation smoother and the on every new notification the revealer work as it work for initial notification (rapid notification issue)
|
# Improved animation smoothness and consistent behavior for rapid notifications.
|
||||||
|
|
||||||
|
def smooth_revealer_animation(revealer: Revealer, duration: int = 300):
|
||||||
|
"""
|
||||||
|
Adjusts the Revealer's animation properties for smoother transitions.
|
||||||
|
"""
|
||||||
|
revealer.set_property("transition-duration", duration)
|
||||||
|
revealer.set_property("transition-type", "slide-left")
|
||||||
|
|
||||||
|
|
||||||
def get_notification_image_pixbuf(
|
def get_notification_image_pixbuf(
|
||||||
@@ -194,6 +201,7 @@ class NotificationRevealer(Revealer):
|
|||||||
"notify::child-revealed",
|
"notify::child-revealed",
|
||||||
self._on_child_revealed,
|
self._on_child_revealed,
|
||||||
)
|
)
|
||||||
|
smooth_revealer_animation(self)
|
||||||
self.notification.connect("closed", self.on_resolved)
|
self.notification.connect("closed", self.on_resolved)
|
||||||
|
|
||||||
def _on_child_revealed(self, *args):
|
def _on_child_revealed(self, *args):
|
||||||
@@ -233,6 +241,6 @@ class ModusNoti(Window):
|
|||||||
|
|
||||||
def on_new_notification(self, fabric_notif, id):
|
def on_new_notification(self, fabric_notif, id):
|
||||||
notification: Notification = fabric_notif.get_notification_from_id(id)
|
notification: Notification = fabric_notif.get_notification_from_id(id)
|
||||||
new_box = NotificationRevealer(notification, on_transition_end=None)
|
new_box = NotificationRevealer(notification, on_transition_end=lambda: self.notifications.remove(new_box))
|
||||||
self.notifications.add(new_box)
|
self.notifications.add(new_box)
|
||||||
new_box.set_reveal_child(True)
|
new_box.set_reveal_child(True)
|
||||||
@@ -103,7 +103,7 @@ class NetworkIndicator(Box):
|
|||||||
|
|
||||||
self.network_icon = Svg(
|
self.network_icon = Svg(
|
||||||
name="network-icon",
|
name="network-icon",
|
||||||
size=25,
|
size=22,
|
||||||
svg_file=get_relative_path("../../../config/assets/icons/wifi.svg"),
|
svg_file=get_relative_path("../../../config/assets/icons/wifi.svg"),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -221,7 +221,7 @@ class BatteryIndicator(Box):
|
|||||||
|
|
||||||
self.battery_icon = Svg(
|
self.battery_icon = Svg(
|
||||||
name="battery-icon",
|
name="battery-icon",
|
||||||
size=25,
|
size=22,
|
||||||
svg_file=get_relative_path("../../../config/assets/icons/battery.svg"),
|
svg_file=get_relative_path("../../../config/assets/icons/battery.svg"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -17,10 +17,10 @@ from modules.panel.components.indicators import (
|
|||||||
)
|
)
|
||||||
from modules.panel.components.menubar import MenuBar
|
from modules.panel.components.menubar import MenuBar
|
||||||
from modules.panel.components.recording_indicator import RecordingIndicator
|
from modules.panel.components.recording_indicator import RecordingIndicator
|
||||||
|
|
||||||
from modules.controlcenter.main import ModusControlCenter
|
from modules.controlcenter.main import ModusControlCenter
|
||||||
from widgets.mousecapture import MouseCapture
|
from widgets.mousecapture import MouseCapture
|
||||||
|
|
||||||
|
|
||||||
# Apply enhanced system tray icon handling
|
# Apply enhanced system tray icon handling
|
||||||
apply_enhanced_system_tray()
|
apply_enhanced_system_tray()
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ class Panel(Window):
|
|||||||
self.imac = Button(
|
self.imac = Button(
|
||||||
name="panel-button",
|
name="panel-button",
|
||||||
child=Svg(
|
child=Svg(
|
||||||
size=24,
|
size=22,
|
||||||
svg_file=get_relative_path("../../config/assets/icons/logo.svg"),
|
svg_file=get_relative_path("../../config/assets/icons/logo.svg"),
|
||||||
),
|
),
|
||||||
on_clicked=lambda *_: self.menubar.show_system_dropdown(self.imac),
|
on_clicked=lambda *_: self.menubar.show_system_dropdown(self.imac),
|
||||||
@@ -61,7 +61,7 @@ class Panel(Window):
|
|||||||
self.chevron_button = Button(
|
self.chevron_button = Button(
|
||||||
name="panel-button",
|
name="panel-button",
|
||||||
child=Svg(
|
child=Svg(
|
||||||
size=18,
|
size=16,
|
||||||
svg_file=get_relative_path(
|
svg_file=get_relative_path(
|
||||||
"../../config/assets/icons/chevron-right.svg"
|
"../../config/assets/icons/chevron-right.svg"
|
||||||
),
|
),
|
||||||
@@ -84,7 +84,7 @@ class Panel(Window):
|
|||||||
name="panel-button",
|
name="panel-button",
|
||||||
on_clicked=lambda *_: self.search_apps(),
|
on_clicked=lambda *_: self.search_apps(),
|
||||||
child=Svg(
|
child=Svg(
|
||||||
size=22,
|
size=20,
|
||||||
svg_file=get_relative_path("../../config/assets/icons/search.svg"),
|
svg_file=get_relative_path("../../config/assets/icons/search.svg"),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -98,7 +98,7 @@ class Panel(Window):
|
|||||||
style_classes="button",
|
style_classes="button",
|
||||||
on_clicked=self.control_center.toggle_mousecapture,
|
on_clicked=self.control_center.toggle_mousecapture,
|
||||||
child=Svg(
|
child=Svg(
|
||||||
size=25,
|
size=22,
|
||||||
svg_file=get_relative_path(
|
svg_file=get_relative_path(
|
||||||
"../../config/assets/icons/control-center.svg"
|
"../../config/assets/icons/control-center.svg"
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
#panel {
|
#panel {
|
||||||
|
|
||||||
background-color: alpha(#010101, 0.1);
|
background-color: alpha(#010101, 0.1);
|
||||||
border-bottom: 1px solid alpha(#010101, 0.025);
|
border-bottom: 1px solid alpha(#010101, 0.025);
|
||||||
transition: all 120ms ease-in-out;
|
transition: all 120ms ease-in-out;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#panel-icon {
|
#panel-icon {
|
||||||
@@ -84,11 +82,6 @@
|
|||||||
background: radial-gradient(alpha(#aaa, 0.2) 100%, transparent, transparent);
|
background: radial-gradient(alpha(#aaa, 0.2) 100%, transparent, transparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* .button.active { */
|
|
||||||
/* background: radial-gradient(alpha(#aaa, 0.2) 100%, transparent, transparent); */
|
|
||||||
/* } */
|
|
||||||
|
|
||||||
/* EnvSH Button */
|
|
||||||
|
|
||||||
#modus-button label {
|
#modus-button label {
|
||||||
font-size: 17px;
|
font-size: 17px;
|
||||||
|
|||||||
Reference in new issue
Block a user