mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Port the page navigation to ApplicationWindow's one
The ApplicationWindow component has an internal PageRow for the management of the application's pages, use that instead of an own StackView. Use shared components for common things in the app ListItem for the dive list Page for application pages, for correct background color and moving of the action button Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Sebastian Kügler <sebas@kde.org>
This commit is contained in:
parent
3d3fce7152
commit
32219f1276
4 changed files with 191 additions and 190 deletions
|
@ -202,57 +202,46 @@ MobileComponents.ApplicationWindow {
|
|||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
toolBar: TopBar {
|
||||
width: parent.width
|
||||
height: Layout.minimumHeight
|
||||
}
|
||||
|
||||
TopBar {
|
||||
property Item stackView: pageStack
|
||||
initialPage: Item {
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
|
||||
}
|
||||
ColumnLayout {
|
||||
id: awLayout
|
||||
anchors.fill: parent
|
||||
spacing: MobileComponents.Units.gridUnit / 2
|
||||
|
||||
StackView {
|
||||
id: stackView
|
||||
Layout.preferredWidth: parent.width
|
||||
Layout.fillHeight: true
|
||||
focus: true
|
||||
Keys.onReleased: if (event.key == Qt.Key_Back && stackView.depth > 1) {
|
||||
stackView.pop()
|
||||
event.accepted = true;
|
||||
}
|
||||
initialItem: Item {
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
Rectangle {
|
||||
id: detailsPage
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
ColumnLayout {
|
||||
id: awLayout
|
||||
anchors.fill: parent
|
||||
spacing: MobileComponents.Units.gridUnit / 2
|
||||
DiveList {
|
||||
anchors.fill: detailsPage
|
||||
id: diveDetails
|
||||
color: MobileComponents.Theme.backgroundColor
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: detailsPage
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
DiveList {
|
||||
anchors.fill: detailsPage
|
||||
id: diveDetails
|
||||
color: MobileComponents.Theme.backgroundColor
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
id: messageArea
|
||||
height: childrenRect.height
|
||||
Layout.fillWidth: true
|
||||
color: MobileComponents.Theme.backgroundColor
|
||||
|
||||
Rectangle {
|
||||
id: messageArea
|
||||
height: childrenRect.height
|
||||
Layout.fillWidth: true
|
||||
color: MobileComponents.Theme.backgroundColor
|
||||
|
||||
Text {
|
||||
id: message
|
||||
color: MobileComponents.Theme.textColor
|
||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||
styleColor: MobileComponents.Theme.textColor
|
||||
font.pointSize: subsurfaceTheme.smallPointSize
|
||||
}
|
||||
}
|
||||
Text {
|
||||
id: message
|
||||
color: MobileComponents.Theme.textColor
|
||||
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
|
||||
styleColor: MobileComponents.Theme.textColor
|
||||
font.pointSize: MobileComponents.Units.smallPointSize
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue