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

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