mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 21:43:03 +02:00
Merge pull request #12669 from ElderOrb/FB13143
Fix several styling/alignment/overlapping issues in 'Add to world' and 'Rename' dialogs in Asset Browser
This commit is contained in:
commit
67b1313fb6
4 changed files with 33 additions and 20 deletions
|
@ -26,15 +26,17 @@ Rectangle {
|
||||||
|
|
||||||
readonly property int keyboardRowHeight: 50
|
readonly property int keyboardRowHeight: 50
|
||||||
readonly property int keyboardWidth: 480
|
readonly property int keyboardWidth: 480
|
||||||
|
readonly property int keyboardHeight: 200
|
||||||
|
|
||||||
readonly property int mirrorTextHeight: keyboardRowHeight
|
readonly property int mirrorTextHeight: keyboardRowHeight
|
||||||
|
|
||||||
property bool password: false
|
property bool password: false
|
||||||
property alias mirroredText: mirrorText.text
|
property alias mirroredText: mirrorText.text
|
||||||
property bool showMirrorText: true
|
property bool showMirrorText: true
|
||||||
readonly property int raisedHeight: 200
|
|
||||||
|
|
||||||
height: enabled && raised ? raisedHeight + (showMirrorText ? keyboardRowHeight : 0) : 0
|
readonly property int raisedHeight: keyboardHeight + (showMirrorText ? keyboardRowHeight : 0)
|
||||||
|
|
||||||
|
height: enabled && raised ? raisedHeight : 0
|
||||||
visible: enabled && raised
|
visible: enabled && raised
|
||||||
|
|
||||||
property bool shiftMode: false
|
property bool shiftMode: false
|
||||||
|
@ -158,7 +160,7 @@ Rectangle {
|
||||||
id: keyboardRect
|
id: keyboardRect
|
||||||
y: showMirrorText ? mirrorTextHeight : 0
|
y: showMirrorText ? mirrorTextHeight : 0
|
||||||
width: keyboardWidth
|
width: keyboardWidth
|
||||||
height: raisedHeight
|
height: keyboardHeight
|
||||||
color: "#252525"
|
color: "#252525"
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
|
@ -167,7 +169,7 @@ Rectangle {
|
||||||
Column {
|
Column {
|
||||||
id: columnAlpha
|
id: columnAlpha
|
||||||
width: keyboardWidth
|
width: keyboardWidth
|
||||||
height: raisedHeight
|
height: keyboardHeight
|
||||||
visible: !numeric
|
visible: !numeric
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
|
@ -259,7 +261,7 @@ Rectangle {
|
||||||
Column {
|
Column {
|
||||||
id: columnNumeric
|
id: columnNumeric
|
||||||
width: keyboardWidth
|
width: keyboardWidth
|
||||||
height: raisedHeight
|
height: keyboardHeight
|
||||||
visible: numeric
|
visible: numeric
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
|
|
|
@ -34,6 +34,11 @@ TextField {
|
||||||
|
|
||||||
placeholderText: textField.placeholderText
|
placeholderText: textField.placeholderText
|
||||||
|
|
||||||
|
property bool rightAnchorSet: false;
|
||||||
|
anchors.onRightChanged: {
|
||||||
|
rightAnchorSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
font.family: "Fira Sans"
|
font.family: "Fira Sans"
|
||||||
font.pixelSize: hifi.fontSizes.textFieldInput
|
font.pixelSize: hifi.fontSizes.textFieldInput
|
||||||
height: implicitHeight + 3 // Make surrounding box higher so that highlight is vertically centered.
|
height: implicitHeight + 3 // Make surrounding box higher so that highlight is vertically centered.
|
||||||
|
@ -165,11 +170,11 @@ TextField {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
|
||||||
Binding on anchors.right {
|
Binding on anchors.right {
|
||||||
when: parent.right
|
when: rightAnchorSet
|
||||||
value: parent.right
|
value: textField.right
|
||||||
}
|
}
|
||||||
Binding on wrapMode {
|
Binding on wrapMode {
|
||||||
when: parent.right
|
when: rightAnchorSet
|
||||||
value: Text.WordWrap
|
value: Text.WordWrap
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -122,12 +122,6 @@ ModalWindow {
|
||||||
root.width = (targetWidth < d.minWidth) ? d.minWidth : ((targetWidth > d.maxWdith) ? d.maxWidth : targetWidth);
|
root.width = (targetWidth < d.minWidth) ? d.minWidth : ((targetWidth > d.maxWdith) ? d.maxWidth : targetWidth);
|
||||||
root.height = (targetHeight < d.minHeight) ? d.minHeight : ((targetHeight > d.maxHeight) ?
|
root.height = (targetHeight < d.minHeight) ? d.minHeight : ((targetHeight > d.maxHeight) ?
|
||||||
d.maxHeight : targetHeight);
|
d.maxHeight : targetHeight);
|
||||||
if (checkBoxField.visible && comboBoxField.visible) {
|
|
||||||
checkBoxField.width = extraInputs.width / 2;
|
|
||||||
comboBoxField.width = extraInputs.width / 2;
|
|
||||||
} else if (!checkBoxField.visible && comboBoxField.visible) {
|
|
||||||
comboBoxField.width = extraInputs.width;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,6 +192,15 @@ ModalWindow {
|
||||||
label: root.comboBox.label;
|
label: root.comboBox.label;
|
||||||
focus: Boolean(root.comboBox);
|
focus: Boolean(root.comboBox);
|
||||||
visible: Boolean(root.comboBox);
|
visible: Boolean(root.comboBox);
|
||||||
|
Binding on x {
|
||||||
|
when: comboBoxField.visible
|
||||||
|
value: !checkBoxField.visible ? buttons.x : acceptButton.x
|
||||||
|
}
|
||||||
|
|
||||||
|
Binding on width {
|
||||||
|
when: comboBoxField.visible
|
||||||
|
value: !checkBoxField.visible ? buttons.width : buttons.width - acceptButton.x
|
||||||
|
}
|
||||||
anchors {
|
anchors {
|
||||||
right: parent.right;
|
right: parent.right;
|
||||||
bottom: parent.bottom;
|
bottom: parent.bottom;
|
||||||
|
|
|
@ -140,12 +140,6 @@ TabletModalWindow {
|
||||||
root.width = (targetWidth < d.minWidth) ? d.minWidth : ((targetWidth > d.maxWdith) ? d.maxWidth : targetWidth);
|
root.width = (targetWidth < d.minWidth) ? d.minWidth : ((targetWidth > d.maxWdith) ? d.maxWidth : targetWidth);
|
||||||
modalWindowItem.height = (targetHeight < d.minHeight) ? d.minHeight : ((targetHeight > d.maxHeight) ?
|
modalWindowItem.height = (targetHeight < d.minHeight) ? d.minHeight : ((targetHeight > d.maxHeight) ?
|
||||||
d.maxHeight : targetHeight);
|
d.maxHeight : targetHeight);
|
||||||
if (checkBoxField.visible && comboBoxField.visible) {
|
|
||||||
checkBoxField.width = extraInputs.width / 2;
|
|
||||||
comboBoxField.width = extraInputs.width / 2;
|
|
||||||
} else if (!checkBoxField.visible && comboBoxField.visible) {
|
|
||||||
comboBoxField.width = extraInputs.width;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,6 +217,15 @@ TabletModalWindow {
|
||||||
label: root.comboBox.label;
|
label: root.comboBox.label;
|
||||||
focus: Boolean(root.comboBox);
|
focus: Boolean(root.comboBox);
|
||||||
visible: Boolean(root.comboBox);
|
visible: Boolean(root.comboBox);
|
||||||
|
Binding on x {
|
||||||
|
when: comboBoxField.visible
|
||||||
|
value: !checkBoxField.visible ? buttons.x : acceptButton.x
|
||||||
|
}
|
||||||
|
|
||||||
|
Binding on width {
|
||||||
|
when: comboBoxField.visible
|
||||||
|
value: !checkBoxField.visible ? buttons.width : buttons.width - acceptButton.x
|
||||||
|
}
|
||||||
anchors {
|
anchors {
|
||||||
right: parent.right;
|
right: parent.right;
|
||||||
bottom: parent.bottom;
|
bottom: parent.bottom;
|
||||||
|
|
Loading…
Reference in a new issue