feat(root): add OSD module and clean up CSS imports
New Features - Introduced OSD functionality integrated into the application. Enhancements - Removed unused stylesheet imports from main.css and corrected the stylesheet path to `styles/main.css`. - Adjusted the lambda in the network service for consistent method invocation. Bug Fixes - Ensured `on_access_point_activated` is properly called when the active access point changes.
This commit is contained in:
3 files changed
+7
-43
No files matched your search
@@ -1,34 +0,0 @@
|
||||
@import url("./styles/colors.css");
|
||||
@import url("./styles/panel.css");
|
||||
@import url("./styles/dock.css");
|
||||
@import url("./styles/switcher.css");
|
||||
@import url("./styles/launcher.css");
|
||||
@import url("./styles/osd.css");
|
||||
@import url("./styles/controlcenter.css");
|
||||
@import url("./styles/notification.css");
|
||||
@import url("./styles/dropdown.css");
|
||||
@import url("./styles/about.css");
|
||||
@import url("./styles/notification-center.css");
|
||||
@import url("./styles/player.css");
|
||||
@import url("./styles/widgets.css");
|
||||
@import url("./styles/tray.css");
|
||||
@import url("./styles/battery-widget.css");
|
||||
@import url("./styles/lock.css");
|
||||
@import url("./styles/todo.css");
|
||||
|
||||
* {
|
||||
all: unset;
|
||||
color: var(--foreground);
|
||||
font-size: unset;
|
||||
font-family: "SF Pro Rounded";
|
||||
}
|
||||
|
||||
#corner {
|
||||
background-color: var(--shadow);
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#corner-container {
|
||||
min-width: 20px;
|
||||
min-height: 20px;
|
||||
}
|
||||
@@ -4,6 +4,7 @@ from fabric.utils import get_relative_path, logger, monitor_file
|
||||
from config.data import APP_NAME
|
||||
from modules.desktop.widget import Deskwidgets
|
||||
from modules.notification.notification import ModusNoti
|
||||
from modules.osd import OSD
|
||||
from modules.panel.main import Panel
|
||||
from utils.functions import set_process_name
|
||||
|
||||
@@ -28,21 +29,16 @@ if __name__ == "__main__":
|
||||
panel = Panel()
|
||||
modusnoti = ModusNoti()
|
||||
deskwidget = Deskwidgets()
|
||||
|
||||
osd = OSD()
|
||||
# Monitor CSS files for changes
|
||||
css_file = monitor_file(get_relative_path("styles"))
|
||||
_ = css_file.connect("changed", lambda *_: set_css())
|
||||
|
||||
app = Application(
|
||||
f"{APP_NAME}",
|
||||
panel,
|
||||
modusnoti,
|
||||
deskwidget,
|
||||
)
|
||||
app = Application(f"{APP_NAME}", panel, modusnoti, deskwidget, osd)
|
||||
|
||||
def set_css():
|
||||
app.set_stylesheet_from_file(
|
||||
get_relative_path("main.css"),
|
||||
get_relative_path("styles/main.css"),
|
||||
)
|
||||
|
||||
app.set_css = set_css
|
||||
|
||||
+3
-1
@@ -339,7 +339,9 @@ class Wifi(Service):
|
||||
bulk_connect(
|
||||
self._device,
|
||||
{
|
||||
"notify::active-access-point": lambda *args: self.on_access_point_activated(),
|
||||
"notify::active-access-point": lambda *args: (
|
||||
self.on_access_point_activated()
|
||||
),
|
||||
"access-point-added": lambda _, ap: self.on_access_point_added(ap=ap),
|
||||
"access-point-removed": lambda _, ap: self.on_access_point_removed(
|
||||
ap=ap
|
||||
|
||||
Reference in new issue
Block a user