mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-03 07:41:18 -07:00
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:
parent
901dc55733
commit
3c7498feed
18 changed files with 30 additions and 224 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) 2021 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import UM 1.2 as UM
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.6 as Cura
|
||||
|
||||
import QtQuick 2.15
|
||||
|
|
@ -25,7 +25,7 @@ TabButton
|
|||
radius: Math.round(width * 0.5)
|
||||
}
|
||||
|
||||
Cura.ToolTip
|
||||
UM.ToolTip
|
||||
{
|
||||
id: tooltip
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import QtQuick.Controls 2.15
|
|||
import QtQuick.Layouts 1.3
|
||||
|
||||
import Cura 1.0 as Cura
|
||||
import UM 1.0 as UM
|
||||
import UM 1.5 as UM
|
||||
|
||||
Item
|
||||
{
|
||||
|
|
@ -38,7 +38,7 @@ Item
|
|||
onClicked: contextStack.pop() //Remove this page, returning to the main package list or whichever thing is beneath it.
|
||||
|
||||
tooltip: catalog.i18nc("@button:tooltip", "Back")
|
||||
toolTipContentAlignment: Cura.ToolTip.ContentAlignment.AlignRight
|
||||
toolTipContentAlignment: Text.AlignRight
|
||||
leftPadding: UM.Theme.getSize("narrow_margin").width
|
||||
rightPadding: leftPadding
|
||||
iconSource: UM.Theme.getIcon("ArrowLeft")
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Control
|
|||
implicitWidth: UM.Theme.getSize("card_tiny_icon").width
|
||||
implicitHeight: UM.Theme.getSize("card_tiny_icon").height
|
||||
|
||||
Cura.ToolTip
|
||||
UM.ToolTip
|
||||
{
|
||||
tooltipText:
|
||||
{
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ Item
|
|||
id: meshTypeButtons
|
||||
spacing: UM.Theme.getSize("default_margin").width
|
||||
|
||||
Cura.ToolbarButton
|
||||
UM.ToolbarButton
|
||||
{
|
||||
id: normalButton
|
||||
text: catalog.i18nc("@label", "Normal model")
|
||||
|
|
@ -90,7 +90,7 @@ Item
|
|||
z: 4
|
||||
}
|
||||
|
||||
Cura.ToolbarButton
|
||||
UM.ToolbarButton
|
||||
{
|
||||
id: supportMeshButton
|
||||
text: catalog.i18nc("@label", "Print as support")
|
||||
|
|
@ -105,7 +105,7 @@ Item
|
|||
z: 3
|
||||
}
|
||||
|
||||
Cura.ToolbarButton
|
||||
UM.ToolbarButton
|
||||
{
|
||||
id: overlapMeshButton
|
||||
text: catalog.i18nc("@label", "Modify settings for overlaps")
|
||||
|
|
@ -120,7 +120,7 @@ Item
|
|||
z: 2
|
||||
}
|
||||
|
||||
Cura.ToolbarButton
|
||||
UM.ToolbarButton
|
||||
{
|
||||
id: antiOverhangMeshButton
|
||||
text: catalog.i18nc("@label", "Don't support overlaps")
|
||||
|
|
|
|||
|
|
@ -479,7 +479,7 @@ UM.Dialog
|
|||
}
|
||||
return tipText
|
||||
}
|
||||
toolTipContentAlignment: Cura.ToolTip.ContentAlignment.AlignLeft
|
||||
toolTipContentAlignment: Text.AlignLeft
|
||||
onClicked: dialog.show()
|
||||
iconSource: "Script.svg"
|
||||
fixedWidthMode: false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue