Fix dropdown graphical issues.
The scrollbar would go out of bounds if DROPDOWN_PART_LIST had uneven padding. Also enable clip_corner feature to stop the selected item from overflowing.
This commit is contained in:
@@ -47,8 +47,6 @@ Metronome::Metronome(DisplayApp* app, Controllers::MotorController& motorControl
|
||||
bpbDropdown = lv_dropdown_create(lv_scr_act(), nullptr);
|
||||
bpbDropdown->user_data = this;
|
||||
lv_obj_set_event_cb(bpbDropdown, eventHandler);
|
||||
lv_obj_set_style_local_pad_left(bpbDropdown, LV_DROPDOWN_PART_MAIN, LV_STATE_DEFAULT, 20);
|
||||
lv_obj_set_style_local_pad_left(bpbDropdown, LV_DROPDOWN_PART_LIST, LV_STATE_DEFAULT, 20);
|
||||
lv_obj_set_size(bpbDropdown, 115, 50);
|
||||
lv_obj_align(bpbDropdown, lv_scr_act(), LV_ALIGN_IN_BOTTOM_LEFT, 0, 0);
|
||||
lv_dropdown_set_options(bpbDropdown, "1\n2\n3\n4\n5\n6\n7\n8\n9");
|
||||
|
Reference in New Issue
Block a user