diff options
-rw-r--r-- | Bootstrap.cxx | 7 | ||||
-rw-r--r-- | Label.qml | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/Bootstrap.cxx b/Bootstrap.cxx index d123dca..38bbba5 100644 --- a/Bootstrap.cxx +++ b/Bootstrap.cxx @@ -136,6 +136,13 @@ void Bootstrap::setMode(Mode mode) emit bodyBgChanged(); emit borderColorChanged(); emit headingColorChanged(); + for (auto sibling : parent()->findChildren<QObject *>()) + if (strstr(sibling->metaObject()->className(), "_QMLTYPE_")) + for (auto child : sibling->children()) + if (!strcmp(child->metaObject()->className(), + "Bootstrap")) + qobject_cast<Bootstrap *>(child) + ->setMode(mode); } Bootstrap::Theme Bootstrap::theme() const @@ -1,9 +1,11 @@ import QtQuick 2.15 +import QtQuick.Window 2.15 import QtQuick.Templates 2.15 import Bootstrap 5.3 Label { id: control + Bootstrap.mode: Window.window.Bootstrap.mode font { family: Bootstrap.heading ? Bootstrap.headingFont.family |