mirror of
https://github.com/NohamR/Reclass.git
synced 2026-05-10 19:59:21 +00:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user