Files
OpenVR-AdvancedSettings-frame/bin/win64/res/qml/MyStackViewPage.qml
T
matzman e39c240ff5 Complete GUI overhaul (from Qt Widgets to Qt Quick Controls 2)
Added chaperone profiles
Added separate supersampling sliders for applications/compositor
Added asynchronous reprojection on/off switch
Merged in Microphone Control Overlay
Added Push-to-Talk profiles
Updated to OpenVR 1.0.3
Requires at least SteamVR beta 1477423729.
2016-10-28 18:38:05 +02:00

93 lines
2.5 KiB
QML

import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.2
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
Rectangle {
color: "#1b2939"
width: 1200
height: 800
property StackView stackView
property string headerText: "Header Title"
property bool headerShowBackButton: true
property Item header: ColumnLayout {
RowLayout {
Button {
id: headerBackButton
Layout.preferredHeight: 50
Layout.preferredWidth: 50
hoverEnabled: true
enabled: headerShowBackButton
opacity: headerShowBackButton ? 1.0 : 0.0
contentItem: Image {
source: "backarrow.svg"
sourceSize.width: 50
sourceSize.height: 50
anchors.fill: parent
}
background: Rectangle {
opacity: parent.down ? 1.0 : (parent.activeFocus ? 0.5 : 0.0)
color: "#406288"
radius: 4
anchors.fill: parent
}
onHoveredChanged: {
if (hovered) {
forceActiveFocus()
} else {
focus = false
}
}
onClicked: {
MyResources.focusChangedSound.play()
stackView.pop()
}
}
MyText {
id: headerTitle
text: headerText
font.pointSize: 30
anchors.verticalCenter: headerBackButton.verticalCenter
Layout.leftMargin: 32
}
}
Rectangle {
color: "#cccccc"
height: 1
Layout.topMargin: 10
Layout.fillWidth: true
}
}
property Item content: Frame {
MyText {
text: "Content"
}
}
ColumnLayout {
id: mainLayout
spacing: 12
anchors.fill: parent
}
Component.onCompleted: {
header.parent = mainLayout
header.Layout.leftMargin = 40
header.Layout.topMargin = 30
header.Layout.rightMargin = 40
content.parent = mainLayout
content.Layout.fillHeight = true
content.Layout.fillWidth = true
content.Layout.topMargin = 10
content.Layout.leftMargin = 40
content.Layout.rightMargin = 40
content.Layout.bottomMargin = 40
}
}