44#include < qqmlengine.h>
55#include < qqmllist.h>
66#include < qquickitem.h>
7+ #include < qtmetamacros.h>
78#include < qtypes.h>
89
910#include " proxywindow.hpp"
1011#include " windowinterface.hpp"
1112
13+ void ProxyFloatingWindow::connectWindow () {
14+ this ->ProxyWindowBase ::connectWindow ();
15+
16+ this ->window ->setMinimumSize (this ->bMinimumSize );
17+ this ->window ->setMaximumSize (this ->bMaximumSize );
18+ }
19+
1220void ProxyFloatingWindow::trySetWidth (qint32 implicitWidth) {
1321 if (!this ->window ->isVisible ()) {
1422 this ->ProxyWindowBase ::trySetWidth (implicitWidth);
@@ -21,6 +29,16 @@ void ProxyFloatingWindow::trySetHeight(qint32 implicitHeight) {
2129 }
2230}
2331
32+ void ProxyFloatingWindow::onMinimumSizeChanged () {
33+ if (this ->window ) this ->window ->setMinimumSize (this ->bMinimumSize );
34+ emit this ->minimumSizeChanged ();
35+ }
36+
37+ void ProxyFloatingWindow::onMaximumSizeChanged () {
38+ if (this ->window ) this ->window ->setMaximumSize (this ->bMaximumSize );
39+ emit this ->maximumSizeChanged ();
40+ }
41+
2442// FloatingWindowInterface
2543
2644FloatingWindowInterface::FloatingWindowInterface (QObject* parent)
@@ -40,6 +58,9 @@ FloatingWindowInterface::FloatingWindowInterface(QObject* parent)
4058 QObject::connect (this ->window , &ProxyWindowBase::colorChanged, this , &FloatingWindowInterface::colorChanged);
4159 QObject::connect (this ->window , &ProxyWindowBase::maskChanged, this , &FloatingWindowInterface::maskChanged);
4260 QObject::connect (this ->window , &ProxyWindowBase::surfaceFormatChanged, this , &FloatingWindowInterface::surfaceFormatChanged);
61+
62+ QObject::connect (this ->window , &ProxyFloatingWindow::minimumSizeChanged, this , &FloatingWindowInterface::minimumSizeChanged);
63+ QObject::connect (this ->window , &ProxyFloatingWindow::maximumSizeChanged, this , &FloatingWindowInterface::maximumSizeChanged);
4364 // clang-format on
4465}
4566
0 commit comments