2
import Unity.Application 0.1
8
property alias surface: surfaceItem.surface
9
property bool touchMode: false
11
width: surfaceItem.implicitWidth + 2*borderThickness
12
height: surfaceItem.implicitHeight + 2*borderThickness + titleBar.height
14
signal cloneRequested()
15
property bool cloned: false
19
x -= borderThicknessTouch - borderThicknessMouse;
20
width += 2*(borderThicknessTouch - borderThicknessMouse);
21
y -= borderThicknessTouch - borderThicknessMouse;
22
height += 2*(borderThicknessTouch - borderThicknessMouse);
24
x += borderThicknessTouch - borderThicknessMouse;
25
width -= 2*(borderThicknessTouch - borderThicknessMouse);
26
y += borderThicknessTouch - borderThicknessMouse;
27
height -= 2*(borderThicknessTouch - borderThicknessMouse);
31
readonly property real minWidth: 100
32
readonly property real minHeight: 100
34
property real borderThickness: touchMode ? borderThicknessTouch : borderThicknessMouse
35
readonly property real borderThicknessMouse: 10
36
readonly property real borderThicknessTouch: 40
41
when: (surface && !surface.live) || titleBar.closeRequested
46
from: ""; to: "closed"
51
easing.type: Easing.InBack
56
ScriptAction { script: { root.destroy(); } }
63
borderThickness: root.borderThickness
69
anchors.left: parent.left
70
anchors.leftMargin: root.borderThickness
71
anchors.right: parent.right
72
anchors.rightMargin: root.borderThickness
73
anchors.top: parent.top
74
anchors.topMargin: root.borderThickness
78
onCloneRequested: { root.cloneRequested(); }
84
anchors.top: titleBar.bottom
85
anchors.left: parent.left
86
anchors.leftMargin: root.borderThickness
87
anchors.right: parent.right
88
anchors.rightMargin: root.borderThickness
89
anchors.bottom: parent.bottom
90
anchors.bottomMargin: root.borderThickness
92
consumesInput: !root.cloned
93
surfaceWidth: root.cloned ? -1 : width
94
surfaceHeight: root.cloned ? -1 : height