use hints to ensure proper size
This commit is contained in:
parent
83b0c8cc3c
commit
3d5f105c80
@ -18,6 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
|
import QtQuick.Layouts 1.1
|
||||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||||
import org.kde.plasma.components 2.0 as PlasmaComponents
|
import org.kde.plasma.components 2.0 as PlasmaComponents
|
||||||
import org.kde.plasma.extras 2.0 as PlasmaExtras
|
import org.kde.plasma.extras 2.0 as PlasmaExtras
|
||||||
@ -33,6 +34,10 @@ Row {
|
|||||||
property int preferredTextWidth: theme.mSize(theme.defaultFont).width * 40
|
property int preferredTextWidth: theme.mSize(theme.defaultFont).width * 40
|
||||||
property int _s: units.largeSpacing / 2
|
property int _s: units.largeSpacing / 2
|
||||||
|
|
||||||
|
Layout.minimumWidth: implicitWidth + _s
|
||||||
|
Layout.minimumHeight: implicitHeight + _s * 2
|
||||||
|
Layout.maximumWidth: implicitWidth + _s
|
||||||
|
Layout.maximumHeight: implicitHeight + _s * 2
|
||||||
width: implicitWidth + _s
|
width: implicitWidth + _s
|
||||||
height: implicitHeight + _s * 2
|
height: implicitHeight + _s * 2
|
||||||
|
|
||||||
|
@ -94,7 +94,6 @@ void ToolTipDialog::showEvent(QShowEvent *event)
|
|||||||
|
|
||||||
m_animation->stop();
|
m_animation->stop();
|
||||||
DialogProxy::showEvent(event);
|
DialogProxy::showEvent(event);
|
||||||
setFlags(Qt::ToolTip);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToolTipDialog::hideEvent(QHideEvent *event)
|
void ToolTipDialog::hideEvent(QHideEvent *event)
|
||||||
@ -119,7 +118,10 @@ bool ToolTipDialog::event(QEvent *e)
|
|||||||
} else if (e->type() == QEvent::Leave) {
|
} else if (e->type() == QEvent::Leave) {
|
||||||
dismiss();
|
dismiss();
|
||||||
}
|
}
|
||||||
return DialogProxy::event(e);
|
|
||||||
|
bool ret = DialogProxy::event(e);
|
||||||
|
setFlags(Qt::ToolTip | Qt::WindowDoesNotAcceptFocus | Qt::WindowStaysOnTopHint);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToolTipDialog::adjustGeometry(const QRect &geom)
|
void ToolTipDialog::adjustGeometry(const QRect &geom)
|
||||||
|
Loading…
Reference in New Issue
Block a user