support for centering
This commit is contained in:
parent
e8b1374ff0
commit
9cd8721f61
@ -125,11 +125,11 @@ void DialogProxy::setVisible(const bool visible)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QPoint DialogProxy::popupPosition(QGraphicsObject *item) const
|
QPoint DialogProxy::popupPosition(QGraphicsObject *item, int alignment) const
|
||||||
{
|
{
|
||||||
Plasma::Corona *corona = qobject_cast<Plasma::Corona *>(item->scene());
|
Plasma::Corona *corona = qobject_cast<Plasma::Corona *>(item->scene());
|
||||||
if (corona) {
|
if (corona) {
|
||||||
return corona->popupPosition(item, m_dialog->size());
|
return corona->popupPosition(item, m_dialog->size(), (Qt::AlignmentFlag)alignment);
|
||||||
} else {
|
} else {
|
||||||
return QPoint();
|
return QPoint();
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,8 @@ public:
|
|||||||
int windowFlags() const;
|
int windowFlags() const;
|
||||||
void setWindowFlags(const int);
|
void setWindowFlags(const int);
|
||||||
|
|
||||||
Q_INVOKABLE QPoint popupPosition(QGraphicsObject *item) const;
|
//FIXME: alignment should be Qt::AlignmentFlag
|
||||||
|
Q_INVOKABLE QPoint popupPosition(QGraphicsObject *item, int alignment=Qt::AlignLeft) const;
|
||||||
//FIXME:: Qt::WidgetAttribute should be already
|
//FIXME:: Qt::WidgetAttribute should be already
|
||||||
Q_INVOKABLE void setAttribute(int attribute, bool on);
|
Q_INVOKABLE void setAttribute(int attribute, bool on);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user