SHARE
TWEET

ShutDownItem.qml

a guest Jun 18th, 2016 100 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /****************************************************************************
  2.  **
  3.  ** Copyright (C) 2015 Jolla Ltd.
  4.  ** Contact: Andres Gomez <andres.gomez@jolla.com>
  5.  **
  6.  ****************************************************************************/
  7.  
  8. import QtQuick 2.0
  9. import Sailfish.Silica 1.0
  10.  
  11. Rectangle {
  12.     id: shutDownItem
  13.  
  14.     property alias message: shutDownMessage.text
  15.     property string userName
  16.  
  17.     color: "black"
  18.     anchors.fill: parent
  19.     Behavior on opacity {
  20.         NumberAnimation {
  21.             duration: 1000
  22.             onRunningChanged: if (!running) opacityAnimationFinished()
  23.         }
  24.     }
  25.  
  26.     signal opacityAnimationFinished()
  27.  
  28.     Label {
  29.         id: shutDownMessage
  30.         anchors.centerIn: parent
  31.         width: parent.width - 2 * Theme.horizontalPageMargin
  32.         // Non themable color since we always want it white over black
  33.         color: "white"
  34.         font.pixelSize: Theme.fontSizeExtraLarge
  35.         horizontalAlignment: Text.AlignHCenter
  36.         wrapMode: Text.WordWrap
  37.         text: shutDownItem.userName !== ""
  38.             //: Shut down message
  39.             //% "Goodbye %1!"
  40.             ? qsTrId("sailfish-components-lipstick-la-goodbye-user").arg(shutDownItem.userName)
  41.             //% "Goodbye!"
  42.             : qsTrId("sailfish-components-lipstick-la-goodbye")
  43.     }
  44. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top