mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
Remove old theme.py
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user