Advertisement
Guest User

example_code

a guest
Jun 22nd, 2016
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1. import QtQuick 2.0
  2. import Sailfish.Silica 1.0
  3. import org.nemomobile.lipstick 0.1
  4. import org.nemomobile.configuration 1.0
  5.  
  6. Page {
  7. id: page
  8.  
  9. ConfigurationGroup {
  10. id: customSHUTDOWNscreen
  11. path: "/desktop/lipstick/shutdownscreen"
  12. property string shutdown: shutdownInput.text
  13. property string reboot: rebootInput.text
  14. }
  15.  
  16. property bool rotated: Lipstick.compositor.topmostWindowOrientation & (Qt.LandscapeOrientation | Qt.InvertedLandscapeOrientation)
  17.  
  18. SilicaFlickable {
  19. anchors.fill: parent
  20. contentHeight: content.height
  21.  
  22. Column {
  23. id: content
  24. width: parent.width
  25. spacing: Theme.paddingLarge
  26.  
  27. PageHeader {
  28. title: "Shutdown screen"
  29. }
  30.  
  31. Label {
  32. width: parent.width
  33. wrapMode: Text.WordWrap
  34. anchors.left: parent.left
  35. anchors.leftMargin: Theme.paddingSmall*2
  36. anchors.right: parent.right
  37. anchors.rightMargin: Theme.paddingSmall*2
  38. horizontalAlignment: Text.AlignHLeft
  39. color: Theme.highlightColor
  40. font.pixelSize: Theme.fontSizeSmall
  41. text: "Change the \"One moment...\" and \"Goodbye!\" text to your prefered custom text."
  42. }
  43.  
  44. Item {
  45. width: parent.width
  46. height: Theme.paddingMedium
  47. }
  48.  
  49. TextArea {
  50. id: rebootInput
  51. width: parent.width
  52. placeholderText: "Type your Reboot-text here"
  53. label: "Enter your Reboot-text"
  54. text: customSHUTDOWNscreen.reboot
  55. focusOutBehavior: customSHUTDOWNscreen.reboot = text
  56. }
  57.  
  58. Item {
  59. width: parent.width
  60. height: Theme.paddingMedium
  61. }
  62.  
  63. TextArea {
  64. id: shutdownInput
  65. width: parent.width
  66. placeholderText: "Type your Shutdown-text here"
  67. label: "Enter your Shutdown-text"
  68. text: customSHUTDOWNscreen.shutdown
  69. focusOutBehavior: customSHUTDOWNscreen.shutdown = text
  70. }
  71.  
  72. Item {
  73. width: parent.width
  74. height: Screen.sizeCategory < Screen.Large ? Theme.paddingLarge*6 : (rotated ? Theme.paddingLarge*6 : Theme.paddingLarge*18)
  75. }
  76.  
  77. Label {
  78. width: parent.width
  79. wrapMode: Text.Wrap
  80. horizontalAlignment: Text.AlignHCenter
  81. text: "Created by Schturman\nThanks to Markkyboy & Eatdirt\nfor finding a correct place for changing."
  82. }
  83. }
  84. }
  85. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement