mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 08:19:02 +08:00
Set the variable types of the Action button to the right kind.
Because of boyscouting; these must be colors (and not generic vars)
This commit is contained in:
parent
bf8a04fa40
commit
a1613c7f81
@ -15,15 +15,17 @@ Button
|
|||||||
property alias textFont: buttonText.font
|
property alias textFont: buttonText.font
|
||||||
property alias cornerRadius: backgroundRect.radius
|
property alias cornerRadius: backgroundRect.radius
|
||||||
property alias tooltip: tooltip.text
|
property alias tooltip: tooltip.text
|
||||||
property var color: UM.Theme.getColor("primary")
|
|
||||||
property var hoverColor: UM.Theme.getColor("primary_hover")
|
property color color: UM.Theme.getColor("primary")
|
||||||
property var disabledColor: color
|
property color hoverColor: UM.Theme.getColor("primary_hover")
|
||||||
property var textColor: UM.Theme.getColor("button_text")
|
property color disabledColor: color
|
||||||
property var textHoverColor: UM.Theme.getColor("button_text_hover")
|
property color textColor: UM.Theme.getColor("button_text")
|
||||||
property var textDisabledColor: textColor
|
property color textHoverColor: UM.Theme.getColor("button_text_hover")
|
||||||
property var outlineColor: color
|
property color textDisabledColor: textColor
|
||||||
property var outlineHoverColor: hoverColor
|
property color outlineColor: color
|
||||||
property var outlineDisabledColor: outlineColor
|
property color outlineHoverColor: hoverColor
|
||||||
|
property color outlineDisabledColor: outlineColor
|
||||||
|
|
||||||
// This property is used to indicate whether the button has a fixed width or the width would depend on the contents
|
// This property is used to indicate whether the button has a fixed width or the width would depend on the contents
|
||||||
// Be careful when using fixedWidthMode, the translated texts can be too long that they won't fit. In any case,
|
// Be careful when using fixedWidthMode, the translated texts can be too long that they won't fit. In any case,
|
||||||
// we elide the text to the right so the text will be cut off with the three dots at the end.
|
// we elide the text to the right so the text will be cut off with the three dots at the end.
|
||||||
@ -80,6 +82,7 @@ Button
|
|||||||
{
|
{
|
||||||
id: mouseArea
|
id: mouseArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
// Ensure that the button will still accept the clicks on it's own.
|
||||||
onPressed: mouse.accepted = false
|
onPressed: mouse.accepted = false
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user