Huge updates: ControlCenter: Wi-Fi, Bluetooth, Password Entry Dialog, Notification, CustomRevealer for notif

This commit is contained in:
sankalp committed 2025-08-01 07:54:43 +05:45
1 parent 195e2d0f82
commit 10f1b25264
31 files changed
+1418 -349

No files matched your search

@@ -6,9 +6,10 @@ including fallback mechanisms for file paths and common icon locations.
"""
import os
from gi.repository import Gtk, GdkPixbuf
from fabric.system_tray.widgets import SystemTrayItem
from gi.repository import GdkPixbuf, Gtk
from fabric.system_tray.widgets import SystemTrayItem
# FIX: the tooltip should show application names instead of unknown
+19 -7
View File
@@ -3,8 +3,8 @@ from fabric.utils import get_relative_path
from fabric.widgets.box import Box
from fabric.widgets.button import Button
from fabric.widgets.svg import Svg
from services.network import NetworkService
from services.battery import Battery
from services.network import NetworkService
from utils.roam import modus_service
@@ -16,7 +16,9 @@ class BluetoothIndicator(Box):
self.bt_icon = Svg(
name="bt-icon",
size=20,
svg_file=get_relative_path("../../../config/assets/icons/applets/bluetooth-clear.svg"),
svg_file=get_relative_path(
"../../../config/assets/icons/applets/bluetooth-clear.svg"
),
)
self.bt_button = Button(name="bt-button", child=self.bt_icon)
@@ -34,14 +36,18 @@ class BluetoothIndicator(Box):
def update_state(self):
if not self.bluetooth.enabled:
self.bt_icon.set_from_file(
get_relative_path("../../../config/assets/icons/applets/bluetooth-off-clear.svg")
get_relative_path(
"../../../config/assets/icons/applets/bluetooth-off-clear.svg"
)
)
tooltip = "Bluetooth disabled"
else:
connected_devices = self.bluetooth.connected_devices
if connected_devices:
self.bt_icon.set_from_file(
get_relative_path("../../../config/assets/icons/applets/bluetooth-clear.svg")
get_relative_path(
"../../../config/assets/icons/applets/bluetooth-clear.svg"
)
)
if len(connected_devices) == 1:
device = connected_devices[0]
@@ -52,7 +58,9 @@ class BluetoothIndicator(Box):
tooltip = f"Connected to {len(connected_devices)} devices"
else:
self.bt_icon.set_from_file(
get_relative_path("../../../config/assets/icons/applets/bluetooth-clear.svg")
get_relative_path(
"../../../config/assets/icons/applets/bluetooth-clear.svg"
)
)
tooltip = "No devices connected"
@@ -104,7 +112,9 @@ class NetworkIndicator(Box):
self.network_icon = Svg(
name="network-icon",
size=22,
svg_file=get_relative_path("../../../config/assets/icons/applets/wifi-clear.svg"),
svg_file=get_relative_path(
"../../../config/assets/icons/applets/wifi-clear.svg"
),
)
self.network_button = Button(name="network-button", child=self.network_icon)
@@ -227,7 +237,9 @@ class BatteryIndicator(Box):
self.battery_icon = Svg(
name="battery-icon",
size=22,
svg_file=get_relative_path("../../../config/assets/icons/battery/battery-100.svg"),
svg_file=get_relative_path(
"../../../config/assets/icons/battery/battery-100.svg"
),
)
self.battery_button = Button(name="battery-button", child=self.battery_icon)
-1
View File
@@ -7,7 +7,6 @@ from fabric.widgets.box import Box
from fabric.widgets.button import Button
from fabric.widgets.centerbox import CenterBox
from fabric.widgets.label import Label
from modules.about import About
from utils.roam import modus_service
from widgets.dropdown import ModusDropdown, dropdown_divider
+3 -6
View File
@@ -4,22 +4,19 @@ from fabric.widgets.box import Box
from fabric.widgets.button import Button
from fabric.widgets.centerbox import CenterBox
from fabric.widgets.datetime import DateTime
from fabric.widgets.label import Label
from fabric.widgets.revealer import Revealer
from fabric.widgets.svg import Svg
from widgets.wayland import WaylandWindow as Window
from modules.controlcenter.main import ModusControlCenter
from modules.panel.components.enhanced_system_tray import apply_enhanced_system_tray
from modules.panel.components.indicators import (
BatteryIndicator,
BluetoothIndicator,
NetworkIndicator,
BatteryIndicator,
)
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
from widgets.wayland import WaylandWindow as Window
# Apply enhanced system tray icon handling
apply_enhanced_system_tray()