core/popupanchor: reposition on popup size change

This commit is contained in:
outfoxxed 2024-07-24 00:44:42 -07:00
parent ebfa8ec448
commit 60388f10ca
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
3 changed files with 21 additions and 15 deletions

View file

@ -26,12 +26,12 @@ ProxyPopupWindow::ProxyPopupWindow(QObject* parent): ProxyWindowBase(parent) {
void ProxyPopupWindow::completeWindow() {
this->ProxyWindowBase::completeWindow();
QObject::connect(
this->window,
&QWindow::visibleChanged,
this,
&ProxyPopupWindow::onVisibleChanged
);
// clang-format off
QObject::connect(this->window, &QWindow::visibleChanged, this, &ProxyPopupWindow::onVisibleChanged);
QObject::connect(this->window, &QWindow::widthChanged, this, &ProxyPopupWindow::reposition);
QObject::connect(this->window, &QWindow::heightChanged, this, &ProxyPopupWindow::reposition);
// clang-format on
this->window->setFlag(Qt::ToolTip);
}