on xenial help sign in
implement the fullscreen as a state
commit05774cd8fdf99ec69aa8b8433f329d546e0fae74 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateFri 6 Nov 2015, 19:28 (11 years ago) parentcd712a4
1 file changed+13−20
qml/Stages/DesktopStage.qml+13−20
qml/Stages/DesktopStage.qml+13−20
@@ -325,6 +325,10 @@ AbstractStage {
325325 }
326326
327327 states: [
328+ State {
329+ name: "fullscreen"; when: decoratedWindow.fullscreen
330+ extend: "maximized"
331+ },
328332 State {
329333 name: "normal";
330334 when: !appDelegate.maximized && !appDelegate.minimized
@@ -372,15 +376,6 @@ AbstractStage {
372376 PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
373377 PropertyAnimation { target: appDelegate; properties: "x,y,opacity,width,height,scale" }
374378 },
375− Transition {
376− to: "maximized"
377− enabled: appDelegate.animationsEnabled
378− PropertyAction { target: appDelegate; property: "visuallyMinimized" }
379− SequentialAnimation {
380− PropertyAnimation { target: appDelegate; properties: "x,y,opacity,width,height,scale" }
381− PropertyAction { target: appDelegate; property: "visuallyMaximized" }
382− }
383− },
384379 Transition {
385380 to: "minimized"
386381 enabled: appDelegate.animationsEnabled
@@ -396,6 +391,15 @@ AbstractStage {
396391 }
397392 }
398393 }
394+ },
395+ Transition {
396+ to: "*" //maximized and fullscreen
397+ enabled: appDelegate.animationsEnabled
398+ PropertyAction { target: appDelegate; property: "visuallyMinimized" }
399+ SequentialAnimation {
400+ PropertyAnimation { target: appDelegate; properties: "x,y,opacity,width,height,scale" }
401+ PropertyAction { target: appDelegate; property: "visuallyMaximized" }
402+ }
399403 }
400404 ]
401405
@@ -407,17 +411,6 @@ AbstractStage {
407411 when: index == spread.highlightedIndex && blurLayer.ready
408412 }
409413
410− Connections {
411− target: decoratedWindow
412− onFullscreenChanged: {
413− if (decoratedWindow.fullscreen) {
414− appDelegate.maximize();
415− } else {
416− appDelegate.restoreFromMinimized();
417− }
418− }
419− }
420−
421414 WindowResizeArea {
422415 objectName: "windowResizeArea"
423416 target: appDelegate