mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 22:39:07 +08:00
Rename the properties to quickly identify that they are a boolean
Contributes to CURA-5984.
This commit is contained in:
parent
14b460a626
commit
c1c5eb2219
@ -61,8 +61,8 @@ Item
|
||||
checked: model.active
|
||||
enabled: model.enabled && UM.Selection.hasSelection && UM.Controller.toolsEnabled
|
||||
|
||||
topElement: toolsModel.getItem(0).id == model.id
|
||||
bottomElement: toolsModel.getItem(toolsModel.rowCount() - 1).id == model.id
|
||||
isTopElement: toolsModel.getItem(0).id == model.id
|
||||
isBottomElement: toolsModel.getItem(toolsModel.rowCount() - 1).id == model.id
|
||||
|
||||
toolItem: UM.RecolorImage
|
||||
{
|
||||
@ -137,8 +137,8 @@ Item
|
||||
delegate: ExtruderButton
|
||||
{
|
||||
extruder: model
|
||||
topElement: extrudersModel.getItem(0).id == model.id
|
||||
bottomElement: extrudersModel.getItem(extrudersModel.rowCount() - 1).id == model.id
|
||||
isTopElement: extrudersModel.getItem(0).id == model.id
|
||||
isBottomElement: extrudersModel.getItem(extrudersModel.rowCount() - 1).id == model.id
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,8 +12,12 @@ Button
|
||||
id: base
|
||||
|
||||
property alias toolItem: contentItemLoader.sourceComponent
|
||||
property bool topElement: false
|
||||
property bool bottomElement: false
|
||||
|
||||
// These two properties indicate whether the toolbar button is at the top of the toolbar column or at the bottom.
|
||||
// If it is somewhere in the middle, then both has to be false. If there is only one element in the column, then
|
||||
// both properties have to be set to true. This is used to create a rounded corner.
|
||||
property bool isTopElement: false
|
||||
property bool isBottomElement: false
|
||||
|
||||
hoverEnabled: true
|
||||
|
||||
@ -49,7 +53,7 @@ Button
|
||||
top: parent.top
|
||||
}
|
||||
height: parent.radius
|
||||
color: base.topElement ? "transparent" : parent.color
|
||||
color: base.isTopElement ? "transparent" : parent.color
|
||||
}
|
||||
|
||||
Rectangle
|
||||
@ -62,7 +66,7 @@ Button
|
||||
bottom: parent.bottom
|
||||
}
|
||||
height: parent.radius
|
||||
color: base.bottomElement ? "transparent" : parent.color
|
||||
color: base.isBottomElement ? "transparent" : parent.color
|
||||
}
|
||||
|
||||
Rectangle
|
||||
|
Loading…
x
Reference in New Issue
Block a user