fix(color): channel bars on outputs list not correct size if extended limits setting changed (#6157)

This commit is contained in:
philmoz
2025-04-27 14:46:43 +10:00
committed by GitHub
parent 34cfbb631b
commit 56ff3b2995
2 changed files with 5 additions and 2 deletions
@@ -70,7 +70,7 @@ void ChannelBar::checkEvents()
int newValue = getValue();
if (value != newValue) {
if (value != newValue || extendedLimits != g_model.extendedLimits) {
value = newValue;
std::string s;
@@ -81,7 +81,7 @@ void ChannelBar::checkEvents()
else
s = formatNumberAsString(calcRESXto100(value), 0, 0, "", "%");
if (s != valStr) {
if (s != valStr || extendedLimits != g_model.extendedLimits) {
valStr = s;
lv_label_set_text(valText, s.c_str());
@@ -100,6 +100,8 @@ void ChannelBar::checkEvents()
lv_obj_set_pos(bar, x, 0);
lv_obj_set_size(bar, size, height());
}
extendedLimits = g_model.extendedLimits;
}
}
@@ -40,6 +40,7 @@ class ChannelBar : public Window
protected:
uint8_t channel = 0;
int16_t value = -10000;
bool extendedLimits = false;
std::string valStr;
std::function<int16_t()> getValue;
lv_obj_t* valText = nullptr;