You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
appstore: less borders
This commit is contained in:
@@ -80,12 +80,16 @@ class AppStore(Activity):
|
||||
print("create_apps_list")
|
||||
default_icon_dsc = self.load_icon("builtin/res/mipmap-mdpi/default_icon_64x64.png")
|
||||
apps_list = lv.list(self.main_screen)
|
||||
apps_list.set_style_border_width(0, 0)
|
||||
apps_list.set_style_radius(0, 0)
|
||||
apps_list.set_style_pad_all(0, 0)
|
||||
apps_list.set_size(lv.pct(100), lv.pct(100))
|
||||
print("create_apps_list iterating")
|
||||
for app in self.apps:
|
||||
item = apps_list.add_button(None, "Test")
|
||||
item.set_style_pad_all(0, 0)
|
||||
#item.set_style_border_width(0, 0)
|
||||
#item.set_style_radius(0, 0)
|
||||
item.set_size(lv.pct(100), lv.SIZE_CONTENT)
|
||||
item.add_event_cb(lambda e, a=app: self.show_app_detail(a), lv.EVENT.CLICKED, None)
|
||||
cont = lv.obj(item)
|
||||
@@ -93,12 +97,16 @@ class AppStore(Activity):
|
||||
cont.set_flex_flow(lv.FLEX_FLOW.ROW)
|
||||
cont.set_size(lv.pct(100), lv.SIZE_CONTENT)
|
||||
cont.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF)
|
||||
cont.set_style_border_width(0, 0)
|
||||
cont.set_style_radius(0, 0)
|
||||
cont.add_event_cb(lambda e, a=app: self.show_app_detail(a), lv.EVENT.CLICKED, None)
|
||||
icon_spacer = lv.image(cont)
|
||||
icon_spacer.set_size(64, 64)
|
||||
app.image = icon_spacer
|
||||
icon_spacer.add_event_cb(lambda e, a=app: self.show_app_detail(a), lv.EVENT.CLICKED, None)
|
||||
label_cont = lv.obj(cont)
|
||||
label_cont.set_style_border_width(0, 0)
|
||||
label_cont.set_style_radius(0, 0)
|
||||
label_cont.set_flex_flow(lv.FLEX_FLOW.COLUMN)
|
||||
label_cont.set_size(lv.pct(75), lv.SIZE_CONTENT)
|
||||
label_cont.add_event_cb(lambda e, a=app: self.show_app_detail(a), lv.EVENT.CLICKED, None)
|
||||
@@ -180,11 +188,14 @@ class AppDetail(Activity):
|
||||
print("Creating app detail screen...")
|
||||
app = self.getIntent().extras.get("app")
|
||||
app_detail_screen = lv.obj()
|
||||
app_detail_screen.set_style_pad_all(5, 0)
|
||||
app_detail_screen.set_size(lv.pct(100), lv.pct(100))
|
||||
app_detail_screen.set_pos(0, 40)
|
||||
app_detail_screen.set_flex_flow(lv.FLEX_FLOW.COLUMN)
|
||||
#
|
||||
headercont = lv.obj(app_detail_screen)
|
||||
headercont.set_style_border_width(0, 0)
|
||||
#headercont.set_style_radius(0, 0)
|
||||
headercont.set_style_pad_all(0, 0)
|
||||
headercont.set_flex_flow(lv.FLEX_FLOW.ROW)
|
||||
headercont.set_size(lv.pct(100), lv.SIZE_CONTENT)
|
||||
@@ -195,6 +206,8 @@ class AppDetail(Activity):
|
||||
icon_spacer.set_size(64, 64)
|
||||
#
|
||||
detail_cont = lv.obj(headercont)
|
||||
detail_cont.set_style_border_width(0, 0)
|
||||
detail_cont.set_style_radius(0, 0)
|
||||
detail_cont.set_style_pad_all(0, 0)
|
||||
detail_cont.set_flex_flow(lv.FLEX_FLOW.COLUMN)
|
||||
detail_cont.set_size(lv.pct(75), lv.SIZE_CONTENT)
|
||||
@@ -211,6 +224,8 @@ class AppDetail(Activity):
|
||||
self.progress_bar.add_flag(lv.obj.FLAG.HIDDEN)
|
||||
# Always have this button:
|
||||
buttoncont = lv.obj(app_detail_screen)
|
||||
buttoncont.set_style_border_width(0, 0)
|
||||
buttoncont.set_style_radius(0, 0)
|
||||
buttoncont.set_style_pad_all(0, 0)
|
||||
buttoncont.set_flex_flow(lv.FLEX_FLOW.ROW)
|
||||
buttoncont.set_size(lv.pct(100), lv.SIZE_CONTENT)
|
||||
|
||||
Reference in New Issue
Block a user