From bef8c5a807c9fe55fd75743dc43af3590ca92c29 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 17 Mar 2016 09:51:32 +1300 Subject: [PATCH] Fix some QML warnings --- interface/resources/qml/dialogs/MessageDialog.qml | 2 +- interface/resources/qml/dialogs/QueryDialog.qml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/interface/resources/qml/dialogs/MessageDialog.qml b/interface/resources/qml/dialogs/MessageDialog.qml index 837f61a15c..30f492e36a 100644 --- a/interface/resources/qml/dialogs/MessageDialog.qml +++ b/interface/resources/qml/dialogs/MessageDialog.qml @@ -88,7 +88,7 @@ ModalWindow { RalewaySemiBold { id: mainTextContainer onTextChanged: d.resize(); - wrapMode: Text.contains("\n") ? Text.NoWrap : Text.WordWrap + wrapMode: Text.WordWrap size: hifi.fontSizes.menuItem color: hifi.colors.baseGrayHighlight anchors { diff --git a/interface/resources/qml/dialogs/QueryDialog.qml b/interface/resources/qml/dialogs/QueryDialog.qml index 48df9a41ce..0c7772dc94 100644 --- a/interface/resources/qml/dialogs/QueryDialog.qml +++ b/interface/resources/qml/dialogs/QueryDialog.qml @@ -42,6 +42,9 @@ ModalWindow { // For combo boxes property bool editable: true; + property int titleWidth: 0 + onTitleWidthChanged: d.resize(); + function updateIcon() { if (!root) { return; @@ -63,7 +66,7 @@ ModalWindow { readonly property int maxHeight: 720 function resize() { - var targetWidth = pane.width + var targetWidth = Math.max(titleWidth, pane.width) var targetHeight = (items ? comboBox.controlHeight : textResult.controlHeight) + 5 * hifi.dimensions.contentSpacing.y + buttons.height 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)