Skip to content

Commit df51526

Browse files
Camera app: reduce vertical screen usage
1 parent 4a8f11d commit df51526

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

internal_filesystem/apps/com.micropythonos.camera/assets/camera_settings.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,16 +165,17 @@ def create_checkbox(self, parent, label_text, default_val, pref_key):
165165
def create_dropdown(self, parent, label_text, options, default_idx, pref_key):
166166
"""Create dropdown with label."""
167167
cont = lv.obj(parent)
168-
cont.set_size(lv.pct(100), 60)
169-
cont.set_style_pad_all(3, 0)
168+
cont.set_size(lv.pct(100), lv.SIZE_CONTENT)
169+
cont.set_style_pad_all(2, 0)
170170

171171
label = lv.label(cont)
172172
label.set_text(label_text)
173-
label.align(lv.ALIGN.TOP_LEFT, 0, 0)
173+
label.set_size(lv.pct(50), lv.SIZE_CONTENT)
174+
label.align(lv.ALIGN.LEFT_MID, 0, 0)
174175

175176
dropdown = lv.dropdown(cont)
176-
dropdown.set_size(lv.pct(90), 30)
177-
dropdown.align(lv.ALIGN.BOTTOM_LEFT, 0, 0)
177+
dropdown.set_size(lv.pct(50), lv.SIZE_CONTENT)
178+
dropdown.align(lv.ALIGN.RIGHT_MID, 0, 0)
178179

179180
options_str = "\n".join([text for text, _ in options])
180181
dropdown.set_options(options_str)

0 commit comments

Comments
 (0)