Meshroom/meshroom/ui/qml/MaterialIcons/MaterialToolLabel.qml
Candice Bentéjac 05a742a221 [ui] Fix color for MaterialToolLabel
The name of the property used to set the color was ambiguous, causing
the colors to not be applied at all.
2024-11-22 16:54:58 +01:00

44 lines
1 KiB
QML

import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
/**
* MaterialToolLabel is a Label with an icon (using MaterialIcons).
* It shows up its tooltip when hovered.
*/
Item {
id: control
property alias iconText: iconItem.text
property alias iconSize: iconItem.font.pointSize
property alias label: labelItem.text
property var labelIconColor: palette.text
implicitWidth: childrenRect.width
implicitHeight: childrenRect.height
anchors.rightMargin: 5
RowLayout {
Label {
id: iconItem
font.family: MaterialIcons.fontFamily
font.pointSize: 13
padding: 0
text: ""
color: labelIconColor
}
Label {
id: labelItem
text: ""
color: labelIconColor
}
}
MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
acceptedButtons: Qt.NoButton
}
ToolTip.visible: mouseArea.containsMouse
ToolTip.delay: 500
}