Redimensionnement

main
Alexis Drai 2 years ago
parent 91476298ef
commit 7bc7309658

@ -7,11 +7,9 @@ Page {
// The effective value will be restricted by ApplicationWindow.allowedOrientations // The effective value will be restricted by ApplicationWindow.allowedOrientations
allowedOrientations: Orientation.All allowedOrientations: Orientation.All
// To enable PullDownMenu, place our content in a SilicaFlickable
SilicaFlickable { SilicaFlickable {
anchors.fill: parent anchors.fill: parent
// PullDownMenu and PushUpMenu must be declared in SilicaFlickable, SilicaListView or SilicaGridView
PullDownMenu { PullDownMenu {
MenuItem { MenuItem {
text: qsTr("Show Page 2") text: qsTr("Show Page 2")
@ -19,40 +17,39 @@ Page {
} }
} }
// Tell SilicaFlickable the height of its content.
contentHeight: column.height contentHeight: column.height
// Place our content in a Column. The PageHeader is always placed at the top Rectangle {
// of the page, followed by our content. id: baseRect
Column { color: "red"
id: column anchors.fill: parent
}
width: page.width
spacing: Theme.paddingLarge
Rectangle { PageHeader {
id: baseRect title: qsTr("UI Template")
color: "red" }
width: page.width
height: page.height/2
}
PageHeader { Label {
title: qsTr("UI Template") id: firstLabel
anchors {
horizontalCenter: parent.horizontalCenter
top: parent.top
} }
Label { text: qsTr("Argh")
x: Theme.horizontalPageMargin color: Theme.secondaryHighlightColor
text: qsTr("Argh") font.pixelSize: Theme.fontSizeExtraLarge
color: Theme.secondaryHighlightColor }
font.pixelSize: Theme.fontSizeExtraLarge
} TextField {
TextField { id: secondField
id: secondField width: parent.width
width: parent.width anchors {
placeholderText: "Enter text" horizontalCenter: parent.horizontalCenter
font.pixelSize: Theme.fontSizeLarge verticalCenter: parent.verticalCenter
font.bold: true
} }
placeholderText: "Enter text"
font.pixelSize: Theme.fontSizeLarge
font.bold: true
} }
} }
} }

Loading…
Cancel
Save