on xenial help sign in
restoreFromMinimized() -> restore()

restore() -> restoreFromMaximized()

commit0885e421b0f4406924655d87a63e8f896e0e65e6 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateMon 9 Nov 2015, 03:06 (11 years ago) parentb071a66
3 files changed+8−14
qml/Panel/Panel.qml+1−7 qml/Stages/DesktopStage.qml+6−6 tests/qmltests/Stages/tst_DesktopStage.qml+1−1
qml/Panel/Panel.qml+1−7
@@ -108,13 +108,7 @@ Item {
108108 }
109109 height: indicators.minimizedPanelHeight
110110 hoverEnabled: true
111− onClicked: {
112− if (callHint.visible) {
113− callHint.showLiveCall();
114− } else {
115− PanelState.focusMaximizedApp();
116− }
117− }
111+ onClicked: callHint.visible ? callHint.showLiveCall() : PanelState.focusMaximizedApp()
118112 onDoubleClicked: PanelState.maximize()
119113
120114 // WindowControlButtons inside the mouse area, otherwise QML doesn't grok nested hover events :/
qml/Stages/DesktopStage.qml+6−6
@@ -52,7 +52,7 @@ AbstractStage {
5252 onFocusRequested: {
5353 var appIndex = priv.indexOf(appId);
5454 var appDelegate = appRepeater.itemAt(appIndex);
55− appDelegate.restoreFromMinimized();
55+ appDelegate.restore();
5656
5757 if (spread.state == "altTab") {
5858 spread.cancel();
@@ -104,7 +104,7 @@ AbstractStage {
104104 id: minimizeRestoreShortcut
105105 shortcut: Qt.MetaModifier|Qt.ControlModifier|Qt.Key_Down
106106 onTriggered: priv.focusedAppDelegate.maximized || priv.focusedAppDelegate.maximizedLeft || priv.focusedAppDelegate.maximizedRight
107− ? priv.focusedAppDelegate.restore() : priv.focusedAppDelegate.minimize()
107+ ? priv.focusedAppDelegate.restoreFromMaximized() : priv.focusedAppDelegate.minimize()
108108 active: priv.focusedAppDelegate !== null
109109 }
110110
@@ -174,7 +174,7 @@ AbstractStage {
174174 }
175175 onMinimize: priv.focusedAppDelegate && priv.focusedAppDelegate.minimize();
176176 onMaximize: priv.focusedAppDelegate // don't restore minimized apps when double clicking the panel
177− && priv.focusedAppDelegate.restore();
177+ && priv.focusedAppDelegate.restoreFromMaximized();
178178 onFocusMaximizedApp: ApplicationManager.focusApplication(appRepeater.itemAt(priv.foregroundMaximizedAppIdIndex).appId)
179179 }
180180
@@ -293,14 +293,14 @@ AbstractStage {
293293 animationsEnabled = (animated === undefined) || animated;
294294 minimized = true;
295295 }
296− function restore(animated) {
296+ function restoreFromMaximized(animated) {
297297 animationsEnabled = (animated === undefined) || animated;
298298 minimized = false;
299299 maximized = false;
300300 maximizedLeft = false;
301301 maximizedRight = false;
302302 }
303− function restoreFromMinimized(animated) {
303+ function restore(animated) {
304304 animationsEnabled = (animated === undefined) || animated;
305305 minimized = false;
306306 if (maximized)
@@ -423,7 +423,7 @@ AbstractStage {
423423
424424 onClose: ApplicationManager.stopApplication(model.appId)
425425 onMaximize: appDelegate.maximized || appDelegate.maximizedLeft || appDelegate.maximizedRight
426− ? appDelegate.restore() : appDelegate.maximize()
426+ ? appDelegate.restoreFromMaximized() : appDelegate.maximize()
427427 onMinimize: appDelegate.minimize()
428428 onDecorationPressed: { ApplicationManager.focusApplication(model.appId) }
429429 }
tests/qmltests/Stages/tst_DesktopStage.qml+1−1
@@ -370,7 +370,7 @@ Item {
370370 compare(cameraApp.session.surface.visible, true);
371371
372372 // restore
373− dialerDelegate.restore();
373+ dialerDelegate.restoreFromMaximized();
374374 compare(dashApp.session.surface.visible, false); // dash is occluded by the fullscreen camera ;)
375375 compare(cameraApp.session.surface.visible, true);
376376 }