diff --git a/.gitattributes b/.gitattributes index b9788b6..00b8f85 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 4741216..4b10bfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 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 diff --git a/poetry.lock b/poetry.lock index 25c5662..5eb2fb7 100644 --- a/poetry.lock +++ b/poetry.lock @@ -81,13 +81,13 @@ typing-extensions = ">=4.0,<5.0" [[package]] name = "adafruit-circuitpython-requests" -version = "3.2.0" +version = "3.2.2" description = "A requests-like library for web interfacing" optional = true python-versions = "*" files = [ - {file = "adafruit-circuitpython-requests-3.2.0.tar.gz", hash = "sha256:d1e7d1c203a011c109a58681814a0c66c89e1471cc0e1c3333788ef6b30d3650"}, - {file = "adafruit_circuitpython_requests-3.2.0-py3-none-any.whl", hash = "sha256:493df4937943b35bf027b9f8a3e59b7364b06b6f01ddcc55f0ef936c809d210c"}, + {file = "adafruit-circuitpython-requests-3.2.2.tar.gz", hash = "sha256:57fabbeebed2f4dd9a7a860341a70d94d748030f9dc1b4d5df35a1b599cfb3ad"}, + {file = "adafruit_circuitpython_requests-3.2.2-py3-none-any.whl", hash = "sha256:474efb9349e9e7d6100cbc78bfbd88ca0aca4f630eff2bd4808db8b05512a859"}, ] [package.dependencies] @@ -638,38 +638,38 @@ windows-terminal = ["colorama (>=0.4.6)"] [[package]] name = "pyobjc-core" -version = "10.1" +version = "10.2" description = "Python<->ObjC Interoperability Module" optional = true python-versions = ">=3.8" files = [ - {file = "pyobjc-core-10.1.tar.gz", hash = "sha256:1844f1c8e282839e6fdcb9a9722396c1c12fb1e9331eb68828a26f28a3b2b2b1"}, - {file = "pyobjc_core-10.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:2a72a88222539ad07b5c8be411edc52ff9147d7cef311a2c849869d7bb9603fd"}, - {file = "pyobjc_core-10.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:fe1b9987b7b0437685fb529832876c2a8463500114960d4e76bb8ae96b6bf208"}, - {file = "pyobjc_core-10.1-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:9f628779c345d3abd0e20048fb0e256d894c22254577a81a6dcfdb92c3647682"}, - {file = "pyobjc_core-10.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:25a9e5a2de19238787d24cfa7def6b7fbb94bbe89c0e3109f71c1cb108e8ab44"}, - {file = "pyobjc_core-10.1-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:2d43205d3a784aa87055b84c0ec0dfa76498e5f18d1ad16bdc58a3dcf5a7d5d0"}, - {file = "pyobjc_core-10.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:0aa9799b5996a893944999a2f1afcf1de119cab3551c169ad9f54d12e1d38c99"}, + {file = "pyobjc-core-10.2.tar.gz", hash = "sha256:0153206e15d0e0d7abd53ee8a7fbaf5606602a032e177a028fc8589516a8771c"}, + {file = "pyobjc_core-10.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b8eab50ce7f17017a0f1d68c3b7e88bb1bb033415fdff62b8e0a9ee4ab72f242"}, + {file = "pyobjc_core-10.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:f2115971463073426ab926416e17e5c16de5b90d1a1f2a2d8724637eb1c21308"}, + {file = "pyobjc_core-10.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:a70546246177c23acb323c9324330e37638f1a0a3d13664abcba3bb75e43012c"}, + {file = "pyobjc_core-10.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:a9b5a215080d13bd7526031d21d5eb27a410780878d863f486053a0eba7ca9a5"}, + {file = "pyobjc_core-10.2-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:eb1ab700a44bcc4ceb125091dfaae0b998b767b49990df5fdc83eb58158d8e3f"}, + {file = "pyobjc_core-10.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c9a7163aff9c47d654f835f80361c1b112886ec754800d34e75d1e02ff52c3d7"}, ] [[package]] name = "pyobjc-framework-cocoa" -version = "10.1" +version = "10.2" description = "Wrappers for the Cocoa frameworks on macOS" optional = true python-versions = ">=3.8" files = [ - {file = "pyobjc-framework-Cocoa-10.1.tar.gz", hash = "sha256:8faaf1292a112e488b777d0c19862d993f3f384f3927dc6eca0d8d2221906a14"}, - {file = "pyobjc_framework_Cocoa-10.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:2e82c2e20b89811d92a7e6e487b6980f360b7c142e2576e90f0e7569caf8202b"}, - {file = "pyobjc_framework_Cocoa-10.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0860a9beb7e5c72a1f575679a6d1428a398fa19ad710fb116df899972912e304"}, - {file = "pyobjc_framework_Cocoa-10.1-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:34b791ea740e1afce211f19334e45469fea9a48d8fce5072e146199fd19ff49f"}, - {file = "pyobjc_framework_Cocoa-10.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1398c1a9bebad1a0f2549980e20f4aade00c341b9bac56b4493095a65917d34a"}, - {file = "pyobjc_framework_Cocoa-10.1-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:22be21226e223d26c9e77645564225787f2b12a750dd17c7ad99c36f428eda14"}, - {file = "pyobjc_framework_Cocoa-10.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:0280561f4fb98a864bd23f2c480d907b0edbffe1048654f5dfab160cea8198e6"}, + {file = "pyobjc-framework-Cocoa-10.2.tar.gz", hash = "sha256:6383141379636b13855dca1b39c032752862b829f93a49d7ddb35046abfdc035"}, + {file = "pyobjc_framework_Cocoa-10.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f9227b4f271fda2250f5a88cbc686ff30ae02c0f923bb7854bb47972397496b2"}, + {file = "pyobjc_framework_Cocoa-10.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6a6042b7703bdc33b7491959c715c1e810a3f8c7a560c94b36e00ef321480797"}, + {file = "pyobjc_framework_Cocoa-10.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:18886d5013cd7dc7ecd6e0df5134c767569b5247fc10a5e293c72ee3937b217b"}, + {file = "pyobjc_framework_Cocoa-10.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1ecf01400ee698d2e0ff4c907bcf9608d9d710e97203fbb97b37d208507a9362"}, + {file = "pyobjc_framework_Cocoa-10.2-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:0def036a7b24e3ae37a244c77bec96b7c9c8384bf6bb4d33369f0a0c8807a70d"}, + {file = "pyobjc_framework_Cocoa-10.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5f47ecc393bc1019c4b47e8653207188df784ac006ad54d8c2eb528906ff7013"}, ] [package.dependencies] -pyobjc-core = ">=10.1" +pyobjc-core = ">=10.2" [[package]] name = "pypiwin32" @@ -698,13 +698,13 @@ files = [ [[package]] name = "pyright" -version = "1.1.354" +version = "1.1.355" description = "Command line wrapper for pyright" optional = false python-versions = ">=3.7" files = [ - {file = "pyright-1.1.354-py3-none-any.whl", hash = "sha256:f28d61ae8ae035fc52ded1070e8d9e786051a26a4127bbd7a4ba0399b81b37b5"}, - {file = "pyright-1.1.354.tar.gz", hash = "sha256:b1070dc774ff2e79eb0523fe87f4ba9a90550de7e4b030a2bc9e031864029a1f"}, + {file = "pyright-1.1.355-py3-none-any.whl", hash = "sha256:bf30b6728fd68ae7d09c98292b67152858dd89738569836896df786e52b5fe48"}, + {file = "pyright-1.1.355.tar.gz", hash = "sha256:dca4104cd53d6484e6b1b50b7a239ad2d16d2ffd20030bcf3111b56f44c263bf"}, ] [package.dependencies] @@ -730,13 +730,13 @@ cp2110 = ["hidapi"] [[package]] name = "python-immutable" -version = "1.0.4" +version = "1.0.5" description = "Immutable implementation for Python using dataclasses" optional = false python-versions = ">=3.9,<4.0" files = [ - {file = "python_immutable-1.0.4-py3-none-any.whl", hash = "sha256:cd260cc92983815ff807fece3664e361592691f66373743ac5d6f96b8df5144b"}, - {file = "python_immutable-1.0.4.tar.gz", hash = "sha256:80cd10a7c4b7a871151a7584a2578bd5b89d478e6ff9f6af521d93fe2a32e5fa"}, + {file = "python_immutable-1.0.5-py3-none-any.whl", hash = "sha256:ea1309539a954ff2b527e4d175261ceddd96dd97a4bec436f5825ebb2d4f2818"}, + {file = "python_immutable-1.0.5.tar.gz", hash = "sha256:e2a30d8b4b1fe8dfe3aedc02392b0e567915b3aabbb6f57abb1689780e2ec1a4"}, ] [package.dependencies] @@ -822,28 +822,28 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "ruff" -version = "0.3.2" +version = "0.3.4" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.3.2-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:77f2612752e25f730da7421ca5e3147b213dca4f9a0f7e0b534e9562c5441f01"}, - {file = "ruff-0.3.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:9966b964b2dd1107797be9ca7195002b874424d1d5472097701ae8f43eadef5d"}, - {file = "ruff-0.3.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b83d17ff166aa0659d1e1deaf9f2f14cbe387293a906de09bc4860717eb2e2da"}, - {file = "ruff-0.3.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bb875c6cc87b3703aeda85f01c9aebdce3d217aeaca3c2e52e38077383f7268a"}, - {file = "ruff-0.3.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:be75e468a6a86426430373d81c041b7605137a28f7014a72d2fc749e47f572aa"}, - {file = "ruff-0.3.2-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:967978ac2d4506255e2f52afe70dda023fc602b283e97685c8447d036863a302"}, - {file = "ruff-0.3.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1231eacd4510f73222940727ac927bc5d07667a86b0cbe822024dd00343e77e9"}, - {file = "ruff-0.3.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2c6d613b19e9a8021be2ee1d0e27710208d1603b56f47203d0abbde906929a9b"}, - {file = "ruff-0.3.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c8439338a6303585d27b66b4626cbde89bb3e50fa3cae86ce52c1db7449330a7"}, - {file = "ruff-0.3.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:de8b480d8379620cbb5ea466a9e53bb467d2fb07c7eca54a4aa8576483c35d36"}, - {file = "ruff-0.3.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:b74c3de9103bd35df2bb05d8b2899bf2dbe4efda6474ea9681280648ec4d237d"}, - {file = "ruff-0.3.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:f380be9fc15a99765c9cf316b40b9da1f6ad2ab9639e551703e581a5e6da6745"}, - {file = "ruff-0.3.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:0ac06a3759c3ab9ef86bbeca665d31ad3aa9a4b1c17684aadb7e61c10baa0df4"}, - {file = "ruff-0.3.2-py3-none-win32.whl", hash = "sha256:9bd640a8f7dd07a0b6901fcebccedadeb1a705a50350fb86b4003b805c81385a"}, - {file = "ruff-0.3.2-py3-none-win_amd64.whl", hash = "sha256:0c1bdd9920cab5707c26c8b3bf33a064a4ca7842d91a99ec0634fec68f9f4037"}, - {file = "ruff-0.3.2-py3-none-win_arm64.whl", hash = "sha256:5f65103b1d76e0d600cabd577b04179ff592064eaa451a70a81085930e907d0b"}, - {file = "ruff-0.3.2.tar.gz", hash = "sha256:fa78ec9418eb1ca3db392811df3376b46471ae93792a81af2d1cbb0e5dcb5142"}, + {file = "ruff-0.3.4-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:60c870a7d46efcbc8385d27ec07fe534ac32f3b251e4fc44b3cbfd9e09609ef4"}, + {file = "ruff-0.3.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:6fc14fa742e1d8f24910e1fff0bd5e26d395b0e0e04cc1b15c7c5e5fe5b4af91"}, + {file = "ruff-0.3.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d3ee7880f653cc03749a3bfea720cf2a192e4f884925b0cf7eecce82f0ce5854"}, + {file = "ruff-0.3.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cf133dd744f2470b347f602452a88e70dadfbe0fcfb5fd46e093d55da65f82f7"}, + {file = "ruff-0.3.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3f3860057590e810c7ffea75669bdc6927bfd91e29b4baa9258fd48b540a4365"}, + {file = "ruff-0.3.4-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:986f2377f7cf12efac1f515fc1a5b753c000ed1e0a6de96747cdf2da20a1b369"}, + {file = "ruff-0.3.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c4fd98e85869603e65f554fdc5cddf0712e352fe6e61d29d5a6fe087ec82b76c"}, + {file = "ruff-0.3.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:64abeed785dad51801b423fa51840b1764b35d6c461ea8caef9cf9e5e5ab34d9"}, + {file = "ruff-0.3.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:df52972138318bc7546d92348a1ee58449bc3f9eaf0db278906eb511889c4b50"}, + {file = "ruff-0.3.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:98e98300056445ba2cc27d0b325fd044dc17fcc38e4e4d2c7711585bd0a958ed"}, + {file = "ruff-0.3.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:519cf6a0ebed244dce1dc8aecd3dc99add7a2ee15bb68cf19588bb5bf58e0488"}, + {file = "ruff-0.3.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:bb0acfb921030d00070539c038cd24bb1df73a2981e9f55942514af8b17be94e"}, + {file = "ruff-0.3.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:cf187a7e7098233d0d0c71175375c5162f880126c4c716fa28a8ac418dcf3378"}, + {file = "ruff-0.3.4-py3-none-win32.whl", hash = "sha256:af27ac187c0a331e8ef91d84bf1c3c6a5dea97e912a7560ac0cef25c526a4102"}, + {file = "ruff-0.3.4-py3-none-win_amd64.whl", hash = "sha256:de0d5069b165e5a32b3c6ffbb81c350b1e3d3483347196ffdf86dc0ef9e37dd6"}, + {file = "ruff-0.3.4-py3-none-win_arm64.whl", hash = "sha256:6810563cc08ad0096b57c717bd78aeac888a1bfd38654d9113cb3dc4d3f74232"}, + {file = "ruff-0.3.4.tar.gz", hash = "sha256:f0f4484c6541a99862b693e13a151435a279b271cff20e37101116a21e2a1ad1"}, ] [[package]] @@ -923,4 +923,4 @@ dev = ["headless-kivy-pi", "headless-kivy-pi"] [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "ec58be2163424ff91cf37e074044fc4bc812e5d70269c2dd1dbc73a01c4f3f61" +content-hash = "7524961ddc4a0192ec00a9448f2ce73a2ce7c38f775336f77947eb621687adeb" diff --git a/pyproject.toml b/pyproject.toml index 3b782ad..d3029db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "ubo-gui" -version = "0.9.9" +version = "0.10.0" description = "GUI sdk for Ubo Pod" authors = ["Sassan Haradji "] license = "Apache-2.0" @@ -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'] diff --git a/ubo_gui/__init__.py b/ubo_gui/__init__.py index a6dd48c..830c0f6 100644 --- a/ubo_gui/__init__.py +++ b/ubo_gui/__init__.py @@ -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 diff --git a/ubo_gui/app/__init__.py b/ubo_gui/app/__init__.py index aef6ab1..c7c7441 100644 --- a/ubo_gui/app/__init__.py +++ b/ubo_gui/app/__init__.py @@ -1,4 +1,5 @@ """The main module for the Ubo GUI.""" + from __future__ import annotations import pathlib @@ -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 @@ -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(), ) diff --git a/ubo_gui/assets/fonts/ArimoNerdFont-Bold.ttf b/ubo_gui/assets/fonts/ArimoNerdFont-Bold.ttf new file mode 100644 index 0000000..b79be06 --- /dev/null +++ b/ubo_gui/assets/fonts/ArimoNerdFont-Bold.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8e248acce9ec2ef1763d0acd392c43a321e36ecf6c8340dba26402ebf063cda +size 2269504 diff --git a/ubo_gui/assets/fonts/ArimoNerdFont-BoldItalic.ttf b/ubo_gui/assets/fonts/ArimoNerdFont-BoldItalic.ttf new file mode 100644 index 0000000..002825b --- /dev/null +++ b/ubo_gui/assets/fonts/ArimoNerdFont-BoldItalic.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b849c38730f190914cc36a2888ade5ef5f3100fb8b5498e110774f932838ad80 +size 2290728 diff --git a/ubo_gui/assets/fonts/ArimoNerdFont-Italic.ttf b/ubo_gui/assets/fonts/ArimoNerdFont-Italic.ttf new file mode 100644 index 0000000..4de75a4 --- /dev/null +++ b/ubo_gui/assets/fonts/ArimoNerdFont-Italic.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd24ed882ffb97f499b99ca0b8852ac3a85882d36ae9882058d29cde2d907988 +size 2289072 diff --git a/ubo_gui/assets/fonts/ArimoNerdFont-Regular.ttf b/ubo_gui/assets/fonts/ArimoNerdFont-Regular.ttf new file mode 100644 index 0000000..3035892 --- /dev/null +++ b/ubo_gui/assets/fonts/ArimoNerdFont-Regular.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:058da8c9541339466ccd2ef704fe0500d3f8be5d976f5a8f76437843617e2e9b +size 2268476 diff --git a/ubo_gui/constants.py b/ubo_gui/constants.py index eb3d25d..0944add 100644 --- a/ubo_gui/constants.py +++ b/ubo_gui/constants.py @@ -1,4 +1,5 @@ """Module to store constants used in the application.""" + from kivy.lang.builder import Builder PRIMARY_COLOR = '#68B7FF' diff --git a/ubo_gui/gauge/__init__.py b/ubo_gui/gauge/__init__.py index 3783295..789c929 100644 --- a/ubo_gui/gauge/__init__.py +++ b/ubo_gui/gauge/__init__.py @@ -1,4 +1,5 @@ """A half circle gauge widget.""" + from __future__ import annotations import pathlib diff --git a/ubo_gui/menu/__init__.py b/ubo_gui/menu/__init__.py index 8e93020..3e14dfe 100644 --- a/ubo_gui/menu/__init__.py +++ b/ubo_gui/menu/__init__.py @@ -5,6 +5,7 @@ with its sub items. Each item can optionally be styled differently. """ + from __future__ import annotations import math diff --git a/ubo_gui/menu/constants.py b/ubo_gui/menu/constants.py index 80e6cfb..1750b7b 100644 --- a/ubo_gui/menu/constants.py +++ b/ubo_gui/menu/constants.py @@ -1,4 +1,5 @@ """Module for defining constants used in the `Menu` widget.""" + from kivy.lang.builder import Builder from ubo_gui.page import PAGE_MAX_ITEMS diff --git a/ubo_gui/menu/transitions.py b/ubo_gui/menu/transitions.py index 968351c..e3ee082 100644 --- a/ubo_gui/menu/transitions.py +++ b/ubo_gui/menu/transitions.py @@ -1,4 +1,5 @@ """Provides easy access to different transitions.""" + from __future__ import annotations import threading @@ -6,7 +7,7 @@ from typing import Any from headless_kivy_pi import HeadlessWidget -from kivy.clock import Clock, mainthread +from kivy.clock import mainthread from kivy.uix.screenmanager import ( NoTransition, Screen, @@ -59,7 +60,7 @@ def _handle_transition_complete( and transition is not self._no_transition ): duration = 0.1 - Clock.schedule_once( + mainthread( lambda *_: self.screen_manager.switch_to( screen, transition=transition, diff --git a/ubo_gui/menu/types.py b/ubo_gui/menu/types.py index e2f08ae..ce9f1ed 100644 --- a/ubo_gui/menu/types.py +++ b/ubo_gui/menu/types.py @@ -1,4 +1,5 @@ """Class definition of main datatypes use in menus.""" + from __future__ import annotations from typing import ( @@ -188,16 +189,14 @@ def is_subscribeable(value: object) -> TypeGuard[Subscribable]: def process_subscribable_value( value: T | Callable[[], T], callback: Callable[[T], None], -) -> Callable[[], None]: - ... +) -> Callable[[], None]: ... @overload def process_subscribable_value( # pyright: ignore[reportOverlappingOverload] value: T | None | Callable[[], T | None], callback: Callable[[T | None], None], -) -> Callable[[], None]: - ... +) -> Callable[[], None]: ... def process_subscribable_value( diff --git a/ubo_gui/menu/widgets/header_menu_page_widget.py b/ubo_gui/menu/widgets/header_menu_page_widget.py index 6036e7d..cf5d985 100644 --- a/ubo_gui/menu/widgets/header_menu_page_widget.py +++ b/ubo_gui/menu/widgets/header_menu_page_widget.py @@ -1,4 +1,5 @@ """Module for the `HeaderMenuPageWidget` class.""" + from __future__ import annotations import pathlib diff --git a/ubo_gui/menu/widgets/item_widget.kv b/ubo_gui/menu/widgets/item_widget.kv index 93a9255..735a16a 100644 --- a/ubo_gui/menu/widgets/item_widget.kv +++ b/ubo_gui/menu/widgets/item_widget.kv @@ -24,7 +24,6 @@ color: root.color font_size: dp(26) text: root.icon if root.icon is not None else '' - font_name: 'material_symbols' size_hint: None, 1 width: self.parent.height - dp(25) valign: 'middle' diff --git a/ubo_gui/menu/widgets/item_widget.py b/ubo_gui/menu/widgets/item_widget.py index 6a955bc..382cfe9 100644 --- a/ubo_gui/menu/widgets/item_widget.py +++ b/ubo_gui/menu/widgets/item_widget.py @@ -1,4 +1,5 @@ """Implement `ItemWidget`.""" + from __future__ import annotations import pathlib diff --git a/ubo_gui/menu/widgets/normal_menu_page_widget.py b/ubo_gui/menu/widgets/normal_menu_page_widget.py index c548ac5..df535c2 100644 --- a/ubo_gui/menu/widgets/normal_menu_page_widget.py +++ b/ubo_gui/menu/widgets/normal_menu_page_widget.py @@ -1,4 +1,5 @@ """Module for the `NormalMenuPageWidget` class.""" + import pathlib from kivy.lang.builder import Builder diff --git a/ubo_gui/notification/__init__.py b/ubo_gui/notification/__init__.py index e3c1084..474ac3d 100644 --- a/ubo_gui/notification/__init__.py +++ b/ubo_gui/notification/__init__.py @@ -1,4 +1,5 @@ """Notification widget.""" + from __future__ import annotations import pathlib diff --git a/ubo_gui/notification/notification_widget.kv b/ubo_gui/notification/notification_widget.kv index db7d311..0af6dfb 100644 --- a/ubo_gui/notification/notification_widget.kv +++ b/ubo_gui/notification/notification_widget.kv @@ -34,7 +34,6 @@ height: dp(60) font_size: dp(52) text: root.icon - font_name: 'material_symbols' Label: font_size: dp(22) diff --git a/ubo_gui/page/__init__.py b/ubo_gui/page/__init__.py index f02e3e2..9b9b3ba 100644 --- a/ubo_gui/page/__init__.py +++ b/ubo_gui/page/__init__.py @@ -1,4 +1,5 @@ """Module containing the `PageWidget` class.""" + from __future__ import annotations import warnings diff --git a/ubo_gui/prompt/__init__.py b/ubo_gui/prompt/__init__.py index a41bc0f..7f99d2f 100644 --- a/ubo_gui/prompt/__init__.py +++ b/ubo_gui/prompt/__init__.py @@ -2,6 +2,7 @@ A widget that renders a prompt with two options. """ + from __future__ import annotations import pathlib diff --git a/ubo_gui/prompt/prompt_widget.kv b/ubo_gui/prompt/prompt_widget.kv index 356d102..69cf9b5 100644 --- a/ubo_gui/prompt/prompt_widget.kv +++ b/ubo_gui/prompt/prompt_widget.kv @@ -17,17 +17,16 @@ height: dp(50) if root.icon is not None else dp(0) font_size: dp(30) text: root.icon if root.icon is not None else '' - font_name: 'material_symbols' Label: text: root.prompt text_size: self.size - font_size: dp(20) + font_size: dp(18) halign: 'center' valign: 'middle' color: 1, 1, 1 size_hint: 1, None - height: dp(30) + height: dp(20) shorten: True shorten_from: 'right' diff --git a/ubo_gui/qrcode/__init__.py b/ubo_gui/qrcode/__init__.py index 0676d69..c51b613 100644 --- a/ubo_gui/qrcode/__init__.py +++ b/ubo_gui/qrcode/__init__.py @@ -1,4 +1,5 @@ """QRCodeWidget class module.""" + from __future__ import annotations import io diff --git a/ubo_gui/volume/__init__.py b/ubo_gui/volume/__init__.py index 68cafe6..69dc71f 100644 --- a/ubo_gui/volume/__init__.py +++ b/ubo_gui/volume/__init__.py @@ -1,4 +1,5 @@ """A widget that displays a volume bar.""" + from __future__ import annotations import pathlib diff --git a/ubo_gui/volume/volume_widget.kv b/ubo_gui/volume/volume_widget.kv index 9e8e19b..48a7aea 100644 --- a/ubo_gui/volume/volume_widget.kv +++ b/ubo_gui/volume/volume_widget.kv @@ -23,8 +23,7 @@ minimum_width: dp(25) Label: - font_name: 'material_symbols' - text: 'volume_up' + text: '' size_hint: 1, None height: dp(24) @@ -32,7 +31,6 @@ size_hint: 0, 1 Label: - font_name: 'material_symbols' - text: 'volume_down' + text: '' size_hint: 1, None height: dp(24)