mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:29:32 +02:00
Center container widget.
Replaced homepage with widget.
This commit is contained in:
parent
7e876fa066
commit
83b2666fb5
2 changed files with 38 additions and 15 deletions
|
@ -0,0 +1,24 @@
|
||||||
|
import QtQuick 2.15
|
||||||
|
import QtQuick.Controls 2.15
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
|
||||||
|
ScrollView {
|
||||||
|
width: parent.width
|
||||||
|
height:parent.height
|
||||||
|
y: header.height
|
||||||
|
id: root
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
width: parent.width
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
spacing: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
// For each child of index not of 0, append as child of index of 0.
|
||||||
|
// Append children of the custom element to the ColumnLayout.
|
||||||
|
Component.onCompleted: {
|
||||||
|
for (var i = 1; i < root.contentChildren.length; i++) {
|
||||||
|
root.contentChildren[i].parent = root.contentChildren[0]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -23,23 +23,14 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Home page
|
// Home page
|
||||||
ScrollView {
|
SettingCenterContainer {
|
||||||
width: parent.width
|
|
||||||
height:parent.height
|
|
||||||
y: header.height
|
|
||||||
id: home_page
|
id: home_page
|
||||||
|
visible: current_page == "Settings"
|
||||||
|
|
||||||
ColumnLayout {
|
Repeater {
|
||||||
width: parent.width
|
model: pages.length
|
||||||
visible: current_page == "Settings"
|
delegate: SettingSubviewListElement {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
property string page_name: pages[index];
|
||||||
spacing: 0
|
|
||||||
|
|
||||||
Repeater {
|
|
||||||
model: pages.length
|
|
||||||
delegate: SettingSubviewListElement {
|
|
||||||
property string page_name: pages[index];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -459,6 +450,14 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Audio
|
||||||
|
SettingCenterContainer {
|
||||||
|
id: audio_page
|
||||||
|
visible: current_page == "Audio"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Templates
|
// Templates
|
||||||
|
|
||||||
// Messages from script
|
// Messages from script
|
||||||
|
|
Loading…
Reference in a new issue