Ensure the plasmoid tooltip has the right size

This is required when a tooltip from another plasmoid
has been shown directly before.
This commit is contained in:
Martchus 2019-09-21 16:52:49 +02:00
parent 6724dfa89a
commit e7f5dc9b48
1 changed files with 5 additions and 0 deletions

View File

@ -1,4 +1,5 @@
import QtQuick 2.0
import QtQuick.Layouts 1.1
import org.kde.plasma.plasmoid 2.0
import org.kde.kquickcontrolsaddons 2.0
@ -20,6 +21,10 @@ Item {
Plasmoid.toolTipMainText: plasmoid.nativeInterface.statusText
Plasmoid.toolTipSubText: plasmoid.nativeInterface.additionalStatusText
Plasmoid.toolTipItem: Loader {
Layout.minimumWidth: item ? item.width : 0
Layout.maximumWidth: item ? item.width : 0
Layout.minimumHeight: item ? item.height : 0
Layout.maximumHeight: item ? item.height : 0
source: "ToolTipView.qml"
}