From b9399e06ec38c7ff6eb5bbb1cd709e8fc17c9be5 Mon Sep 17 00:00:00 2001 From: Igor Malinovskiy Date: Fri, 15 Sep 2017 13:34:40 +0300 Subject: [PATCH] Fix #3737 --- src/qml/value-editor/ValueTabs.qml | 30 ++++++------------- .../value-editor/editors/HashItemEditor.qml | 2 +- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/src/qml/value-editor/ValueTabs.qml b/src/qml/value-editor/ValueTabs.qml index 32926b6e..b933b10c 100644 --- a/src/qml/value-editor/ValueTabs.qml +++ b/src/qml/value-editor/ValueTabs.qml @@ -249,17 +249,11 @@ Repeater { Item { Layout.fillWidth: true; Layout.preferredHeight: 2;} } - onResizingChanged: { - if (resizing) { - valueEditor.maxHeight = 9999 - } - } - // Table RowLayout { id: navigationTable Layout.fillWidth: true - Layout.fillHeight: showValueNavigation + Layout.fillHeight: false visible: showValueNavigation TableView { @@ -565,20 +559,13 @@ Repeater { id: valueEditor Layout.fillWidth: true Layout.fillHeight: true - Layout.minimumHeight: 180 - - Layout.maximumHeight: maxHeight - property int maxHeight: 9999 - - Connections { - target: viewModel - - onReplaceTab: { - if (showValueNavigation && keyIndex === index) { - valueEditor.maxHeight = wrapper.height * 0.4 - } else { - valueEditor.maxHeight = 9999 - } + Layout.minimumHeight: 180 + Layout.maximumHeight: { + if (showValueNavigation) { + return (approot.height - bottomTabView.height - navigationTable.height + - editorButtonsRow.height - 50) + } else { + return approot.height - bottomTabView.height - editorButtonsRow.height - 50 } } @@ -618,6 +605,7 @@ Repeater { } RowLayout { + id: editorButtonsRow Layout.fillWidth: true Layout.minimumHeight: 40 Item { Layout.fillWidth: true} diff --git a/src/qml/value-editor/editors/HashItemEditor.qml b/src/qml/value-editor/editors/HashItemEditor.qml index d738c7a3..3b810998 100644 --- a/src/qml/value-editor/editors/HashItemEditor.qml +++ b/src/qml/value-editor/editors/HashItemEditor.qml @@ -16,7 +16,7 @@ AbstractEditor { id: keyText fieldLabel: qsTr("Key:") Layout.fillWidth: true - Layout.minimumHeight: 80 + Layout.minimumHeight: 30 Layout.preferredHeight: 90 value: ""