~aacid/unity8/disabledMenus

« back to all changes in this revision

Viewing changes to qml/Stage/DecoratedWindow.qml

  • Committer: Albert Astals Cid
  • Date: 2017-03-13 14:13:50 UTC
  • mfrom: (2848.1.1 aboutToShow)
  • Revision ID: albert.astals@canonical.com-20170313141350-a0ao3x3jjmarhk7j
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
    signal decorationPressed()
81
81
    signal decorationReleased()
82
82
 
 
83
    function cancelDrag() {
 
84
        moveHandler.cancelDrag();
 
85
    }
 
86
 
83
87
    QtObject {
84
88
        id: d
85
89
        property int requestedDecorationHeight: root.hasDecoration ? decoration.height : 0
204
208
        height: units.gu(3)
205
209
 
206
210
        title: applicationWindow.title
 
211
        windowMoving: moveHandler.moving && !altDragHandler.dragging
207
212
 
208
213
        opacity: root.hasDecoration ? Math.min(1, root.showDecoration) : 0
209
214
        Behavior on opacity { UbuntuNumberAnimation { } }
210
215
 
211
216
        onPressed: root.decorationPressed();
212
217
        onPressedChanged: moveHandler.handlePressedChanged(pressed, pressedButtons, mouseX, mouseY)
 
218
        onPressedChangedEx: moveHandler.handlePressedChanged(pressed, pressedButtons, mouseX, mouseY)
213
219
        onPositionChanged: moveHandler.handlePositionChanged(mouse)
214
220
        onReleased: {
215
221
            root.decorationReleased();
255
261
    }
256
262
 
257
263
    MouseArea {
 
264
        id: altDragHandler
258
265
        anchors.fill: applicationWindow
259
266
        acceptedButtons: Qt.LeftButton
260
267
        property bool dragging: false