mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-20 03:31:59 +02:00
The name of the property used to set the color was ambiguous, causing the colors to not be applied at all.
44 lines
1 KiB
QML
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
|
|
}
|