mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-12 23:48:04 +08:00
Split page in header and contents
This requires a small refactor here. Contributes to issue CURA-8565.
This commit is contained in:
parent
cb7b9b3193
commit
d31079b7aa
@ -10,39 +10,58 @@ import UM 1.0 as UM
|
|||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
Column
|
RowLayout
|
||||||
{
|
{
|
||||||
anchors.fill: parent
|
id: header
|
||||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
anchors
|
||||||
|
|
||||||
RowLayout
|
|
||||||
{
|
{
|
||||||
spacing: UM.Theme.getSize("default_margin").width
|
top: parent.top
|
||||||
|
topMargin: UM.Theme.getSize("default_margin").height
|
||||||
|
left: parent.left
|
||||||
|
leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
right: parent.right
|
||||||
|
rightMargin: anchors.leftMargin
|
||||||
|
}
|
||||||
|
|
||||||
Cura.SecondaryButton
|
spacing: UM.Theme.getSize("default_margin").width
|
||||||
{
|
|
||||||
Layout.alignment: Qt.AlignVCenter
|
|
||||||
Layout.preferredHeight: UM.Theme.getSize("action_button").height
|
|
||||||
Layout.preferredWidth: height
|
|
||||||
|
|
||||||
onClicked: contextStack.pop() //Remove this page, returning to the main package list or whichever thing is beneath it.
|
Cura.SecondaryButton
|
||||||
|
{
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
Layout.preferredHeight: UM.Theme.getSize("action_button").height
|
||||||
|
Layout.preferredWidth: height
|
||||||
|
|
||||||
tooltip: catalog.i18nc("@button:tooltip", "Back")
|
onClicked: contextStack.pop() //Remove this page, returning to the main package list or whichever thing is beneath it.
|
||||||
toolTipContentAlignment: Cura.ToolTip.ContentAlignment.AlignRight
|
|
||||||
leftPadding: UM.Theme.getSize("narrow_margin").width
|
|
||||||
rightPadding: leftPadding
|
|
||||||
iconSource: UM.Theme.getIcon("ArrowLeft")
|
|
||||||
iconSize: height - leftPadding * 2
|
|
||||||
}
|
|
||||||
|
|
||||||
Label
|
tooltip: catalog.i18nc("@button:tooltip", "Back")
|
||||||
{
|
toolTipContentAlignment: Cura.ToolTip.ContentAlignment.AlignRight
|
||||||
Layout.alignment: Qt.AlignVCenter
|
leftPadding: UM.Theme.getSize("narrow_margin").width
|
||||||
|
rightPadding: leftPadding
|
||||||
|
iconSource: UM.Theme.getIcon("ArrowLeft")
|
||||||
|
iconSize: height - leftPadding * 2
|
||||||
|
}
|
||||||
|
|
||||||
text: "Install Plug-ins" //TODO: Depend on package type, and translate.
|
Label
|
||||||
font: UM.Theme.getFont("large")
|
{
|
||||||
color: UM.Theme.getColor("text")
|
Layout.alignment: Qt.AlignVCenter
|
||||||
}
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
text: "Install Plug-ins" //TODO: Depend on package type, and translate.
|
||||||
|
font: UM.Theme.getFont("large")
|
||||||
|
color: UM.Theme.getColor("text")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle
|
||||||
|
{
|
||||||
|
anchors
|
||||||
|
{
|
||||||
|
top: header.bottom
|
||||||
|
topMargin: UM.Theme.getSize("default_margin").height
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
bottom: parent.bottom
|
||||||
|
}
|
||||||
|
color: UM.Theme.getColor("detail_background")
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user