refactor(P4): Schriftgröße auf die Info-Seite verschieben (1.7.3) #59

Merged
thomas merged 1 commits from refactor/schriftgroesse-auf-info-seite into main 2026-09-02 18:09:37 +02:00
2 changed files with 21 additions and 11 deletions
Showing only changes of commit e5c61d42d4 - Show all commits
+8
View File
@@ -1,3 +1,11 @@
Version 1.7.3:
- Die Schriftgröße steht jetzt auf der Info-Seite im Abschnitt „Darstellung", zusammen mit
der Wahl der Temperaturanzeige und dem Live-Bezugsschirm. Dort gehört sie hin: Es ist
eine Einstellung dieses Displays, keine Wartungsaufgabe.
- Die Seite Reinigung & Wartung hat damit wieder vier Karten in zwei Spalten.
- Die Auswahl selbst ist unverändert: drei Stufen, Neustart nach der Auswahl.
- Sie steht auf allen Panels zur Verfügung, nicht nur auf dem 7-Zöller.
Version 1.7.2: Version 1.7.2:
- Die Schriftgröße lässt sich jetzt einstellen: Klein, Mittel oder Groß, zu finden auf der - Die Schriftgröße lässt sich jetzt einstellen: Klein, Mittel oder Groß, zu finden auf der
Seite Reinigung & Wartung in der neuen Karte „Darstellung". Seite Reinigung & Wartung in der neuen Karte „Darstellung".
+13 -11
View File
@@ -2585,20 +2585,9 @@ static void build_service(lv_obj_t* p) {
lv_obj_add_event_cb(cb, cln_open, LV_EVENT_CLICKED, nullptr); lv_obj_add_event_cb(cb, cln_open, LV_EVENT_CLICKED, nullptr);
lv_obj_t* cFont = group_card(p, "Darstellung",
"Schriftgröße dieses Displays. Wirkt nach einem Neustart, der sofort erfolgt.");
lv_obj_t* rowF = row(cFont, nullptr);
static const char* FONT_NAMEN[3] = { "Klein", "Mittel", "Groß" };
for (uint8_t i = 0; i < 3; i++) {
lv_obj_t* fb = (i == g_fontStep) ? th_accent_button(rowF, FONT_NAMEN[i])
: th_button(rowF, FONT_NAMEN[i], COL_CARD2, COL_TEXT);
lv_obj_add_event_cb(fb, font_pick_cb, LV_EVENT_CLICKED, (void*)(intptr_t)i);
}
page_grid(p, PAGE_COLS_2, PAGE_ROWS_2C); page_grid(p, PAGE_COLS_2, PAGE_ROWS_2C);
grid_at(cMaint, 0, 0); grid_at(cFlush, 1, 0); grid_at(cMaint, 0, 0); grid_at(cFlush, 1, 0);
grid_at(cLight, 0, 1); grid_at(cCln, 1, 1); grid_at(cLight, 0, 1); grid_at(cCln, 1, 1);
grid_at(cFont, 0, 2, 2);
#else #else
section_title(p, "Reinigung & Wartung"); section_title(p, "Reinigung & Wartung");
@@ -3016,6 +3005,19 @@ static void build_info(lv_obj_t* p) {
lv_obj_add_event_cb(g_designBtn[i], design_btn_cb, LV_EVENT_CLICKED, (void*)(intptr_t)i); lv_obj_add_event_cb(g_designBtn[i], design_btn_cb, LV_EVENT_CLICKED, (void*)(intptr_t)i);
} }
design_btns_refresh(); design_btns_refresh();
lv_obj_t* fl = lv_label_create(dcard);
lv_label_set_text(fl, "Schriftgröße (Neustart des Displays)");
lv_obj_set_style_text_color(fl, COL_TEXT_DIM, 0);
lv_obj_t* frow = row(dcard, nullptr);
lv_obj_set_style_pad_column(frow, 8, 0);
static const char* FONT_NAMEN[3] = { "Klein", "Mittel", "Groß" };
for (uint8_t i = 0; i < 3; i++) {
lv_obj_t* fb = (i == g_fontStep) ? th_accent_button(frow, FONT_NAMEN[i])
: th_button(frow, FONT_NAMEN[i], COL_CARD2, COL_TEXT);
lv_obj_set_flex_grow(fb, 1);
lv_obj_add_event_cb(fb, font_pick_cb, LV_EVENT_CLICKED, (void*)(intptr_t)i);
}
swBrewLive = add_switch(dcard, "Live-Bezugsschirm (Vollbild während des Bezugs)"); swBrewLive = add_switch(dcard, "Live-Bezugsschirm (Vollbild während des Bezugs)");
sw_set(swBrewLive, g_brewLiveEnabled); sw_set(swBrewLive, g_brewLiveEnabled);
lv_obj_add_event_cb(swBrewLive, brew_live_sw_cb, LV_EVENT_VALUE_CHANGED, nullptr); lv_obj_add_event_cb(swBrewLive, brew_live_sw_cb, LV_EVENT_VALUE_CHANGED, nullptr);