Skip to content

Commit

Permalink
Merge pull request #33 from ubopod/menu-placeholder
Browse files Browse the repository at this point in the history
Menu placeholder
  • Loading branch information
sassanh authored Apr 14, 2024
2 parents 17c9bbf + 02c58b1 commit c1eef89
Show file tree
Hide file tree
Showing 32 changed files with 236 additions and 125 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ubo_gui/assets/fonts/MaterialSymbolsOutlined[FILL,GRAD,opsz,wght].ttf filter=lfs diff=lfs merge=lfs -text
ubo_gui/assets/fonts/ filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
1 change: 0 additions & 1 deletion .github/workflows/integration_delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ jobs:
with:
packages-dir: dist
verbose: true
skip-existing: true

release:
name: Release
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Changelog

## Version 0.10.5

- refactor: enable `markup` for labels

## Version 0.10.4

- fix(menu): avoid closing all applications when a single application is closed

## Version 0.10.3

- feat(menu): add placeholder for the menu when it's empty

## Version 0.10.2

- fix(regression): keep the menu responsive even with rapid switches of the screen-manager

## Version 0.10.1

- fix: update remaining material symbols icons

## Version 0.10.0

- refactor: drop material symbols font and use `ArimoNerdFont` instead to bring
all the icons of fa, md, mdi, etc

## Version 0.9.9

- chore: update to the latest version of headless-kivy-pi 0.7.1
Expand Down
104 changes: 52 additions & 52 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ubo-gui"
version = "0.9.9"
version = "0.10.5"
description = "GUI sdk for Ubo Pod"
authors = ["Sassan Haradji <[email protected]>"]
license = "Apache-2.0"
Expand All @@ -11,10 +11,10 @@ include = ['ubo_gui/assets/fonts/*']
[tool.poetry.dependencies]
python = "^3.11"
headless-kivy-pi = [
{ version = "^0.7.1", markers = "extra=='default'", extras = [
{ version = "^0.7.2", markers = "extra=='default'", extras = [
'default',
] },
{ version = "^0.7.1", markers = "extra=='dev'", extras = [
{ version = "^0.7.2", markers = "extra=='dev'", extras = [
'dev',
] },
]
Expand All @@ -26,8 +26,8 @@ optional = true

[tool.poetry.group.dev.dependencies]
poethepoet = "^0.24.4"
pyright = "^1.1.353"
ruff = "^0.3.1"
pyright = "^1.1.355"
ruff = "^0.3.4"

[tool.poetry.extras]
dev = ['headless-kivy-pi']
Expand Down
1 change: 1 addition & 0 deletions ubo_gui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
It also defines the paths for assets and fonts used by the package.
"""

from pathlib import Path

from kivy.factory import Factory
Expand Down
12 changes: 8 additions & 4 deletions ubo_gui/app/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The main module for the Ubo GUI."""

from __future__ import annotations

import pathlib
Expand All @@ -7,7 +8,7 @@

from headless_kivy_pi import HeadlessWidget
from kivy.app import App
from kivy.core.text import LabelBase
from kivy.core.text import DEFAULT_FONT, LabelBase
from kivy.lang.builder import Builder
from kivy.metrics import dp
from kivy.properties import StringProperty
Expand All @@ -16,8 +17,11 @@
from ubo_gui import FONTS_PATH

LabelBase.register(
name='material_symbols',
fn_regular=FONTS_PATH.joinpath('MaterialSymbolsOutlined[FILL,GRAD,opsz,wght].ttf')
name=DEFAULT_FONT,
fn_regular=FONTS_PATH.joinpath('ArimoNerdFont-Regular.ttf').resolve().as_posix(),
fn_bold=FONTS_PATH.joinpath('ArimoNerdFont-Bold.ttf').resolve().as_posix(),
fn_italic=FONTS_PATH.joinpath('ArimoNerdFont-Italic.ttf').resolve().as_posix(),
fn_bolditalic=FONTS_PATH.joinpath('ArimoNerdFont-BoldItalic.ttf')
.resolve()
.as_posix(),
)
Expand Down Expand Up @@ -85,7 +89,7 @@ def title_callback(self: UboApp, _: RootWidget, title: str) -> None:
@cached_property
def header(self: UboApp) -> Widget | None:
"""The header section of the app."""
self.header_label = Label(text=self.root.title or '')
self.header_label = Label(text=self.root.title or '', markup=True)

self.root.bind(title=self.title_callback)

Expand Down
3 changes: 3 additions & 0 deletions ubo_gui/assets/fonts/ArimoNerdFont-Bold.ttf
Git LFS file not shown
3 changes: 3 additions & 0 deletions ubo_gui/assets/fonts/ArimoNerdFont-BoldItalic.ttf
Git LFS file not shown
3 changes: 3 additions & 0 deletions ubo_gui/assets/fonts/ArimoNerdFont-Italic.ttf
Git LFS file not shown
3 changes: 3 additions & 0 deletions ubo_gui/assets/fonts/ArimoNerdFont-Regular.ttf
Git LFS file not shown
1 change: 1 addition & 0 deletions ubo_gui/constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module to store constants used in the application."""

from kivy.lang.builder import Builder

PRIMARY_COLOR = '#68B7FF'
Expand Down
1 change: 1 addition & 0 deletions ubo_gui/gauge/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""A half circle gauge widget."""

from __future__ import annotations

import pathlib
Expand Down
1 change: 1 addition & 0 deletions ubo_gui/gauge/gauge_widget.kv
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
text: root.label
text_size: self.size
size_hint: 1, None
markup: True
height: dp(24)
halign: 'center'
shorten: True
Expand Down
Loading

0 comments on commit c1eef89

Please sign in to comment.