mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-06 11:23:58 +02:00
improved layout to match the figment more
This commit is contained in:
parent
993e5db2da
commit
4c0d8b6fda
1 changed files with 54 additions and 52 deletions
|
@ -1,12 +1,13 @@
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtWebEngine 1.5
|
import QtWebEngine 1.5
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
import controlsUit 1.0 as HifiControls
|
import controlsUit 1.0 as HifiControls
|
||||||
import stylesUit 1.0 as HifiStyles
|
import stylesUit 1.0 as HifiStyles
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
width: 600
|
width: 750
|
||||||
height: 200
|
height: 225
|
||||||
color: hifi.colors.white
|
color: hifi.colors.white
|
||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
@ -22,78 +23,79 @@ Rectangle {
|
||||||
property string currentRequestedPermission
|
property string currentRequestedPermission
|
||||||
signal permissionButtonPressed(int buttonNumber)
|
signal permissionButtonPressed(int buttonNumber)
|
||||||
|
|
||||||
Row {
|
ColumnLayout {
|
||||||
id: webAccessHeaderContainer
|
anchors.fill: parent
|
||||||
|
|
||||||
height: 60
|
|
||||||
width: parent.width
|
|
||||||
HifiStyles.RalewayBold {
|
|
||||||
id: webAccessHeaderText
|
|
||||||
text: "REQUEST FOR DEVICE ACCESS"
|
|
||||||
anchors.centerIn: parent
|
|
||||||
color: hifi.colors.black
|
|
||||||
size: 17
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Row {
|
|
||||||
id: webAccessInfoContainer
|
|
||||||
height: 60
|
|
||||||
width: parent.width
|
|
||||||
anchors.top: webAccessHeaderContainer.bottom
|
|
||||||
HifiStyles.RalewayLight {
|
|
||||||
id: webAccessInfoText
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
width: root.width
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
text: "This website is attempting to " + root.permissionLanguage[root.currentRequestedPermission] + "."
|
|
||||||
size: 15
|
|
||||||
color: hifi.colors.black
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Row {
|
|
||||||
id: permissionsButtonsRow
|
|
||||||
height: 100
|
|
||||||
width: parent.width
|
|
||||||
anchors.top: webAccessInfoContainer.bottom
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: permissionsButtonsContainer
|
id: webAccessHeaderContainer
|
||||||
height: 50
|
height: 75
|
||||||
width: parent.width
|
anchors.top: parent.top
|
||||||
anchors.fill: parent
|
Layout.preferredWidth: parent.width
|
||||||
|
|
||||||
property int space: 5
|
HifiStyles.RalewayBold {
|
||||||
|
id: webAccessHeaderText
|
||||||
|
text: "REQUEST FOR DEVICE ACCESS"
|
||||||
|
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
color: hifi.colors.black
|
||||||
|
size: 30
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: webAccessInfoContainer
|
||||||
|
height: 35
|
||||||
|
Layout.preferredWidth: parent.width
|
||||||
|
|
||||||
|
HifiStyles.RalewayLight {
|
||||||
|
id: webAccessInfoText
|
||||||
|
text: "This website is attempting to " + root.permissionLanguage[root.currentRequestedPermission] + "."
|
||||||
|
|
||||||
|
anchors.centerIn: parent
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
size: 20
|
||||||
|
color: hifi.colors.black
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: permissionsButtonsRow
|
||||||
|
height: 115
|
||||||
|
Layout.preferredWidth: parent.width
|
||||||
|
Layout.topMargin: 35
|
||||||
|
property int space: 8
|
||||||
|
readonly property int _LEFT_BUTTON: 0
|
||||||
|
readonly property int _RIGHT_BUTTON: 1
|
||||||
|
|
||||||
HifiControls.Button {
|
HifiControls.Button {
|
||||||
id: leftButton
|
id: leftButton
|
||||||
|
text: "Don't Allow"
|
||||||
|
|
||||||
anchors.right: parent.horizontalCenter
|
anchors.right: parent.horizontalCenter
|
||||||
anchors.horizontalCenterOffset: -parent.space
|
anchors.rightMargin: parent.space
|
||||||
|
|
||||||
text: "Don't Allow"
|
|
||||||
color: hifi.buttons.red
|
color: hifi.buttons.red
|
||||||
enabled: true
|
enabled: true
|
||||||
height: 25
|
height: 38
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.permissionButtonPressed(0);
|
root.permissionButtonPressed(parent._LEFT_BUTTON);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
HifiControls.Button {
|
HifiControls.Button {
|
||||||
id: rightButton
|
id: rightButton
|
||||||
|
text: "Yes allow access"
|
||||||
|
|
||||||
anchors.left: parent.horizontalCenter
|
anchors.left: parent.horizontalCenter
|
||||||
anchors.horizontalCenterOffset: parent.space
|
anchors.leftMargin: parent.space
|
||||||
|
|
||||||
text: "Yes allow access"
|
|
||||||
color: hifi.buttons.blue
|
color: hifi.buttons.blue
|
||||||
enabled: true
|
enabled: true
|
||||||
width: 155
|
width: 155
|
||||||
height: 25
|
height: 38
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.permissionButtonPressed(1);
|
root.permissionButtonPressed(parent._RIGHT_BUTTON);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue