summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Bootstrap.cxx7
-rw-r--r--Label.qml2
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
diff --git a/Label.qml b/Label.qml
index 3b12c5d..5230131 100644
--- a/Label.qml
+++ b/Label.qml
@@ -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