forked from quickshell/quickshell
core/popupanchor: add item-relative anchor rect support
This commit is contained in:
parent
adcef7fc30
commit
6d42d26c79
6 changed files with 124 additions and 47 deletions
|
@ -14,7 +14,7 @@ ProxyPopupWindow::ProxyPopupWindow(QObject* parent): ProxyWindowBase(parent) {
|
|||
this->mVisible = false;
|
||||
// clang-format off
|
||||
QObject::connect(&this->mAnchor, &PopupAnchor::windowChanged, this, &ProxyPopupWindow::parentWindowChanged);
|
||||
QObject::connect(&this->mAnchor, &PopupAnchor::rectChanged, this, &ProxyPopupWindow::reposition);
|
||||
QObject::connect(&this->mAnchor, &PopupAnchor::windowRectChanged, this, &ProxyPopupWindow::reposition);
|
||||
QObject::connect(&this->mAnchor, &PopupAnchor::edgesChanged, this, &ProxyPopupWindow::reposition);
|
||||
QObject::connect(&this->mAnchor, &PopupAnchor::gravityChanged, this, &ProxyPopupWindow::reposition);
|
||||
QObject::connect(&this->mAnchor, &PopupAnchor::adjustmentChanged, this, &ProxyPopupWindow::reposition);
|
||||
|
|
|
@ -57,8 +57,8 @@ class ProxyPopupWindow: public ProxyWindowBase {
|
|||
///
|
||||
/// The Y position of the popup relative to the parent window.
|
||||
Q_PROPERTY(qint32 relativeY READ relativeY WRITE setRelativeY NOTIFY relativeYChanged);
|
||||
/// The popup's anchor / positioner relative to another window. The popup will not be
|
||||
/// shown until it has a valid anchor relative to a window and @@visible is true.
|
||||
/// The popup's anchor / positioner relative to another item or window. The popup will
|
||||
/// not be shown until it has a valid anchor relative to a window and @@visible is true.
|
||||
///
|
||||
/// You can set properties of the anchor like so:
|
||||
/// ```qml
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue