ngpbento

lightdm-kde userbar fadeout

Aug 4th, 2012
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.03 KB | None | 0 0
  1. --- main.qml.org    2012-08-04 15:52:47.871304040 +0100
  2. +++ main.qml    2012-08-04 15:47:54.631316695 +0100
  3. @@ -52,13 +52,8 @@
  4.          }
  5.  
  6.          onAuthenticationComplete: {
  7. -            var session = sessionButton.dataForIndex(sessionButton.currentIndex);
  8. -            console.log("session: " + session);
  9. -            if (session == "") {
  10. -                session = "default";
  11. -            }
  12.              if(greeter.authenticated) {
  13. -                greeter.startSessionSync(session);
  14. +                loginAnimation.start();
  15.              } else {
  16.                  feedbackLabel.text = i18n("Sorry, incorrect password. Please try again.");
  17.                  feedbackLabel.showFeedback();
  18. @@ -68,6 +63,26 @@
  19.          }
  20.      }
  21.  
  22. +    function doSessionSync() {
  23. +       var session = sessionButton.dataForIndex(sessionButton.currentIndex);
  24. +       if (session == "") {
  25. +           session = "default";
  26. +       }
  27. +       xhandler.setRootImage();
  28. +       greeter.startSessionSync(session);
  29. +    }
  30. +
  31. +    ParallelAnimation {
  32. +        id: loginAnimation
  33. +        NumberAnimation { target: welcomeLabel; property: "opacity"; to: 0; duration: 400; easing.type: Easing.InOutQuad }
  34. +        NumberAnimation { target: feedbackLabel; property: "opacity"; to: 0; duration: 400; easing.type: Easing.InOutQuad }
  35. +        NumberAnimation { target: usersList; property: "opacity"; to: 0; duration: 400; easing.type: Easing.InOutQuad }
  36. +        NumberAnimation { target: loginButtonItem; property: "opacity"; to: 0; duration: 400; easing.type: Easing.InOutQuad }
  37. +        NumberAnimation { target: sessionButton; property: "opacity"; to: 0; duration: 400; easing.type: Easing.InOutQuad }
  38. +        NumberAnimation { target: powerBar; property: "opacity"; to: 0; duration: 400; easing.type: Easing.InOutQuad }
  39. +        onCompleted: doSessionSync()
  40. +    }
  41. +
  42.      Component.onCompleted: {
  43.          setTabOrder([usersList, loginButtonItem, sessionButton, suspendButton, hibernateButton, restartButton, shutdownButton]);
  44.          usersList.forceActiveFocus();
Advertisement
Add Comment
Please, Sign In to add comment