on xenial help sign in
implement the fullscreen as a state
05774cdLukáš Tinkl
qml/Stages/DesktopStage.qml+13−20
@@ -325,6 +325,10 @@ AbstractStage {
325 }
325 }
326
326
327 states: [
327 states: [
328+ State {
329+ name: "fullscreen"; when: decoratedWindow.fullscreen
330+ extend: "maximized"
331+ },
328 State {
332 State {
329 name: "normal";
333 name: "normal";
330 when: !appDelegate.maximized && !appDelegate.minimized
334 when: !appDelegate.maximized && !appDelegate.minimized
@@ -372,15 +376,6 @@ AbstractStage {
372 PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
376 PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
373 PropertyAnimation { target: appDelegate; properties: "x,y,opacity,width,height,scale" }
377 PropertyAnimation { target: appDelegate; properties: "x,y,opacity,width,height,scale" }
374 },
378 },
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− },
384 Transition {
379 Transition {
385 to: "minimized"
380 to: "minimized"
386 enabled: appDelegate.animationsEnabled
381 enabled: appDelegate.animationsEnabled
@@ -396,6 +391,15 @@ AbstractStage {
396 }
391 }
397 }
392 }
398 }
393 }
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+ }
399 }
403 }
400 ]
404 ]
401
405
@@ -407,17 +411,6 @@ AbstractStage {
407 when: index == spread.highlightedIndex && blurLayer.ready
411 when: index == spread.highlightedIndex && blurLayer.ready
408 }
412 }
409
413
410− Connections {
411− target: decoratedWindow
412− onFullscreenChanged: {
413− if (decoratedWindow.fullscreen) {
414− appDelegate.maximize();
415− } else {
416− appDelegate.restoreFromMinimized();
417− }
418− }
419− }
420−
421 WindowResizeArea {
414 WindowResizeArea {
422 objectName: "windowResizeArea"
415 objectName: "windowResizeArea"
423 target: appDelegate
416 target: appDelegate