fix(color): channel bars on outputs list not correct size if extended limits setting changed (#6157)
This commit is contained in:
@@ -70,7 +70,7 @@ void ChannelBar::checkEvents()
|
|||||||
|
|
||||||
int newValue = getValue();
|
int newValue = getValue();
|
||||||
|
|
||||||
if (value != newValue) {
|
if (value != newValue || extendedLimits != g_model.extendedLimits) {
|
||||||
value = newValue;
|
value = newValue;
|
||||||
|
|
||||||
std::string s;
|
std::string s;
|
||||||
@@ -81,7 +81,7 @@ void ChannelBar::checkEvents()
|
|||||||
else
|
else
|
||||||
s = formatNumberAsString(calcRESXto100(value), 0, 0, "", "%");
|
s = formatNumberAsString(calcRESXto100(value), 0, 0, "", "%");
|
||||||
|
|
||||||
if (s != valStr) {
|
if (s != valStr || extendedLimits != g_model.extendedLimits) {
|
||||||
valStr = s;
|
valStr = s;
|
||||||
lv_label_set_text(valText, s.c_str());
|
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_pos(bar, x, 0);
|
||||||
lv_obj_set_size(bar, size, height());
|
lv_obj_set_size(bar, size, height());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extendedLimits = g_model.extendedLimits;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ class ChannelBar : public Window
|
|||||||
protected:
|
protected:
|
||||||
uint8_t channel = 0;
|
uint8_t channel = 0;
|
||||||
int16_t value = -10000;
|
int16_t value = -10000;
|
||||||
|
bool extendedLimits = false;
|
||||||
std::string valStr;
|
std::string valStr;
|
||||||
std::function<int16_t()> getValue;
|
std::function<int16_t()> getValue;
|
||||||
lv_obj_t* valText = nullptr;
|
lv_obj_t* valText = nullptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user