sim base clean

UI now uses bg_color as led_color
Move add_UI_item to push_ui_item
This commit is contained in:
2026-02-14 14:30:38 +01:00
parent d345affd63
commit b9d3c432bc
9 changed files with 30 additions and 51 deletions
+3 -3
View File
@@ -393,8 +393,8 @@ void SimulatorBase::process_ui_led(json &uiItem)
return;
}
QColor bg_color = QColor(QString::fromStdString(uiItem["led_color"]));
QColor color = QColor(~bg_color.red(), ~bg_color.green(), ~bg_color.blue());
QColor bg_color = QColor(QString::fromStdString(uiItem["bg_color"]));
QColor color = QColor(QString::fromStdString(uiItem["fg_color"]));
QString text = QString::fromStdString(uiItem["text"]);
if (text != led->text())
@@ -426,7 +426,7 @@ void SimulatorBase::process_ui_led(json &uiItem)
return;
}
if (bg_color != widget_bg_color(led))
if (bg_color != widget_bg_color(led) || color != widget_color(led))
{
set_widget_color(led, color, bg_color);
}