File tree 2 files changed +12
-1
lines changed 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 8
8
#include < qobject.h>
9
9
#include < qqmlcomponent.h>
10
10
#include < qqmlengine.h>
11
+ #include < qquickitem.h>
11
12
#include < qtmetamacros.h>
12
13
#include < qurl.h>
13
14
15
+ #include " ../window/floatingwindow.hpp"
14
16
#include " generation.hpp"
15
17
#include " qmlglobal.hpp"
16
18
#include " scan.hpp"
@@ -73,6 +75,15 @@ void RootWrapper::reloadGraph(bool hard) {
73
75
return ;
74
76
}
75
77
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
+
76
87
generation->root = newRoot;
77
88
78
89
component.completeCreate ();
Original file line number Diff line number Diff line change 8
8
#include " qmlglobal.hpp"
9
9
#include " reload.hpp"
10
10
11
- // /! Root config element
11
+ // /! Optional root config element, allowing some settings to be specified inline.
12
12
class ShellRoot : public ReloadPropagator {
13
13
Q_OBJECT;
14
14
Q_PROPERTY (QuickshellSettings* settings READ settings CONSTANT);
You can’t perform that action at this time.
0 commit comments