12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- import QtQuick 2.3
- import QtQuick.Controls 2.0
- import UM 1.5 as UM
- Item
- {
- property alias text: innerLabel.text
- property alias target: popUp.target
- property alias direction: popUp.direction
- GenericPopUp
- {
- id: popUp
-
- direction: "up"
-
- color: UM.Theme.getColor("monitor_tooltip")
- contentItem: Item
- {
- id: contentWrapper
- implicitWidth: childrenRect.width
- implicitHeight: innerLabel.contentHeight + 2 * innerLabel.padding
- UM.Label
- {
- id: innerLabel
- padding: 12 * screenScaleFactor
- text: ""
- wrapMode: Text.WordWrap
- width: 240 * screenScaleFactor
- color: UM.Theme.getColor("monitor_tooltip_text")
- }
- }
- }
- function open() {
- popUp.open()
- }
- function close() {
- popUp.close()
- }
- }
|