Skip to content

Commit e916515

Browse files
Update logo
1 parent 6913fef commit e916515

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
5.5 KB
Loading

internal_filesystem/lib/mpos/ui/display.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
_vertical_resolution = None
77
_dpi = None
88

9-
logo_url="M:lib/assets/MicroPythonOS-logo-white-long-w240.png" # change this
9+
logo_url = "M:builtin/res/mipmap-mdpi/MicroPythonOS_logo_white_on_black_240x54.png"
1010

1111
def init_rootscreen():
1212
global _horizontal_resolution, _vertical_resolution, _dpi
@@ -22,9 +22,12 @@ def init_rootscreen():
2222
if _is_light_mode:
2323
img.set_blend_mode(lv.BLEND_MODE.DIFFERENCE) # invert the logo color
2424
img.center()
25-
except: # if image loading fails
25+
except Exception as e: # if image loading fails
26+
print(f"Falling back to text-based logo because image loading failed: {e}")
27+
screen.clean()
2628
label = lv.label(screen)
2729
label.set_text("MicroPythonOS")
30+
label.set_style_text_font(lv.font_montserrat_20, lv.PART.MAIN)
2831
label.center()
2932

3033
def get_pointer_xy():

0 commit comments

Comments
 (0)