Add tooltip in WorkspaceDialog over the printer selection drop down.

CURA-9424
This commit is contained in:
Joey de l'Arago 2022-11-10 14:48:38 +01:00
parent 0c79ec738e
commit c59f5a5c00
2 changed files with 64 additions and 38 deletions

View file

@ -23,41 +23,6 @@ Item
height: childrenRect.height
anchors.leftMargin: UM.Theme.getSize("default_margin").width
UM.TooltipArea
{
id: comboboxTooltip
width: (parent.width / 2.5) | 0
height: visible ? UM.Theme.getSize("default_margin").height : 0
anchors.top: parent.top
anchors.right: parent.right
anchors.rightMargin: UM.Theme.getSize("default_margin").width
text: comboboxTooltipText
visible: comboboxVisible
UM.Label
{
id: comboboxLabel
anchors.top: parent.top
anchors.left: parent.left
anchors.topMargin: UM.Theme.getSize("default_margin").height
visible: comboboxVisible && text != ""
text: ""
font: UM.Theme.getFont("default_bold")
}
Loader
{
id: comboboxLoader
width: parent.width
height: UM.Theme.getSize("button").height
anchors.top: comboboxLabel.bottom
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.left: parent.left
sourceComponent: combobox
}
}
Row
{
id: sectionTitleRow
@ -82,6 +47,69 @@ Item
}
}
Item
{
id: comboboxTooltip
width: (parent.width / 2.5) | 0
height: visible ? UM.Theme.getSize("default_margin").height : 0
anchors.top: parent.top
anchors.right: parent.right
anchors.rightMargin: UM.Theme.getSize("default_margin").width
visible: comboboxVisible
UM.Label
{
id: comboboxLabel
anchors.top: parent.top
anchors.left: parent.left
anchors.topMargin: UM.Theme.getSize("default_margin").height
visible: comboboxVisible && text != ""
text: ""
font: UM.Theme.getFont("default_bold")
}
Loader
{
id: comboboxLoader
width: parent.width
height: UM.Theme.getSize("button").height
anchors.top: comboboxLabel.bottom
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.left: parent.left
sourceComponent: combobox
}
MouseArea
{
id: helpIconMouseArea
anchors.right: parent.right
anchors.verticalCenter: comboboxLabel.verticalCenter
width: childrenRect.width
height: childrenRect.height
hoverEnabled: true
UM.ColorImage
{
width: UM.Theme.getSize("section_icon").width
height: width
visible: comboboxTooltipText != ""
source: UM.Theme.getIcon("Help")
UM.ToolTip
{
text: comboboxTooltipText
visible: helpIconMouseArea.containsMouse
targetPoint: Qt.point(parent.x + Math.round(parent.width / 2), parent.y)
x: 0
y: parent.y + parent.height + UM.Theme.getSize("default_margin").height
width: UM.Theme.getSize("tooltip").width
}
}
}
}
Loader
{
width: parent.width