Various improvements and fixes (#128)
- Fix for display orientation assumption in Display app - Update logo (added colours) - Fix for double stopping the Files app - Deny registration of apps and services that are already registered - Updated `ideas.md` for these changes - Other cleanup
This commit is contained in:
committed by
GitHub
parent
1b89065c99
commit
49bf8e824c
@@ -49,8 +49,10 @@ static void onShow(TT_UNUSED AppContext& app, lv_obj_t* parent) {
|
||||
lv_obj_set_flex_grow(wrapper, 1);
|
||||
|
||||
auto* display = lv_obj_get_display(parent);
|
||||
auto orientation = lv_display_get_rotation(display);
|
||||
if (orientation == LV_DISPLAY_ROTATION_0 || orientation == LV_DISPLAY_ROTATION_180) {
|
||||
auto horizontal_px = lv_display_get_horizontal_resolution(display);
|
||||
auto vertical_px = lv_display_get_vertical_resolution(display);
|
||||
bool is_landscape_display = horizontal_px > vertical_px;
|
||||
if (is_landscape_display) {
|
||||
lv_obj_set_flex_flow(wrapper, LV_FLEX_FLOW_ROW);
|
||||
} else {
|
||||
lv_obj_set_flex_flow(wrapper, LV_FLEX_FLOW_COLUMN);
|
||||
|
||||
Reference in New Issue
Block a user