mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-04-21 02:45:07 +00:00
Fix for launcher in vertical mode
This commit is contained in:
parent
45e16e7e4f
commit
e16e8ac906
@ -115,8 +115,14 @@ public:
|
|||||||
lv_obj_set_flex_flow(buttons_wrapper, LV_FLEX_FLOW_COLUMN);
|
lv_obj_set_flex_flow(buttons_wrapper, LV_FLEX_FLOW_COLUMN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t margin;
|
||||||
|
if (is_landscape_display) {
|
||||||
const int32_t available_width = std::max<int32_t>(0, lv_display_get_horizontal_resolution(display) - (3 * button_size));
|
const int32_t available_width = std::max<int32_t>(0, lv_display_get_horizontal_resolution(display) - (3 * button_size));
|
||||||
const int32_t margin = is_landscape_display ? std::min<int32_t>(available_width / 16, button_size) : 0;
|
margin = std::min<int32_t>(available_width / 16, button_size);
|
||||||
|
} else {
|
||||||
|
const int32_t available_height = std::max<int32_t>(0, lv_display_get_vertical_resolution(display) - (3 * button_size));
|
||||||
|
margin = std::min<int32_t>(available_height / 16, button_size);
|
||||||
|
}
|
||||||
|
|
||||||
const auto paths = app.getPaths();
|
const auto paths = app.getPaths();
|
||||||
const auto apps_icon_path = lvgl::PATH_PREFIX + paths->getAssetsPath("icon_apps.png");
|
const auto apps_icon_path = lvgl::PATH_PREFIX + paths->getAssetsPath("icon_apps.png");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user