Move ToolbarButton and ToolTip from Cura into Uranium. This makes it possible to use new styled ToolbarButton in plugins/Tools for the rotate tool.

Removed the ContentAlignment enum in ToolTip in favour of using the Text.ContentAlignment enum. For some reason references to this enum fail everywhere when ToolTip is moved into Uranium. There is some evil time-wasting magic cast on this component!

CURA-8943
This commit is contained in:
j.delarago 2022-03-03 15:53:30 +01:00
parent 901dc55733
commit 3c7498feed
18 changed files with 30 additions and 224 deletions

View file

@ -51,7 +51,7 @@ UM.Dialog
onTextChanged: manager.onPeakHeightChanged(text)
}
Cura.ToolTip
UM.ToolTip
{
text: catalog.i18nc("@info:tooltip", "The maximum distance of each pixel from \"Base.\"")
visible: peak_height.hovered || peak_height_label.containsMouse
@ -85,7 +85,7 @@ UM.Dialog
onTextChanged: manager.onBaseHeightChanged(text)
}
Cura.ToolTip
UM.ToolTip
{
text: catalog.i18nc("@info:tooltip", "The base height from the build plate in millimeters.")
visible: base_height.hovered || base_height_label.containsMouse
@ -119,7 +119,7 @@ UM.Dialog
onTextChanged: manager.onWidthChanged(text)
}
Cura.ToolTip
UM.ToolTip
{
text: catalog.i18nc("@info:tooltip", "The width in millimeters on the build plate")
visible: width.hovered || width_label.containsMouse
@ -153,7 +153,7 @@ UM.Dialog
onTextChanged: manager.onDepthChanged(text)
}
Cura.ToolTip
UM.ToolTip
{
text: catalog.i18nc("@info:tooltip", "The depth in millimeters on the build plate")
visible: depth.hovered || depth_label.containsMouse
@ -190,7 +190,7 @@ UM.Dialog
onCurrentIndexChanged: { manager.onImageColorInvertChanged(currentIndex) }
}
Cura.ToolTip
UM.ToolTip
{
text: catalog.i18nc("@info:tooltip", "For lithophanes dark pixels should correspond to thicker locations in order to block more light coming through. For height maps lighter pixels signify higher terrain, so lighter pixels should correspond to thicker locations in the generated 3D model.")
visible: lighter_is_higher.hovered || lighter_is_higher_label.containsMouse
@ -227,7 +227,7 @@ UM.Dialog
onCurrentIndexChanged: { manager.onColorModelChanged(currentIndex) }
}
Cura.ToolTip
UM.ToolTip
{
text: catalog.i18nc("@info:tooltip", "For lithophanes a simple logarithmic model for translucency is available. For height maps the pixel values correspond to heights linearly.")
visible: color_model.hovered || color_model_label.containsMouse
@ -258,7 +258,7 @@ UM.Dialog
validator: RegExpValidator { regExp: /^[1-9]\d{0,2}([\,|\.]\d*)?$/ }
onTextChanged: manager.onTransmittanceChanged(text)
Cura.ToolTip
UM.ToolTip
{
text: catalog.i18nc("@info:tooltip", "The percentage of light penetrating a print with a thickness of 1 millimeter. Lowering this value increases the contrast in dark regions and decreases the contrast in light regions of the image.")
visible: parent.hovered || transmittance_label.containsMouse
@ -293,7 +293,7 @@ UM.Dialog
onValueChanged: manager.onSmoothingChanged(value)
}
Cura.ToolTip
UM.ToolTip
{
text: catalog.i18nc("@info:tooltip", "The amount of smoothing to apply to the image.")
visible: smoothing.hovered || smoothing_label.containsMouse