mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 18:55:01 +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 QtWebEngine 1.5
|
||||
import QtQuick.Layouts 1.3
|
||||
import controlsUit 1.0 as HifiControls
|
||||
import stylesUit 1.0 as HifiStyles
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
width: 600
|
||||
height: 200
|
||||
width: 750
|
||||
height: 225
|
||||
color: hifi.colors.white
|
||||
|
||||
anchors.centerIn: parent
|
||||
|
@ -22,78 +23,79 @@ Rectangle {
|
|||
property string currentRequestedPermission
|
||||
signal permissionButtonPressed(int buttonNumber)
|
||||
|
||||
Row {
|
||||
id: webAccessHeaderContainer
|
||||
|
||||
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
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
Rectangle {
|
||||
id: permissionsButtonsContainer
|
||||
height: 50
|
||||
width: parent.width
|
||||
anchors.fill: parent
|
||||
id: webAccessHeaderContainer
|
||||
height: 75
|
||||
anchors.top: parent.top
|
||||
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 {
|
||||
id: leftButton
|
||||
text: "Don't Allow"
|
||||
|
||||
anchors.right: parent.horizontalCenter
|
||||
anchors.horizontalCenterOffset: -parent.space
|
||||
|
||||
text: "Don't Allow"
|
||||
anchors.rightMargin: parent.space
|
||||
color: hifi.buttons.red
|
||||
enabled: true
|
||||
height: 25
|
||||
height: 38
|
||||
onClicked: {
|
||||
root.permissionButtonPressed(0);
|
||||
root.permissionButtonPressed(parent._LEFT_BUTTON);
|
||||
}
|
||||
}
|
||||
HifiControls.Button {
|
||||
id: rightButton
|
||||
text: "Yes allow access"
|
||||
|
||||
anchors.left: parent.horizontalCenter
|
||||
anchors.horizontalCenterOffset: parent.space
|
||||
|
||||
text: "Yes allow access"
|
||||
anchors.leftMargin: parent.space
|
||||
color: hifi.buttons.blue
|
||||
enabled: true
|
||||
width: 155
|
||||
height: 25
|
||||
height: 38
|
||||
onClicked: {
|
||||
root.permissionButtonPressed(1);
|
||||
root.permissionButtonPressed(parent._RIGHT_BUTTON);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue