forked from quickshell/quickshell
core/window: add title property to floating windows
This commit is contained in:
parent
20322484b9
commit
d9164578a2
2 changed files with 20 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue