~dandrader/unity8/multiInstanceApp

« back to all changes in this revision

Viewing changes to qml/Panel/Panel.qml

Initial merge from trunk; some tests don't run again yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2013-2015 Canonical, Ltd.
 
2
 * Copyright (C) 2013-2016 Canonical, Ltd.
3
3
 *
4
4
 * This program is free software; you can redistribute it and/or modify
5
5
 * it under the terms of the GNU General Public License as published by
100
100
            }
101
101
            height: indicators.minimizedPanelHeight
102
102
            hoverEnabled: true
103
 
            onClicked: callHint.visible ? callHint.showLiveCall() : PanelState.focusMaximizedApp()
104
 
            onDoubleClicked: PanelState.restoreClicked()
 
103
            onClicked: if (callHint.visible) { callHint.showLiveCall(); }
105
104
 
106
 
            property bool mouseWasPressed: false
107
 
            onPressed: mouseWasPressed = containsPress
108
 
            onMouseYChanged: {
109
 
                if (mouseWasPressed && mouseY > panelHeight) {
110
 
                    PanelState.restoreClicked(); // restore the window when "dragging" the panel down
111
 
                    mouseWasPressed = false;
 
105
            onPressed: {
 
106
                if (!callHint.visible) {
 
107
                    // let it fall through to the window decoration of the maximized window behind, if any
 
108
                    mouse.accepted = false;
112
109
                }
113
110
            }
114
111
 
120
117
                anchors {
121
118
                    left: parent.left
122
119
                    top: parent.top
123
 
                    leftMargin: units.gu(1)
124
 
                    topMargin: units.gu(0.5)
125
 
                    bottomMargin: units.gu(0.5)
126
120
                }
127
 
                height: indicators.minimizedPanelHeight - anchors.topMargin - anchors.bottomMargin
 
121
                height: indicators.minimizedPanelHeight
128
122
 
129
123
                visible: ((PanelState.buttonsVisible && parent.containsMouse) || PanelState.buttonsAlwaysVisible)
130
124
                         && !root.locked && !callHint.visible
183
177
            }
184
178
            color: "white"
185
179
            height: indicators.minimizedPanelHeight - anchors.topMargin - anchors.bottomMargin
186
 
            visible: !windowControlButtons.visible && !root.locked && !callHint.visible
 
180
            opacity: !windowControlButtons.visible && !root.locked && !callHint.visible ? 1 : 0
 
181
            visible: opacity != 0
187
182
            verticalAlignment: Text.AlignVCenter
188
183
            fontSize: "medium"
189
184
            font.weight: PanelState.buttonsVisible ? Font.Light : Font.Medium
190
185
            text: PanelState.title
191
186
            elide: Text.ElideRight
192
187
            maximumLineCount: 1
 
188
            Behavior on opacity { UbuntuNumberAnimation {} }
193
189
        }
194
190
 
195
191
        // TODO here would the Locally integrated menus come