Implement UI scaling and more (#501)
**New Features** * Runtime font accessors and new symbol fonts for text, launcher, statusbar, and shared icons. * Added font height base setting to device.properties * Text fonts now have 3 sizes: small, default, large **Improvements** * Renamed `UiScale` to `UiDensity` * Statusbar, toolbar and many UI components now compute heights and spacing from fonts/density. * SSD1306 initialization sequence refined for more stable startup. * Multiple image assets replaced by symbol-font rendering. * Many layout improvements related to density, font scaling and icon scaling * Updated folder name capitalization for newer style
This commit is contained in:
committed by
GitHub
parent
72c9b2b113
commit
9a11e6f47b
@@ -109,7 +109,7 @@ class TrackballSettingsApp final : public App {
|
||||
public:
|
||||
void onShow(AppContext& app, lv_obj_t* parent) override {
|
||||
tbSettings = settings::trackball::loadOrGetDefault();
|
||||
auto ui_scale = hal::getConfiguration()->uiScale;
|
||||
auto ui_density = hal::getConfiguration()->uiDensity;
|
||||
updated = false;
|
||||
|
||||
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
|
||||
@@ -154,7 +154,7 @@ public:
|
||||
lv_obj_set_size(enc_sens_wrapper, LV_PCT(100), LV_SIZE_CONTENT);
|
||||
lv_obj_set_style_pad_hor(enc_sens_wrapper, 0, LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(enc_sens_wrapper, 0, LV_STATE_DEFAULT);
|
||||
if (ui_scale != hal::UiScale::Smallest) {
|
||||
if (ui_density != hal::UiDensity::Compact) {
|
||||
lv_obj_set_style_pad_ver(enc_sens_wrapper, 4, LV_STATE_DEFAULT);
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ public:
|
||||
lv_obj_set_size(ptr_sens_wrapper, LV_PCT(100), LV_SIZE_CONTENT);
|
||||
lv_obj_set_style_pad_hor(ptr_sens_wrapper, 0, LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ptr_sens_wrapper, 0, LV_STATE_DEFAULT);
|
||||
if (ui_scale != hal::UiScale::Smallest) {
|
||||
if (ui_density != hal::UiDensity::Compact) {
|
||||
lv_obj_set_style_pad_ver(ptr_sens_wrapper, 4, LV_STATE_DEFAULT);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user