mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 07:28:59 +08:00
Remove "cornerSide", "shadowColor" and "shadowEnabled" from ActionButton
CURA-7810
This commit is contained in:
parent
74eac8f4b9
commit
58a63aed02
@ -45,49 +45,6 @@ Button
|
||||
// but it can exceed a maximum, then this value have to be set.
|
||||
property int maximumWidth: 0
|
||||
|
||||
// These properties are deprecated.
|
||||
// To (maybe) prevent a major SDK upgrade, mark them as deprecated instead of just outright removing them.
|
||||
// Note, if you still want rounded corners, use (something based on) Cura.RoundedRectangle.
|
||||
property alias cornerSide: deprecatedProperties.cornerSide
|
||||
property alias shadowColor: deprecatedProperties.shadowColor
|
||||
property alias shadowEnabled: deprecatedProperties.shadowEnabled
|
||||
|
||||
Item
|
||||
{
|
||||
id: deprecatedProperties
|
||||
|
||||
visible: false
|
||||
enabled: false
|
||||
width: 0
|
||||
height: 0
|
||||
|
||||
property var cornerSide: null
|
||||
property var shadowColor: null
|
||||
property var shadowEnabled: null
|
||||
|
||||
onCornerSideChanged:
|
||||
{
|
||||
if (cornerSide != null)
|
||||
{
|
||||
CuraApplication.writeToLog("w", "'ActionButton.cornerSide' is deprecated since 4.11. Rounded corners can still be made with 'Cura.RoundedRectangle'.");
|
||||
}
|
||||
}
|
||||
onShadowColorChanged:
|
||||
{
|
||||
if (shadowColor != null)
|
||||
{
|
||||
CuraApplication.writeToLog("w", "'ActionButton.shadowColor' is deprecated since 4.11.")
|
||||
}
|
||||
}
|
||||
onShadowEnabledChanged:
|
||||
{
|
||||
if (shadowEnabled != null)
|
||||
{
|
||||
CuraApplication.writeToLog("w", "'ActionButton.shadowEnabled' is deprecated since 4.11.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
leftPadding: UM.Theme.getSize("default_margin").width
|
||||
rightPadding: UM.Theme.getSize("default_margin").width
|
||||
height: UM.Theme.getSize("action_button").height
|
||||
@ -167,16 +124,12 @@ Button
|
||||
}
|
||||
}
|
||||
|
||||
background: Cura.RoundedRectangle
|
||||
background: Rectangle
|
||||
{
|
||||
id: backgroundRect
|
||||
color: button.enabled ? (button.hovered ? button.hoverColor : button.color) : button.disabledColor
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color: button.enabled ? (button.hovered ? button.outlineHoverColor : button.outlineColor) : button.outlineDisabledColor
|
||||
|
||||
// Disable the rounded-ness of this rectangle. We can't use a normal Rectangle here yet, as the API/SDK has only just been deprecated.
|
||||
radius: 0
|
||||
cornerSide: Cura.RoundedRectangle.Direction.None
|
||||
}
|
||||
|
||||
UM.ToolTip
|
||||
|
Loading…
x
Reference in New Issue
Block a user