mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 04:08:13 +02:00
Updated layout
This commit is contained in:
parent
ce2b7e5baa
commit
4c7d0fc6f4
1 changed files with 59 additions and 56 deletions
|
@ -18,13 +18,11 @@ import controlsUit 1.0 as HifiControlsUit
|
||||||
import "qrc:////qml//controls" as HifiControls
|
import "qrc:////qml//controls" as HifiControls
|
||||||
import PerformanceEnums 1.0
|
import PerformanceEnums 1.0
|
||||||
|
|
||||||
Flickable {
|
Item {
|
||||||
HifiStylesUit.HifiConstants { id: hifi; }
|
HifiStylesUit.HifiConstants { id: hifi; }
|
||||||
|
|
||||||
id: root;
|
id: root;
|
||||||
contentWidth: parent.width
|
anchors.fill: parent
|
||||||
contentHeight: graphicsSettingsColumnLayout.height
|
|
||||||
clip: true
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: graphicsSettingsColumnLayout
|
id: graphicsSettingsColumnLayout
|
||||||
|
@ -38,13 +36,13 @@ Flickable {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: avatarNameTagsContainer
|
id: avatarNameTagsContainer
|
||||||
Layout.preferredWidth: parent.width
|
Layout.preferredWidth: parent.width
|
||||||
Layout.topMargin: 38
|
Layout.topMargin: 18
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
HifiStylesUit.RalewayRegular {
|
HifiStylesUit.RalewayRegular {
|
||||||
text: "GRAPHICS SETTINGS"
|
text: "GRAPHICS SETTINGS"
|
||||||
Layout.maximumWidth: parent.width
|
Layout.maximumWidth: parent.width
|
||||||
height: paintedHeight
|
height: 30
|
||||||
size: 16
|
size: 16
|
||||||
color: "#FFFFFF"
|
color: "#FFFFFF"
|
||||||
}
|
}
|
||||||
|
@ -52,12 +50,12 @@ Flickable {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.topMargin: 10
|
Layout.topMargin: 10
|
||||||
Layout.preferredWidth: parent.width
|
Layout.preferredWidth: parent.width
|
||||||
Layout.preferredHeight: contentItem.height
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
HifiControlsUit.RadioButton {
|
HifiControlsUit.RadioButton {
|
||||||
id: performanceLow
|
id: performanceLow
|
||||||
colorScheme: hifi.colorSchemes.dark
|
colorScheme: hifi.colorSchemes.dark
|
||||||
|
height: 18
|
||||||
fontSize: 16
|
fontSize: 16
|
||||||
leftPadding: 0
|
leftPadding: 0
|
||||||
text: "Low"
|
text: "Low"
|
||||||
|
@ -71,6 +69,7 @@ Flickable {
|
||||||
HifiControlsUit.RadioButton {
|
HifiControlsUit.RadioButton {
|
||||||
id: performanceMedium
|
id: performanceMedium
|
||||||
colorScheme: hifi.colorSchemes.dark
|
colorScheme: hifi.colorSchemes.dark
|
||||||
|
height: 18
|
||||||
fontSize: 16
|
fontSize: 16
|
||||||
leftPadding: 0
|
leftPadding: 0
|
||||||
text: "Medium"
|
text: "Medium"
|
||||||
|
@ -84,6 +83,7 @@ Flickable {
|
||||||
HifiControlsUit.RadioButton {
|
HifiControlsUit.RadioButton {
|
||||||
id: performanceHigh
|
id: performanceHigh
|
||||||
colorScheme: hifi.colorSchemes.dark
|
colorScheme: hifi.colorSchemes.dark
|
||||||
|
height: 18
|
||||||
fontSize: 16
|
fontSize: 16
|
||||||
leftPadding: 0
|
leftPadding: 0
|
||||||
text: "High"
|
text: "High"
|
||||||
|
@ -97,6 +97,7 @@ Flickable {
|
||||||
HifiControlsUit.RadioButton {
|
HifiControlsUit.RadioButton {
|
||||||
id: performanceCustom
|
id: performanceCustom
|
||||||
colorScheme: hifi.colorSchemes.dark
|
colorScheme: hifi.colorSchemes.dark
|
||||||
|
height: 18
|
||||||
fontSize: 16
|
fontSize: 16
|
||||||
leftPadding: 0
|
leftPadding: 0
|
||||||
text: "Custom"
|
text: "Custom"
|
||||||
|
@ -110,55 +111,7 @@ Flickable {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.topMargin: 10
|
Layout.topMargin: 10
|
||||||
Layout.preferredWidth: parent.width
|
Layout.preferredWidth: parent.width
|
||||||
Layout.preferredHeight: contentItem.height
|
spacing: 0
|
||||||
spacing: 30
|
|
||||||
|
|
||||||
Item {
|
|
||||||
Layout.preferredWidth: parent.width
|
|
||||||
Layout.preferredHeight: 35
|
|
||||||
|
|
||||||
HifiStylesUit.RalewayRegular {
|
|
||||||
id: resolutionHeader
|
|
||||||
text: "Resolution Scale (" + Number.parseFloat(Render.viewportResolutionScale).toPrecision(3) + ")"
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.top: parent.top
|
|
||||||
width: 130
|
|
||||||
height: parent.height
|
|
||||||
size: 16
|
|
||||||
color: "#FFFFFF"
|
|
||||||
}
|
|
||||||
|
|
||||||
HifiControlsUit.Slider {
|
|
||||||
id: resolutionScaleSlider
|
|
||||||
enabled: performanceCustom.checked
|
|
||||||
anchors.left: resolutionHeader.right
|
|
||||||
anchors.leftMargin: 57
|
|
||||||
anchors.top: parent.top
|
|
||||||
width: 150
|
|
||||||
height: parent.height
|
|
||||||
colorScheme: hifi.colorSchemes.dark
|
|
||||||
minimumValue: 0.25
|
|
||||||
maximumValue: 1.5
|
|
||||||
stepSize: 0.02
|
|
||||||
value: Render.viewportResolutionScale
|
|
||||||
live: true
|
|
||||||
|
|
||||||
function updateResolutionScale(sliderValue) {
|
|
||||||
if (Render.viewportResolutionScale !== sliderValue) {
|
|
||||||
Render.viewportResolutionScale = sliderValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onValueChanged: {
|
|
||||||
updateResolutionScale(value);
|
|
||||||
}
|
|
||||||
onPressedChanged: {
|
|
||||||
if (!pressed) {
|
|
||||||
updateResolutionScale(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
Layout.preferredWidth: parent.width
|
Layout.preferredWidth: parent.width
|
||||||
|
@ -229,6 +182,7 @@ Flickable {
|
||||||
Item {
|
Item {
|
||||||
Layout.preferredWidth: parent.width
|
Layout.preferredWidth: parent.width
|
||||||
Layout.preferredHeight: 35
|
Layout.preferredHeight: 35
|
||||||
|
Layout.topMargin: 20
|
||||||
|
|
||||||
HifiStylesUit.RalewayRegular {
|
HifiStylesUit.RalewayRegular {
|
||||||
id: renderingEffectsHeader
|
id: renderingEffectsHeader
|
||||||
|
@ -303,6 +257,7 @@ Flickable {
|
||||||
Item {
|
Item {
|
||||||
Layout.preferredWidth: parent.width
|
Layout.preferredWidth: parent.width
|
||||||
Layout.preferredHeight: 35
|
Layout.preferredHeight: 35
|
||||||
|
Layout.topMargin: 20
|
||||||
|
|
||||||
HifiStylesUit.RalewayRegular {
|
HifiStylesUit.RalewayRegular {
|
||||||
id: refreshRateHeader
|
id: refreshRateHeader
|
||||||
|
@ -364,6 +319,54 @@ Flickable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.preferredWidth: parent.width
|
||||||
|
Layout.preferredHeight: 35
|
||||||
|
Layout.topMargin: 16
|
||||||
|
|
||||||
|
HifiStylesUit.RalewayRegular {
|
||||||
|
id: resolutionHeader
|
||||||
|
text: "Resolution Scale (" + Number.parseFloat(Render.viewportResolutionScale).toPrecision(3) + ")"
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: parent.top
|
||||||
|
width: 130
|
||||||
|
height: parent.height
|
||||||
|
size: 16
|
||||||
|
color: "#FFFFFF"
|
||||||
|
}
|
||||||
|
|
||||||
|
HifiControlsUit.Slider {
|
||||||
|
id: resolutionScaleSlider
|
||||||
|
enabled: performanceCustom.checked
|
||||||
|
anchors.left: resolutionHeader.right
|
||||||
|
anchors.leftMargin: 57
|
||||||
|
anchors.top: parent.top
|
||||||
|
width: 150
|
||||||
|
height: parent.height
|
||||||
|
colorScheme: hifi.colorSchemes.dark
|
||||||
|
minimumValue: 0.25
|
||||||
|
maximumValue: 1.5
|
||||||
|
stepSize: 0.02
|
||||||
|
value: Render.viewportResolutionScale
|
||||||
|
live: true
|
||||||
|
|
||||||
|
function updateResolutionScale(sliderValue) {
|
||||||
|
if (Render.viewportResolutionScale !== sliderValue) {
|
||||||
|
Render.viewportResolutionScale = sliderValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onValueChanged: {
|
||||||
|
updateResolutionScale(value);
|
||||||
|
}
|
||||||
|
onPressedChanged: {
|
||||||
|
if (!pressed) {
|
||||||
|
updateResolutionScale(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue