mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-07 07:50:54 +02:00
29 lines
851 B
QML
29 lines
851 B
QML
import Hifi 1.0 as Hifi
|
|
import QtQuick 2.3 as Original
|
|
import "controls"
|
|
import "styles"
|
|
|
|
Hifi.Tooltip {
|
|
id: root
|
|
HifiConstants { id: hifi }
|
|
x: (lastMousePosition.x > surfaceSize.width/2) ? lastMousePosition.x - 140 : lastMousePosition.x + 20
|
|
y: (lastMousePosition.y > surfaceSize.height/2) ? lastMousePosition.y - 70 : lastMousePosition.y + 5
|
|
implicitWidth: border.implicitWidth
|
|
implicitHeight: border.implicitHeight
|
|
|
|
Border {
|
|
id: border
|
|
anchors.fill: parent
|
|
implicitWidth: text.implicitWidth
|
|
implicitHeight: Math.max(text.implicitHeight, 64)
|
|
|
|
Text {
|
|
id: text
|
|
anchors.fill: parent
|
|
anchors.margins: 16
|
|
font.pixelSize: hifi.fonts.pixelSize / 2
|
|
text: root.text
|
|
wrapMode: Original.Text.WordWrap
|
|
}
|
|
}
|
|
}
|