on xenial help sign in
restoreFromMinimized() -> restore()
0885e42Lukáš Tinkl
qml/Panel/Panel.qml+1−7
@@ -108,13 +108,7 @@ Item {
108 }
108 }
109 height: indicators.minimizedPanelHeight
109 height: indicators.minimizedPanelHeight
110 hoverEnabled: true
110 hoverEnabled: true
111− onClicked: {
112− if (callHint.visible) {
113− callHint.showLiveCall();
114− } else {
115− PanelState.focusMaximizedApp();
111+ onClicked: callHint.visible ? callHint.showLiveCall() : PanelState.focusMaximizedApp()
116− }
117− }
118 onDoubleClicked: PanelState.maximize()
112 onDoubleClicked: PanelState.maximize()
119
113
120 // 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 :/
qml/Stages/DesktopStage.qml+6−6
@@ -52,7 +52,7 @@ AbstractStage {
52 onFocusRequested: {
52 onFocusRequested: {
53 var appIndex = priv.indexOf(appId);
53 var appIndex = priv.indexOf(appId);
54 var appDelegate = appRepeater.itemAt(appIndex);
54 var appDelegate = appRepeater.itemAt(appIndex);
55− appDelegate.restoreFromMinimized();
55+ appDelegate.restore();
56
56
57 if (spread.state == "altTab") {
57 if (spread.state == "altTab") {
58 spread.cancel();
58 spread.cancel();
@@ -104,7 +104,7 @@ AbstractStage {
104 id: minimizeRestoreShortcut
104 id: minimizeRestoreShortcut
105 shortcut: Qt.MetaModifier|Qt.ControlModifier|Qt.Key_Down
105 shortcut: Qt.MetaModifier|Qt.ControlModifier|Qt.Key_Down
106 onTriggered: priv.focusedAppDelegate.maximized || priv.focusedAppDelegate.maximizedLeft || priv.focusedAppDelegate.maximizedRight
106 onTriggered: priv.focusedAppDelegate.maximized || priv.focusedAppDelegate.maximizedLeft || priv.focusedAppDelegate.maximizedRight
107− ? priv.focusedAppDelegate.restore() : priv.focusedAppDelegate.minimize()
107+ ? priv.focusedAppDelegate.restoreFromMaximized() : priv.focusedAppDelegate.minimize()
108 active: priv.focusedAppDelegate !== null
108 active: priv.focusedAppDelegate !== null
109 }
109 }
110
110
@@ -174,7 +174,7 @@ AbstractStage {
174 }
174 }
175 onMinimize: priv.focusedAppDelegate && priv.focusedAppDelegate.minimize();
175 onMinimize: priv.focusedAppDelegate && priv.focusedAppDelegate.minimize();
176 onMaximize: priv.focusedAppDelegate // don't restore minimized apps when double clicking the panel
176 onMaximize: priv.focusedAppDelegate // don't restore minimized apps when double clicking the panel
177− && priv.focusedAppDelegate.restore();
177+ && priv.focusedAppDelegate.restoreFromMaximized();
178 onFocusMaximizedApp: ApplicationManager.focusApplication(appRepeater.itemAt(priv.foregroundMaximizedAppIdIndex).appId)
178 onFocusMaximizedApp: ApplicationManager.focusApplication(appRepeater.itemAt(priv.foregroundMaximizedAppIdIndex).appId)
179 }
179 }
180
180
@@ -293,14 +293,14 @@ AbstractStage {
293 animationsEnabled = (animated === undefined) || animated;
293 animationsEnabled = (animated === undefined) || animated;
294 minimized = true;
294 minimized = true;
295 }
295 }
296− function restore(animated) {
296+ function restoreFromMaximized(animated) {
297 animationsEnabled = (animated === undefined) || animated;
297 animationsEnabled = (animated === undefined) || animated;
298 minimized = false;
298 minimized = false;
299 maximized = false;
299 maximized = false;
300 maximizedLeft = false;
300 maximizedLeft = false;
301 maximizedRight = false;
301 maximizedRight = false;
302 }
302 }
303− function restoreFromMinimized(animated) {
303+ function restore(animated) {
304 animationsEnabled = (animated === undefined) || animated;
304 animationsEnabled = (animated === undefined) || animated;
305 minimized = false;
305 minimized = false;
306 if (maximized)
306 if (maximized)
@@ -423,7 +423,7 @@ AbstractStage {
423
423
424 onClose: ApplicationManager.stopApplication(model.appId)
424 onClose: ApplicationManager.stopApplication(model.appId)
425 onMaximize: appDelegate.maximized || appDelegate.maximizedLeft || appDelegate.maximizedRight
425 onMaximize: appDelegate.maximized || appDelegate.maximizedLeft || appDelegate.maximizedRight
426− ? appDelegate.restore() : appDelegate.maximize()
426+ ? appDelegate.restoreFromMaximized() : appDelegate.maximize()
427 onMinimize: appDelegate.minimize()
427 onMinimize: appDelegate.minimize()
428 onDecorationPressed: { ApplicationManager.focusApplication(model.appId) }
428 onDecorationPressed: { ApplicationManager.focusApplication(model.appId) }
429 }
429 }
tests/qmltests/Stages/tst_DesktopStage.qml+1−1
@@ -370,7 +370,7 @@ Item {
370 compare(cameraApp.session.surface.visible, true);
370 compare(cameraApp.session.surface.visible, true);
371
371
372 // restore
372 // restore
373− dialerDelegate.restore();
373+ dialerDelegate.restoreFromMaximized();
374 compare(dashApp.session.surface.visible, false); // dash is occluded by the fullscreen camera ;)
374 compare(dashApp.session.surface.visible, false); // dash is occluded by the fullscreen camera ;)
375 compare(cameraApp.session.surface.visible, true);
375 compare(cameraApp.session.surface.visible, true);
376 }
376 }