From 0aded1d58ef9b6261c2b5a2be932099dc7779902 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Wed, 11 Feb 2026 22:12:31 +0100 Subject: [PATCH] OSUpdate app: improve style in portrait mode --- CHANGELOG.md | 6 +++--- .../com.micropythonos.osupdate/assets/osupdate.py | 12 +++++++----- internal_filesystem/lib/mpos/board/linux.py | 4 ++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3353f8c..b10d37c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,16 +3,16 @@ Builtin Apps: - About: use logger framework -- Launcher: fit at least 3 apps per row on a 240px display -- OSUpdate: replace 'force update' checkbox with improved button labels +- Launcher: improve layout on different screen width sizes +- OSUpdate: remove 'force update' checkbox in favor of varying button labels Frameworks: - SDCard: add support for SDIO/SD/MMC mode - CameraManager and CameraActivity: work fully camera-agnostic OS: -- Scale MicroPythonOS boot logo down if necessary - Add board support: MaTouch ESP32-S3 SPI IPS 2.8' with Camera OV3660 +- Scale MicroPythonOS boot logo down if necessary - UI: Don't show battery icon if not present - Move logging.py to subdirectory diff --git a/internal_filesystem/builtin/apps/com.micropythonos.osupdate/assets/osupdate.py b/internal_filesystem/builtin/apps/com.micropythonos.osupdate/assets/osupdate.py index c7d85f2d..0a8ef53d 100644 --- a/internal_filesystem/builtin/apps/com.micropythonos.osupdate/assets/osupdate.py +++ b/internal_filesystem/builtin/apps/com.micropythonos.osupdate/assets/osupdate.py @@ -46,13 +46,15 @@ class OSUpdate(Activity): self.current_version_label = lv.label(self.main_screen) self.current_version_label.align(lv.ALIGN.TOP_LEFT,0,0) self.current_version_label.set_text(f"Installed OS version: {BuildInfo.version.release}") + self.current_version_label.set_width(lv.pct(75)) + self.current_version_label.set_long_mode(lv.label.LONG_MODE.WRAP) self.install_button = lv.button(self.main_screen) self.install_button.align(lv.ALIGN.TOP_RIGHT, 0, 0) self.install_button.add_state(lv.STATE.DISABLED) # button will be enabled if there is an update available self.install_button.set_size(lv.SIZE_CONTENT, lv.pct(25)) self.install_button.add_event_cb(lambda e: self.install_button_click(), lv.EVENT.CLICKED, None) install_label = lv.label(self.install_button) - install_label.set_text("Update OS") + install_label.set_text("No\nUpdate") install_label.center() # Check Again button (hidden initially, shown on errors) @@ -221,15 +223,15 @@ class OSUpdate(Activity): # Determine button text based on version comparison if is_newer > 0: # Update version > installed OS version - button_text = "Update OS" + button_text = "Install\nnew\version" label = "newer" elif is_older > 0: # Update version < installed OS version - button_text = "Install\nolder version" + button_text = "Install\nolder\nversion" label = "older" else: # Update version == installed OS version (neither is newer than the other) - button_text = "Reinstall\nsame version" + button_text = "Reinstall\nsame\nversion" label = "the same version" # Update button text and enable it @@ -238,7 +240,7 @@ class OSUpdate(Activity): install_label.center() self.install_button.remove_state(lv.STATE.DISABLED) - self.status_label.set_text(f"Available version: {version}\nis {label}.\n\nDetails:\n\n{changelog}") + self.status_label.set_text(f"Update version: {version}\nUpdate version is {label}.\n\nDetails:\n\n{changelog}") def install_button_click(self): diff --git a/internal_filesystem/lib/mpos/board/linux.py b/internal_filesystem/lib/mpos/board/linux.py index d335f220..2705ca8e 100644 --- a/internal_filesystem/lib/mpos/board/linux.py +++ b/internal_filesystem/lib/mpos/board/linux.py @@ -18,8 +18,8 @@ TFT_VER_RES=240 #TFT_VER_RES=240 # Makerfabs / Matouch -TFT_HOR_RES=240 -TFT_VER_RES=320 +#TFT_HOR_RES=240 +#TFT_VER_RES=320 # Bigger screen #TFT_HOR_RES=640