on xenial help sign in
extract the drag-down-panel feature into a different branch
4d09f00Lukáš Tinkl
qml/Panel/Panel.qml−10
@@ -101,7 +101,6 @@ Item {
101 }
101 }
102
102
103 MouseArea {
103 MouseArea {
104− objectName: "windowControlArea"
105 anchors {
104 anchors {
106 top: parent.top
105 top: parent.top
107 left: parent.left
106 left: parent.left
@@ -112,15 +111,6 @@ Item {
112 onClicked: callHint.visible ? callHint.showLiveCall() : PanelState.focusMaximizedApp()
111 onClicked: callHint.visible ? callHint.showLiveCall() : PanelState.focusMaximizedApp()
113 onDoubleClicked: PanelState.maximize()
112 onDoubleClicked: PanelState.maximize()
114
113
115− property bool mouseWasPressed: false
116− onPressed: mouseWasPressed = containsPress
117− onExited: {
118− if (mouseWasPressed && !indicatorAreaBackground.contains(Qt.point(mouseX, mouseY))) {
119− PanelState.maximize(); // restore the window when "dragging" the panel down
120− mouseWasPressed = false;
121− }
122− }
123−
124 // WindowControlButtons inside the mouse area, otherwise QML doesn't grok nested hover events :/
114 // WindowControlButtons inside the mouse area, otherwise QML doesn't grok nested hover events :/
125 // cf. https://bugreports.qt.io/browse/QTBUG-32909
115 // cf. https://bugreports.qt.io/browse/QTBUG-32909
126 WindowControlButtons {
116 WindowControlButtons {
tests/qmltests/tst_Shell.qml−24
@@ -2344,29 +2344,5 @@ Rectangle {
2344 tryCompare(app2.session.lastSurface, "keymapLayout", "fr");
2344 tryCompare(app2.session.lastSurface, "keymapLayout", "fr");
2345 tryCompare(app2.session.lastSurface, "keymapVariant", "");
2345 tryCompare(app2.session.lastSurface, "keymapVariant", "");
2346 }
2346 }
2347−
2348− function test_dragPanelToRestoreMaximizedWindow() {
2349− loadShell("desktop");
2350− shell.usageScenario = "desktop";
2351− waitForRendering(shell);
2352− var panel = findChild(shell, "windowControlArea");
2353− verify(panel);
2354−
2355− var app = ApplicationManager.startApplication("dialer-app")
2356− waitUntilAppWindowIsFullyLoaded(app);
2357−
2358− // start dialer, maximize it
2359− var appContainer = findChild(shell, "appContainer");
2360− var appDelegate = findChild(appContainer, "appDelegate_dialer-app");
2361− verify(appDelegate);
2362− appDelegate.maximize();
2363− tryCompare(appDelegate, "state", "maximized");
2364−
2365− mousePress(panel);
2366− mouseMove(shell, shell.width/2, shell.height/2);
2367− mouseRelease(shell);
2368−
2369− tryCompare(appDelegate, "state", "normal");
2370− }
2371 }
2347 }
2372}
2348}