File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 88#include < qobject.h>
99#include < qqmlcomponent.h>
1010#include < qqmlengine.h>
11+ #include < qquickitem.h>
1112#include < qtmetamacros.h>
1213#include < qurl.h>
1314
15+ #include " ../window/floatingwindow.hpp"
1416#include " generation.hpp"
1517#include " qmlglobal.hpp"
1618#include " scan.hpp"
@@ -73,6 +75,15 @@ void RootWrapper::reloadGraph(bool hard) {
7375 return ;
7476 }
7577
78+ if (auto * item = qobject_cast<QQuickItem*>(newRoot)) {
79+ auto * window = new FloatingWindowInterface ();
80+ item->setParent (window);
81+ item->setParentItem (window->contentItem ());
82+ window->setWidth (static_cast <int >(item->width ()));
83+ window->setHeight (static_cast <int >(item->height ()));
84+ newRoot = window;
85+ }
86+
7687 generation->root = newRoot;
7788
7889 component.completeCreate ();
Original file line number Diff line number Diff line change 88#include " qmlglobal.hpp"
99#include " reload.hpp"
1010
11- // /! Root config element
11+ // /! Optional root config element, allowing some settings to be specified inline.
1212class ShellRoot : public ReloadPropagator {
1313 Q_OBJECT;
1414 Q_PROPERTY (QuickshellSettings* settings READ settings CONSTANT);
You can’t perform that action at this time.
0 commit comments