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 untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
3 changed files with 21 additions and 15 deletions

View file

@ -8,6 +8,7 @@
#include <qobject.h>
#include <qpoint.h>
#include <qqmlintegration.h>
#include <qsize.h>
#include <qtclasshelpermacros.h>
#include <qtmetamacros.h>
#include <qwindow.h>
@ -64,6 +65,7 @@ struct PopupAnchorState {
Edges::Flags gravity = Edges::Bottom | Edges::Right;
PopupAdjustment::Flags adjustment = PopupAdjustment::Slide;
QPoint anchorpoint;
QSize size;
};
///! Anchorpoint or positioner for popup windows.
@ -123,7 +125,7 @@ public:
[[nodiscard]] PopupAdjustment::Flags adjustment() const;
void setAdjustment(PopupAdjustment::Flags adjustment);
void updateAnchorpoint(const QPoint& anchorpoint);
void updatePlacement(const QPoint& anchorpoint, const QSize& size);
signals:
void windowChanged();