From 27fcf3b03ef969a28aea0657970f41d1bddfeb00 Mon Sep 17 00:00:00 2001 From: Sassan Haradji Date: Fri, 10 May 2024 22:22:59 +0400 Subject: [PATCH] feat(ip): make the internet icon red when there is no connection #95 --- CHANGELOG.md | 1 + ubo_app/menu_app/menu_footer.py | 1 + ubo_app/services/030-ip/setup.py | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd816821..0cc28fc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - refactor(vscode): flatten vscode menu items into its main menu #102 - feat(vscode): show a notification with chime and led feedback when VSCode successfully logs in #96 +- feat(ip): make the internet icon red when there is no connection #95 ## Version 0.14.0 diff --git a/ubo_app/menu_app/menu_footer.py b/ubo_app/menu_app/menu_footer.py index bdc76bad..e4b67da3 100644 --- a/ubo_app/menu_app/menu_footer.py +++ b/ubo_app/menu_app/menu_footer.py @@ -142,6 +142,7 @@ def render_icons( font_features='fill=0', size_hint=(None, 1), width=dp(22), + markup=True, ) self.icons_layout.add_widget(label) self.icons_layout.add_widget(Widget(size_hint=(None, 1), width=dp(2))) diff --git a/ubo_app/services/030-ip/setup.py b/ubo_app/services/030-ip/setup.py index caab1282..cad4fd45 100644 --- a/ubo_app/services/030-ip/setup.py +++ b/ubo_app/services/030-ip/setup.py @@ -8,6 +8,7 @@ import psutil from constants import INTERNET_STATE_ICON_ID, INTERNET_STATE_ICON_PRIORITY +from ubo_gui.constants import DANGER_COLOR from ubo_gui.menu.types import HeadlessMenu, Item, SubMenuItem from ubo_app.store import autorun, dispatch @@ -94,7 +95,7 @@ async def check_connection() -> bool: else: dispatch( StatusIconsRegisterAction( - icon='󰪎', + icon=f'[color={DANGER_COLOR}]󰪎[/color]', priority=INTERNET_STATE_ICON_PRIORITY, id=INTERNET_STATE_ICON_ID, ),