Skip to content

Commit

Permalink
feat(ip): make the internet icon red when there is no connection #95
Browse files Browse the repository at this point in the history
  • Loading branch information
sassanh committed May 10, 2024
1 parent c69405f commit 5ca55f2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions ubo_app/menu_app/menu_footer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down
3 changes: 2 additions & 1 deletion ubo_app/services/030-ip/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
),
Expand Down

0 comments on commit 5ca55f2

Please sign in to comment.