Advertisement
Guest User

Untitled

a guest
Jan 5th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.21 KB | None | 0 0
  1. diff --git a/RemorseItem.qml b/RemorseItem.qml
  2. index 931bf89..0a38035 100644
  3. --- a/RemorseItem.qml
  4. +++ b/RemorseItem.qml
  5. @@ -246,6 +246,34 @@ BackgroundItem {
  6. }
  7. }
  8.  
  9. + BackgroundItem {
  10. + anchors {
  11. + right: parent.right
  12. + bottom: parent.bottom
  13. + }
  14. + property bool wideRemorse: parent.width >= (2 * parent.height)
  15. +
  16. + height: wideRemorse ? parent.height : (promptIcon.height + Theme.paddingMedium)
  17. + width: promptIcon.width + (Theme.paddingMedium * (wideRemorse ? 2 : 1))
  18. + Image {
  19. + id: promptIcon
  20. + anchors {
  21. + right: parent.right
  22. + rightMargin: Theme.paddingMedium
  23. + bottom: parent.bottom
  24. + bottomMargin: Theme.paddingSmall
  25. + }
  26. + source: "image://theme/icon-m-certificates" + (remorseItem.highlighted ? "?" + Theme.highlightColor : "")
  27. + smooth: true
  28. + fillMode: Image.PreserveAspectFit
  29. + opacity: remorseItem._contentOpacity
  30. + }
  31. + onClicked: {
  32. + remorseItem.state = "activePending"
  33. + _execute(true)
  34. + }
  35. + }
  36. +
  37. NumberAnimation {
  38. id: countdown
  39. target: remorseItem
  40. diff --git a/RemorsePopup.qml b/RemorsePopup.qml
  41. index b2b3069..a8cc90d 100644
  42. --- a/RemorsePopup.qml
  43. +++ b/RemorsePopup.qml
  44. @@ -202,26 +202,39 @@ BackgroundItem {
  45. }
  46. }
  47. }
  48. - Image {
  49. - id: promptIcon
  50.  
  51. + BackgroundItem {
  52. anchors {
  53. - verticalCenter: parent.verticalCenter
  54. - verticalCenterOffset: row.height/2
  55. - left: row.left
  56. - leftMargin: Theme.paddingMedium
  57. + right: row.right
  58. + }
  59. + property bool wideRemorse: parent.width >= (2 * parent.height)
  60. +
  61. + height: wideRemorse ? parent.height : (promptIcon.height + Theme.paddingMedium)
  62. + width: promptIcon.width + (Theme.paddingLarge * (wideRemorse ? 2 : 1))
  63. + Image {
  64. + id: promptIcon
  65. + anchors {
  66. + verticalCenter: parent.verticalCenter
  67. + right: parent.right
  68. + rightMargin: Theme.paddingLarge
  69. + }
  70. + source: "image://theme/icon-m-certificates" + (remorsePopup.highlighted ? "?" + Theme.highlightColor : "")
  71. + smooth: true
  72. + fillMode: Image.PreserveAspectFit
  73. + opacity: remorsePopup._contentOpacity
  74. }
  75. - source: "image://theme/icon-m-clear" + (remorsePopup.highlighted ? "?" + Theme.highlightColor : "")
  76. - smooth: true
  77. - fillMode: Image.PreserveAspectFit
  78. - opacity: remorsePopup._contentOpacity
  79. + onClicked: {
  80. + _execute()
  81. + _close()
  82. + }
  83. }
  84. +
  85. Column {
  86. anchors {
  87. - verticalCenter: promptIcon.verticalCenter
  88. - left: promptIcon.right
  89. - leftMargin: Theme.paddingMedium
  90. - right: parent.right
  91. + verticalCenter: parent.verticalCenter
  92. + right: promptIcon.left
  93. + leftMargin: Theme.paddingLarge
  94. + left: parent.left
  95. }
  96. Label {
  97. truncationMode: TruncationMode.Fade
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement