mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 23:05:01 -06:00
Add circle with letter inside for non default intents
CURA-8849
This commit is contained in:
parent
074e9a8607
commit
40d473c243
3 changed files with 44 additions and 8 deletions
|
@ -25,8 +25,8 @@ Item
|
|||
|
||||
RecommendedQualityProfileSelectorButton
|
||||
{
|
||||
text: model.name
|
||||
iconSource: UM.Theme.getIcon(model.icon)
|
||||
profileName: model.name
|
||||
icon: model.icon
|
||||
|
||||
|
||||
selected: Cura.MachineManager.activeIntentCategory == model.intent_category
|
||||
|
|
|
@ -16,9 +16,9 @@ Rectangle
|
|||
Layout.fillWidth: true
|
||||
color: mouseArea.containsMouse || selected ? UM.Theme.getColor("um_blue_1") : UM.Theme.getColor("background_1")
|
||||
|
||||
property alias iconSource: intentIcon.source
|
||||
property alias text: qualityLabel.text
|
||||
property bool selected: false
|
||||
property string profileName: ""
|
||||
property string icon: ""
|
||||
|
||||
signal clicked()
|
||||
|
||||
|
@ -38,21 +38,52 @@ Rectangle
|
|||
top: parent.top
|
||||
bottom: qualityLabel.top
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
topMargin: UM.Theme.getSize("narrow_margin").height
|
||||
}
|
||||
|
||||
UM.ColorImage
|
||||
Item
|
||||
{
|
||||
id: intentIcon
|
||||
width: UM.Theme.getSize("recommended_button_icon").width
|
||||
height: width
|
||||
anchors.centerIn: parent
|
||||
color: UM.Theme.getColor("icon")
|
||||
height: UM.Theme.getSize("recommended_button_icon").height
|
||||
UM.ColorImage
|
||||
{
|
||||
anchors.fill: parent
|
||||
anchors.centerIn: parent
|
||||
visible: icon != ""
|
||||
source: UM.Theme.getIcon(icon)
|
||||
color: UM.Theme.getColor("icon")
|
||||
}
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: circle
|
||||
anchors.fill: parent
|
||||
radius: width
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: icon == ""
|
||||
color: transparent
|
||||
border.width: UM.Theme.getSize("thick_lining").width
|
||||
border.color: UM.Theme.getColor("text")
|
||||
|
||||
UM.Label
|
||||
{
|
||||
id: initialLabel
|
||||
anchors.centerIn: parent
|
||||
text: profileName.charAt(0).toUpperCase()
|
||||
font: UM.Theme.getFont("small_bold")
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
UM.Label
|
||||
{
|
||||
id: qualityLabel
|
||||
text: profileName
|
||||
anchors
|
||||
{
|
||||
bottom: parent.bottom
|
||||
|
|
|
@ -133,6 +133,11 @@
|
|||
"weight": 400,
|
||||
"family": "Noto Sans"
|
||||
},
|
||||
"small_bold": {
|
||||
"size": 0.9,
|
||||
"weight": 700,
|
||||
"family": "Noto Sans"
|
||||
},
|
||||
"small_ja_JP": {
|
||||
"size": 0.9,
|
||||
"weight": 400,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue