Merge pull request #11 from tr1xem/macos

Size
This commit was merged in pull request #11.
This commit is contained in:
sankalp authored and GitHub committed 2025-07-31 21:47:47 +05:45
commit 34c3011827
4 files changed
+17 -16

No files matched your search

+10 -2
View File
@@ -29,7 +29,14 @@ NOTIFICATION_IMAGE_SIZE = 48
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(
@@ -194,6 +201,7 @@ class NotificationRevealer(Revealer):
"notify::child-revealed",
self._on_child_revealed,
)
smooth_revealer_animation(self)
self.notification.connect("closed", self.on_resolved)
def _on_child_revealed(self, *args):
@@ -233,6 +241,6 @@ class ModusNoti(Window):
def on_new_notification(self, fabric_notif, 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)
new_box.set_reveal_child(True)
+2 -2
View File
@@ -103,7 +103,7 @@ class NetworkIndicator(Box):
self.network_icon = Svg(
name="network-icon",
size=25,
size=22,
svg_file=get_relative_path("../../../config/assets/icons/wifi.svg"),
)
@@ -221,7 +221,7 @@ class BatteryIndicator(Box):
self.battery_icon = Svg(
name="battery-icon",
size=25,
size=22,
svg_file=get_relative_path("../../../config/assets/icons/battery.svg"),
)
+5 -5
View File
@@ -17,10 +17,10 @@ from modules.panel.components.indicators import (
)
from modules.panel.components.menubar import MenuBar
from modules.panel.components.recording_indicator import RecordingIndicator
from modules.controlcenter.main import ModusControlCenter
from widgets.mousecapture import MouseCapture
# Apply enhanced system tray icon handling
apply_enhanced_system_tray()
@@ -42,7 +42,7 @@ class Panel(Window):
self.imac = Button(
name="panel-button",
child=Svg(
size=24,
size=22,
svg_file=get_relative_path("../../config/assets/icons/logo.svg"),
),
on_clicked=lambda *_: self.menubar.show_system_dropdown(self.imac),
@@ -61,7 +61,7 @@ class Panel(Window):
self.chevron_button = Button(
name="panel-button",
child=Svg(
size=18,
size=16,
svg_file=get_relative_path(
"../../config/assets/icons/chevron-right.svg"
),
@@ -84,7 +84,7 @@ class Panel(Window):
name="panel-button",
on_clicked=lambda *_: self.search_apps(),
child=Svg(
size=22,
size=20,
svg_file=get_relative_path("../../config/assets/icons/search.svg"),
),
)
@@ -98,7 +98,7 @@ class Panel(Window):
style_classes="button",
on_clicked=self.control_center.toggle_mousecapture,
child=Svg(
size=25,
size=22,
svg_file=get_relative_path(
"../../config/assets/icons/control-center.svg"
),
-7
View File
@@ -1,9 +1,7 @@
#panel {
background-color: alpha(#010101, 0.1);
border-bottom: 1px solid alpha(#010101, 0.025);
transition: all 120ms ease-in-out;
}
#panel-icon {
@@ -84,11 +82,6 @@
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 {
font-size: 17px;