Redesign layout of configuration item contents

This is the new design.

Contributes to issue CURA-5876.
This commit is contained in:
Ghostkeeper 2018-11-27 13:55:54 +01:00
parent cf8d88054d
commit bb9598afd1
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276
3 changed files with 33 additions and 43 deletions

View file

@ -48,7 +48,6 @@ Button
{ {
width: Math.round(parent.width / 2) width: Math.round(parent.width / 2)
printCoreConfiguration: modelData printCoreConfiguration: modelData
mainColor: UM.Theme.getColor("text")
} }
} }
} }

View file

@ -7,61 +7,52 @@ import QtQuick.Controls 2.0
import UM 1.2 as UM import UM 1.2 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
Column Row
{ {
id: extruderInfo id: extruderInfo
property var printCoreConfiguration property var printCoreConfiguration
property var mainColor: "black"
spacing: Math.round(UM.Theme.getSize("default_margin").height / 2)
height: childrenRect.height height: childrenRect.height
spacing: UM.Theme.getSize("default_margin").width
//Extruder icon.
Item Item
{ {
id: extruder width: childrenRect.width
width: parent.width height: information.height
height: childrenRect.height
Label
{
id: extruderLabel
text: catalog.i18nc("@label:extruder label", "Extruder")
renderType: Text.NativeRendering
elide: Text.ElideRight
anchors.left: parent.left
font: UM.Theme.getFont("default")
color: mainColor
}
Cura.ExtruderIcon Cura.ExtruderIcon
{ {
width: UM.Theme.getSize("section_icon").width
height: UM.Theme.getSize("section_icon").height
materialColor: printCoreConfiguration.material.color materialColor: printCoreConfiguration.material.color
anchors.left: extruderLabel.right anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: UM.Theme.getSize("narrow_margin").width
} }
} }
Label Column
{ {
id: materialLabel id: information
text: printCoreConfiguration.material.name Label
renderType: Text.NativeRendering {
elide: Text.ElideRight text: printCoreConfiguration.material.brand
width: parent.width renderType: Text.NativeRendering
font: UM.Theme.getFont("default_bold") elide: Text.ElideRight
color: mainColor font: UM.Theme.getFont("default")
} color: UM.Theme.getColor("text")
}
Label Label
{ {
id: printCoreTypeLabel text: printCoreConfiguration.material.name
text: printCoreConfiguration.hotendID renderType: Text.NativeRendering
renderType: Text.NativeRendering elide: Text.ElideRight
elide: Text.ElideRight font: UM.Theme.getFont("default")
width: parent.width color: UM.Theme.getColor("text")
font: UM.Theme.getFont("default") }
color: mainColor Label
{
text: printCoreConfiguration.hotendID
renderType: Text.NativeRendering
elide: Text.ElideRight
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
}
} }
} }

View file

@ -397,7 +397,7 @@
"thin_margin": [0.71, 0.71], "thin_margin": [0.71, 0.71],
"narrow_margin": [0.5, 0.5], "narrow_margin": [0.5, 0.5],
"extruder_icon": [1.8, 1.8], "extruder_icon": [2.5, 2.5],
"simple_mode_infill_caption": [0.0, 5.0], "simple_mode_infill_caption": [0.0, 5.0],
"simple_mode_infill_height": [0.0, 8.0], "simple_mode_infill_height": [0.0, 8.0],