mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 21:36:47 +02: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 {
|
RalewaySemiBold {
|
||||||
id: mainTextContainer
|
id: mainTextContainer
|
||||||
onTextChanged: d.resize();
|
onTextChanged: d.resize();
|
||||||
wrapMode: Text.contains("\n") ? Text.NoWrap : Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
size: hifi.fontSizes.menuItem
|
size: hifi.fontSizes.menuItem
|
||||||
color: hifi.colors.baseGrayHighlight
|
color: hifi.colors.baseGrayHighlight
|
||||||
anchors {
|
anchors {
|
||||||
|
|
|
@ -42,6 +42,9 @@ ModalWindow {
|
||||||
// For combo boxes
|
// For combo boxes
|
||||||
property bool editable: true;
|
property bool editable: true;
|
||||||
|
|
||||||
|
property int titleWidth: 0
|
||||||
|
onTitleWidthChanged: d.resize();
|
||||||
|
|
||||||
function updateIcon() {
|
function updateIcon() {
|
||||||
if (!root) {
|
if (!root) {
|
||||||
return;
|
return;
|
||||||
|
@ -63,7 +66,7 @@ ModalWindow {
|
||||||
readonly property int maxHeight: 720
|
readonly property int maxHeight: 720
|
||||||
|
|
||||||
function resize() {
|
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
|
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.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)
|
root.height = (targetHeight < d.minHeight) ? d.minHeight: ((targetHeight > d.maxHeight) ? d.maxHeight : targetHeight)
|
||||||
|
|
Loading…
Reference in a new issue