core/window: add title property to floating windows

This commit is contained in:
outfoxxed 2025-06-15 03:12:51 -07:00
parent 20322484b9
commit d9164578a2
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
2 changed files with 20 additions and 0 deletions

View file

@ -13,6 +13,7 @@
void ProxyFloatingWindow::connectWindow() {
this->ProxyWindowBase::connectWindow();
this->window->setTitle(this->bTitle);
this->window->setMinimumSize(this->bMinimumSize);
this->window->setMaximumSize(this->bMaximumSize);
}
@ -29,6 +30,11 @@ void ProxyFloatingWindow::trySetHeight(qint32 implicitHeight) {
}
}
void ProxyFloatingWindow::onTitleChanged() {
if (this->window) this->window->setTitle(this->bTitle);
emit this->titleChanged();
}
void ProxyFloatingWindow::onMinimumSizeChanged() {
if (this->window) this->window->setMinimumSize(this->bMinimumSize);
emit this->minimumSizeChanged();
@ -59,6 +65,7 @@ FloatingWindowInterface::FloatingWindowInterface(QObject* parent)
QObject::connect(this->window, &ProxyWindowBase::maskChanged, this, &FloatingWindowInterface::maskChanged);
QObject::connect(this->window, &ProxyWindowBase::surfaceFormatChanged, this, &FloatingWindowInterface::surfaceFormatChanged);
QObject::connect(this->window, &ProxyFloatingWindow::titleChanged, this, &FloatingWindowInterface::titleChanged);
QObject::connect(this->window, &ProxyFloatingWindow::minimumSizeChanged, this, &FloatingWindowInterface::minimumSizeChanged);
QObject::connect(this->window, &ProxyFloatingWindow::maximumSizeChanged, this, &FloatingWindowInterface::maximumSizeChanged);
// clang-format on