Fix NymeaDialog implicit width warning
This commit is contained in:
parent
82aa5efe6f
commit
0c663e9d49
@ -25,11 +25,13 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
import Nymea
|
import Nymea
|
||||||
|
|
||||||
Dialog {
|
Dialog {
|
||||||
id: root
|
id: root
|
||||||
width: Math.min(parent.width * .8, Math.max(contentLabel.implicitWidth, 400))
|
implicitWidth: Math.max(contentLabel.implicitWidth + app.margins * 2, 400)
|
||||||
|
width: Math.min((parent ? parent.width : Screen.width) * .8, implicitWidth)
|
||||||
x: (parent.width - width) / 2
|
x: (parent.width - width) / 2
|
||||||
y: (parent.height - height) / 2
|
y: (parent.height - height) / 2
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user