mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Fix some QML warnings
This commit is contained in:
parent
48d4316714
commit
bef8c5a807
2 changed files with 5 additions and 2 deletions
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue