diff --git a/interface/resources/qml/dialogs/MessageDialog.qml b/interface/resources/qml/dialogs/MessageDialog.qml index 4275428d31..30f492e36a 100644 --- a/interface/resources/qml/dialogs/MessageDialog.qml +++ b/interface/resources/qml/dialogs/MessageDialog.qml @@ -51,6 +51,9 @@ ModalWindow { property int clickedButton: OriginalDialogs.StandardButton.NoButton; focus: defaultButton === OriginalDialogs.StandardButton.NoButton + property int titleWidth: 0 + onTitleWidthChanged: d.resize(); + function updateIcon() { if (!root) { return; @@ -72,7 +75,7 @@ ModalWindow { readonly property int maxHeight: 720 function resize() { - var targetWidth = mainTextContainer.contentWidth + var targetWidth = Math.max(titleWidth, mainTextContainer.contentWidth) var targetHeight = mainTextContainer.height + 3 * hifi.dimensions.contentSpacing.y + (informativeTextContainer.text != "" ? informativeTextContainer.contentHeight + 3 * hifi.dimensions.contentSpacing.y : 0) + buttons.height 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) diff --git a/interface/resources/qml/hifi/MenuOption.qml b/interface/resources/qml/hifi/MenuOption.qml index da28d1daf3..9d18b56d57 100644 --- a/interface/resources/qml/hifi/MenuOption.qml +++ b/interface/resources/qml/hifi/MenuOption.qml @@ -10,7 +10,7 @@ QtObject { readonly property string animDebugDrawPosition: "Debug Draw Position"; readonly property string antialiasing: "Antialiasing"; readonly property string assetMigration: "ATP Asset Migration"; - readonly property string assetServer = "Asset Server"; + readonly property string assetServer: "Asset Server"; readonly property string atmosphere: "Atmosphere"; readonly property string attachments: "Attachments..."; readonly property string audioNetworkStats: "Audio Network Stats"; diff --git a/interface/resources/qml/windows-uit/ModalFrame.qml b/interface/resources/qml/windows-uit/ModalFrame.qml index 5c6556021e..77344829d5 100644 --- a/interface/resources/qml/windows-uit/ModalFrame.qml +++ b/interface/resources/qml/windows-uit/ModalFrame.qml @@ -50,6 +50,8 @@ Frame { width: title.width + (icon.text !== "" ? icon.width + hifi.dimensions.contentSpacing.x : 0) x: (parent.width - width) / 2 + onWidthChanged: window.titleWidth = width + HiFiGlyphs { id: icon text: window.iconText ? window.iconText : "" diff --git a/interface/src/ui/ScriptEditorWidget.cpp b/interface/src/ui/ScriptEditorWidget.cpp index df66d1e3e1..264cd22370 100644 --- a/interface/src/ui/ScriptEditorWidget.cpp +++ b/interface/src/ui/ScriptEditorWidget.cpp @@ -226,8 +226,8 @@ void ScriptEditorWidget::onWindowActivated() { if (QFileInfo(_currentScript).lastModified() > _currentScriptModified) { if (static_cast(this->parent()->parent()->parent())->autoReloadScripts() - || OffscreenUi::warning(this, _currentScript, - tr("This file has been modified outside of the Interface editor.") + "\n\n" + || OffscreenUi::question(this, tr("Reload Script"), + tr("The following file has been modified outside of the Interface editor:") + "\n" + _currentScript + "\n" + (isModified() ? tr("Do you want to reload it and lose the changes you've made in the Interface editor?") : tr("Do you want to reload it?")),