Remove old theme.py

This commit is contained in:
Thomas Farstrike
2026-01-23 23:08:58 +01:00
parent 4e95fcf348
commit 2f31d14a4e
4 changed files with 28 additions and 93 deletions
+2 -3
View File
@@ -13,7 +13,7 @@ import unittest
import lvgl as lv
import sys
import os
from mpos import MposKeyboard, wait_for_render, capture_screenshot
from mpos import MposKeyboard, wait_for_render, capture_screenshot, AppearanceManager
class TestGraphicalMposKeyboard(unittest.TestCase):
@@ -200,12 +200,11 @@ class TestGraphicalMposKeyboard(unittest.TestCase):
# Set light mode (should already be default)
import mpos.config
import mpos.ui.theme
prefs = mpos.config.SharedPreferences("theme_settings")
editor = prefs.edit()
editor.put_string("theme_light_dark", "light")
editor.commit()
mpos.ui.theme.set_theme(prefs)
AppearanceManager.set_theme(prefs)
wait_for_render(10)
# Create keyboard
+6 -5
View File
@@ -25,6 +25,7 @@ import os
from mpos import (
wait_for_render,
capture_screenshot,
AppearanceManager,
)
@@ -62,7 +63,7 @@ class TestKeyboardStyling(unittest.TestCase):
editor.commit()
# Reapply original theme
mpos.ui.theme.set_theme(prefs)
AppearanceManager.set_theme(prefs)
print("=== Test cleanup complete ===\n")
@@ -90,7 +91,7 @@ class TestKeyboardStyling(unittest.TestCase):
keyboard.set_style_min_height(160, 0)
# Apply the keyboard button fix
mpos.ui.theme.fix_keyboard_button_style(keyboard)
AppearanceManager.apply_keyboard_fix(keyboard)
# Load the screen and wait for rendering
lv.screen_load(screen)
@@ -228,7 +229,7 @@ class TestKeyboardStyling(unittest.TestCase):
editor.commit()
# Apply theme
mpos.ui.theme.set_theme(prefs)
AppearanceManager.set_theme(prefs)
wait_for_render(iterations=10)
# Create test keyboard
@@ -282,7 +283,7 @@ class TestKeyboardStyling(unittest.TestCase):
editor.commit()
# Apply theme
mpos.ui.theme.set_theme(prefs)
AppearanceManager.set_theme(prefs)
wait_for_render(iterations=10)
# Create test keyboard
@@ -335,7 +336,7 @@ class TestKeyboardStyling(unittest.TestCase):
editor.commit()
# Apply theme
mpos.ui.theme.set_theme(prefs)
AppearanceManager.set_theme(prefs)
wait_for_render(iterations=10)
# Create test keyboard