diff options
-rw-r--r-- | Bootstrap.cxx | 12 | ||||
-rw-r--r-- | Label.qml | 1 |
2 files changed, 12 insertions, 1 deletions
diff --git a/Bootstrap.cxx b/Bootstrap.cxx index 38bbba5..e6b07ef 100644 --- a/Bootstrap.cxx +++ b/Bootstrap.cxx @@ -115,6 +115,18 @@ Bootstrap::Bootstrap(QObject *parent): OVERRIDE_HX_FONT_SIZE("H6FontSize", h6FontSize); toml_free(toml); + + QObject *ancestor; + QObject *grandAncestor = parent->parent(); + while ((ancestor = grandAncestor)) + if (!(grandAncestor = ancestor->parent())) + for (auto child : ancestor->findChildren<QObject *>()) + if (!strcmp(child->metaObject()->className(), + "Bootstrap")) { + bsMode = qobject_cast<Bootstrap *> + (child)->mode(); + break; + } } Bootstrap *Bootstrap::qmlAttachedProperties(QObject *object) @@ -5,7 +5,6 @@ import Bootstrap 5.3 Label { id: control - Bootstrap.mode: Window.window.Bootstrap.mode font { family: Bootstrap.heading ? Bootstrap.headingFont.family |