fix: type chooser updates colors when theme changes

Add applyTheme() to TypeSelectorPopup that refreshes palette and
stylesheets for all child widgets. Controller connects it to
ThemeManager::themeChanged on popup creation.
This commit is contained in:
IChooseYou
2026-02-18 09:59:50 -07:00
parent b1d3e52204
commit fa0d9a377b
4 changed files with 141 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
#include "controller.h"
#include "typeselectorpopup.h"
#include "providerregistry.h"
#include "themes/thememanager.h"
#include <Qsci/qsciscintilla.h>
#include <QSplitter>
#include <QFile>
@@ -1726,6 +1727,9 @@ void RcxController::updateCommandRow() {
TypeSelectorPopup* RcxController::ensurePopup(RcxEditor* editor) {
if (!m_cachedPopup) {
m_cachedPopup = new TypeSelectorPopup(editor);
// Keep popup colors in sync when theme changes
connect(&ThemeManager::instance(), &ThemeManager::themeChanged,
m_cachedPopup, &TypeSelectorPopup::applyTheme);
// Pre-warm: force native window creation so first visible show is fast
m_cachedPopup->warmUp();
}