Commit b1dac936 authored by Denis Kuplyakov's avatar Denis Kuplyakov
Browse files

Now user can define the showing state for Popup

User can pass needed state to show(...) function of Popup.
parent 0fac5068
...@@ -29,10 +29,10 @@ Rectangle { ...@@ -29,10 +29,10 @@ Rectangle {
border.color: colorScheme.border border.color: colorScheme.border
border.width: 1 border.width: 1
function show(message) { function show(message, showing_state) {
text.text = message text.text = message
timer.start(); timer.start();
state = "SHOWING" state = showing_state
} }
ColorScheme { ColorScheme {
...@@ -59,7 +59,7 @@ Rectangle { ...@@ -59,7 +59,7 @@ Rectangle {
height: visible ? 32 : 0 height: visible ? 32 : 0
property string iconName: "dialog-information" property string iconName: "dialog-information"
source: "image://icon/"+iconName source: "image://icon/" + iconName
} }
......
...@@ -45,7 +45,7 @@ Item { ...@@ -45,7 +45,7 @@ Item {
} }
function showPopup(text) { function showPopup(text) {
popup.show(text); popup.show(text, "SHOWING");
} }
CanvasItem { CanvasItem {
...@@ -93,6 +93,7 @@ Item { ...@@ -93,6 +93,7 @@ Item {
Transition { Transition {
from: "" from: ""
to: "SHOWING" to: "SHOWING"
reversible: true
AnchorAnimation { AnchorAnimation {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment