mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
align combobox to accept/cancel buttons, otherwise stretch to buttons area
This commit is contained in:
parent
9ec10bbb7e
commit
91488bbbeb
2 changed files with 18 additions and 12 deletions
|
@ -122,12 +122,6 @@ ModalWindow {
|
|||
root.width = (targetWidth < d.minWidth) ? d.minWidth : ((targetWidth > d.maxWdith) ? d.maxWidth : targetWidth);
|
||||
root.height = (targetHeight < d.minHeight) ? d.minHeight : ((targetHeight > d.maxHeight) ?
|
||||
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;
|
||||
focus: 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 {
|
||||
right: parent.right;
|
||||
bottom: parent.bottom;
|
||||
|
|
|
@ -140,12 +140,6 @@ TabletModalWindow {
|
|||
root.width = (targetWidth < d.minWidth) ? d.minWidth : ((targetWidth > d.maxWdith) ? d.maxWidth : targetWidth);
|
||||
modalWindowItem.height = (targetHeight < d.minHeight) ? d.minHeight : ((targetHeight > d.maxHeight) ?
|
||||
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;
|
||||
focus: 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 {
|
||||
right: parent.right;
|
||||
bottom: parent.bottom;
|
||||
|
|
Loading…
Reference in a new issue