mirror of
https://github.com/overte-org/overte.git
synced 2025-04-29 21:22:46 +02:00
Fix binding loops
This commit is contained in:
parent
af39b5660b
commit
b22745d57a
2 changed files with 13 additions and 21 deletions
|
@ -32,8 +32,8 @@ CheckBox {
|
||||||
|
|
||||||
indicator: Rectangle {
|
indicator: Rectangle {
|
||||||
id: box
|
id: box
|
||||||
width: boxSize
|
implicitWidth: boxSize
|
||||||
height: boxSize
|
implicitHeight: boxSize
|
||||||
radius: boxRadius
|
radius: boxRadius
|
||||||
x: checkBox.leftPadding
|
x: checkBox.leftPadding
|
||||||
y: parent.height / 2 - height / 2
|
y: parent.height / 2 - height / 2
|
||||||
|
|
|
@ -41,13 +41,13 @@ Rectangle {
|
||||||
//recalculates dynamically in case of UI size is changed
|
//recalculates dynamically in case of UI size is changed
|
||||||
QtObject {
|
QtObject {
|
||||||
id: margins
|
id: margins
|
||||||
property real paddings: parent.width / 20.25
|
property real paddings: root.width / 20.25
|
||||||
|
|
||||||
property real sizeCheckBox: parent.width / 13.5
|
property real sizeCheckBox: root.width / 13.5
|
||||||
property real sizeText: parent.width / 2.5
|
property real sizeText: root.width / 2.5
|
||||||
property real sizeLevel: parent.width / 5.8
|
property real sizeLevel: root.width / 5.8
|
||||||
property real sizeDesktop: parent.width / 5.8
|
property real sizeDesktop: root.width / 5.8
|
||||||
property real sizeVR: parent.width / 13.5
|
property real sizeVR: root.width / 13.5
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
|
@ -166,7 +166,6 @@ Rectangle {
|
||||||
RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
Layout.minimumWidth: margins.sizeCheckBox + margins.sizeText
|
Layout.minimumWidth: margins.sizeCheckBox + margins.sizeText
|
||||||
Layout.maximumWidth: margins.sizeCheckBox + margins.sizeText
|
Layout.maximumWidth: margins.sizeCheckBox + margins.sizeText
|
||||||
Layout.alignment: Qt.AlignVCenter
|
|
||||||
clip: true
|
clip: true
|
||||||
size: 16;
|
size: 16;
|
||||||
color: "white";
|
color: "white";
|
||||||
|
@ -177,7 +176,6 @@ Rectangle {
|
||||||
Item {
|
Item {
|
||||||
Layout.minimumWidth: margins.sizeLevel
|
Layout.minimumWidth: margins.sizeLevel
|
||||||
Layout.maximumWidth: margins.sizeLevel
|
Layout.maximumWidth: margins.sizeLevel
|
||||||
Layout.alignment: Qt.AlignVCenter
|
|
||||||
height: 8;
|
height: 8;
|
||||||
InputLevel {
|
InputLevel {
|
||||||
visible: (isVR && selectedHMD) || (!isVR && selectedDesktop);
|
visible: (isVR && selectedHMD) || (!isVR && selectedDesktop);
|
||||||
|
@ -187,8 +185,7 @@ Rectangle {
|
||||||
AudioControls.CheckBox {
|
AudioControls.CheckBox {
|
||||||
Layout.minimumWidth: margins.sizeDesktop
|
Layout.minimumWidth: margins.sizeDesktop
|
||||||
Layout.maximumWidth: margins.sizeDesktop
|
Layout.maximumWidth: margins.sizeDesktop
|
||||||
leftPadding: margins.sizeDesktop - implicitWidth/2
|
leftPadding: margins.sizeDesktop/2 - boxSize/2
|
||||||
Layout.alignment: Qt.AlignCenter
|
|
||||||
checked: selectedDesktop;
|
checked: selectedDesktop;
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (checked) {
|
if (checked) {
|
||||||
|
@ -200,8 +197,7 @@ Rectangle {
|
||||||
AudioControls.CheckBox {
|
AudioControls.CheckBox {
|
||||||
Layout.minimumWidth: margins.sizeVR
|
Layout.minimumWidth: margins.sizeVR
|
||||||
Layout.maximumWidth: margins.sizeVR
|
Layout.maximumWidth: margins.sizeVR
|
||||||
Layout.alignment: Qt.AlignCenter
|
leftPadding: margins.sizeVR/2 - boxSize/2
|
||||||
leftPadding: margins.sizeVR - implicitWidth/2
|
|
||||||
checked: selectedHMD;
|
checked: selectedHMD;
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (checked) {
|
if (checked) {
|
||||||
|
@ -266,14 +262,13 @@ Rectangle {
|
||||||
clip: true;
|
clip: true;
|
||||||
model: Audio.devices.output;
|
model: Audio.devices.output;
|
||||||
delegate: RowLayout {
|
delegate: RowLayout {
|
||||||
width: inputView.width;
|
width: outputView.width;
|
||||||
height: 36;
|
height: 36;
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
Layout.minimumWidth: margins.sizeCheckBox + margins.sizeText
|
Layout.minimumWidth: margins.sizeCheckBox + margins.sizeText
|
||||||
Layout.maximumWidth: margins.sizeCheckBox + margins.sizeText
|
Layout.maximumWidth: margins.sizeCheckBox + margins.sizeText
|
||||||
Layout.alignment: Qt.AlignVCenter
|
|
||||||
clip: true
|
clip: true
|
||||||
size: 16;
|
size: 16;
|
||||||
color: "white";
|
color: "white";
|
||||||
|
@ -284,14 +279,12 @@ Rectangle {
|
||||||
Item {
|
Item {
|
||||||
Layout.minimumWidth: margins.sizeLevel
|
Layout.minimumWidth: margins.sizeLevel
|
||||||
Layout.maximumWidth: margins.sizeLevel
|
Layout.maximumWidth: margins.sizeLevel
|
||||||
Layout.alignment: Qt.AlignVCenter
|
|
||||||
height: 8;
|
height: 8;
|
||||||
}
|
}
|
||||||
AudioControls.CheckBox {
|
AudioControls.CheckBox {
|
||||||
Layout.minimumWidth: margins.sizeDesktop
|
Layout.minimumWidth: margins.sizeDesktop
|
||||||
Layout.maximumWidth: margins.sizeDesktop
|
Layout.maximumWidth: margins.sizeDesktop
|
||||||
leftPadding: margins.sizeDesktop - implicitWidth/2
|
leftPadding: margins.sizeDesktop/2 - boxSize/2
|
||||||
Layout.alignment: Qt.AlignCenter
|
|
||||||
checked: selectedDesktop;
|
checked: selectedDesktop;
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (checked) {
|
if (checked) {
|
||||||
|
@ -302,8 +295,7 @@ Rectangle {
|
||||||
AudioControls.CheckBox {
|
AudioControls.CheckBox {
|
||||||
Layout.minimumWidth: margins.sizeVR
|
Layout.minimumWidth: margins.sizeVR
|
||||||
Layout.maximumWidth: margins.sizeVR
|
Layout.maximumWidth: margins.sizeVR
|
||||||
Layout.alignment: Qt.AlignCenter
|
leftPadding: margins.sizeVR/2 - boxSize/2
|
||||||
leftPadding: margins.sizeVR - implicitWidth/2
|
|
||||||
checked: selectedHMD;
|
checked: selectedHMD;
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (checked) {
|
if (checked) {
|
||||||
|
|
Loading…
Reference in a new issue