summaryrefslogtreecommitdiff
path: root/Bootstrap.cxx
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-04-13 10:49:18 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-04-13 10:49:18 +0800
commit9760ed0fca36990ea69e68e6057266e27cba62a9 (patch)
treea490dcc6403a471b4faa564d66220a3add958522 /Bootstrap.cxx
parentb5f8ec99fd8e79871b2a5df0966f29bcf244632f (diff)
Children inherit mode
Diffstat (limited to 'Bootstrap.cxx')
-rw-r--r--Bootstrap.cxx7
1 files changed, 7 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