chore(color): more layout cleanup and minor bug fixes (#5171)

This commit is contained in:
philmoz
2024-06-17 05:40:08 +00:00
committed by GitHub
parent 66c0a2769f
commit e7509349b3
69 changed files with 806 additions and 1110 deletions
+1 -3
View File
@@ -27,7 +27,6 @@
#include "opentx.h"
#include "libopenui.h"
#include "widget.h"
#include "theme.h"
#include "lua_api.h"
#include "lua_widget.h"
@@ -972,8 +971,7 @@ static int luaLcdSetColor(lua_State *L)
if (index < LCD_COLOR_COUNT && lcdColorTable[index] != color) {
lcdColorTable[index] = color;
if (index != CUSTOM_COLOR_INDEX)
EdgeTxTheme::instance()->update();
styles->applyColors();
}
return 0;
}
+5 -5
View File
@@ -570,7 +570,7 @@ class LvglWidgetScaleIndicator : public LvglWidgetObjectBase
public:
LvglWidgetScaleIndicator() {}
virtual void build(lv_obj_t *parent, lv_meter_scale_t *scale) = 0;
virtual void buildIndicator(lv_obj_t *parent, lv_meter_scale_t *scale) = 0;
protected:
lv_obj_t *meter = nullptr;
@@ -601,7 +601,7 @@ class LvglWidgetScaleArc : public LvglWidgetScaleIndicator
clearRef(L, getEndPosFunction);
}
void build(lv_obj_t *parent, lv_meter_scale_t *scale) override
void buildIndicator(lv_obj_t *parent, lv_meter_scale_t *scale) override
{
meter = parent;
@@ -671,7 +671,7 @@ class LvglWidgetScaleLines : public LvglWidgetScaleIndicator
clearRef(L, getEndPosFunction);
}
void build(lv_obj_t *parent, lv_meter_scale_t *scale) override
void buildIndicator(lv_obj_t *parent, lv_meter_scale_t *scale) override
{
meter = parent;
@@ -736,7 +736,7 @@ class LvglWidgetScaleNeedle : public LvglWidgetScaleIndicator
void clearRefs(lua_State *L) override { clearRef(L, getPosFunction); }
void build(lv_obj_t *parent, lv_meter_scale_t *scale) override
void buildIndicator(lv_obj_t *parent, lv_meter_scale_t *scale) override
{
meter = parent;
@@ -811,7 +811,7 @@ class LvglWidgetMeterScale : public LvglWidgetObjectBase
}
for (auto it = indicators.cbegin(); it != indicators.cend(); ++it) {
(*it)->build(meter, scale);
(*it)->buildIndicator(meter, scale);
}
}