19import QtQuick.Controls.Suru 2.2
20import Lomiri.Components 1.3
21import Lomiri.Components.Popups 1.3
22import Dekko.Components 1.0
23import Dekko.Lomiri.Constants 1.0
24import Dekko.Lomiri.Components 1.0
29 property alias title: header.title
30 default property alias settingsContent: mainContent.data
31 readonly property int maxHeight: units.gu(70)
32 readonly property int maxWidth: units.gu(100)
36 color: Suru.secondaryForegroundColor
41 readonly property bool shouldCenter: height === base.maxHeight
42 readonly property bool addTopMargin: height > units.gu(40)
43 aspect: LomiriShape.DropShadow
44 width: Math.min((parent.width / 3)*2, base.maxWidth)
45 height: Math.min((parent.height / 5)*4, base.maxHeight)
47 horizontalCenter: parent.horizontalCenter
48 top: shouldCenter ? undefined : parent.top
49 topMargin: shouldCenter ? undefined : (addTopMargin ? units.gu(6) : Style.defaultSpacing)
50 verticalCenter: shouldCenter ? parent.verticalCenter : undefined
52 color: Suru.backgroundColor
60 implicitHeight: height
61 backgroundVisible: false
64 onTriggered: PopupUtils.close(base)
74 acceptedButtons: Qt.LeftButton
75 onPressed: PopupUtils.close(base)