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