Commit b2cd03d8 authored by Chupligin Sergey's avatar Chupligin Sergey Committed by Sergey Chupligin

[Dialogs] Add bgOpacity property and open/close functions

parent f5807cca
...@@ -12,14 +12,24 @@ Item { ...@@ -12,14 +12,24 @@ Item {
property alias headingText: heading.text property alias headingText: heading.text
property alias subLabelText: subLabel.text property alias subLabelText: subLabel.text
property real bgOpacity: 1;
property string icon: "" property string icon: ""
property bool inline: true property bool inline: true
function open(){
shell.visible = true
}
function close(){
shell.visible = false
}
Rectangle { Rectangle {
id: shadow id: shadow
width: parent.width width: parent.width
height: inline ? (parent.height-cancel.height)/3 : parent.height-cancel.height height: inline ? (parent.height-cancel.height)/3 : parent.height-cancel.height
opacity: 0.65 opacity: shell.bgOpacity
color: Theme.backgroundColor color: Theme.backgroundColor
anchors.bottom: cancel.top anchors.bottom: cancel.top
} }
...@@ -75,6 +85,7 @@ Item { ...@@ -75,6 +85,7 @@ Item {
onClicked: { onClicked: {
shell.canceled() shell.canceled()
shell.selected() shell.selected()
close()
} }
} }
Button { Button {
...@@ -89,6 +100,7 @@ Item { ...@@ -89,6 +100,7 @@ Item {
onClicked: { onClicked: {
shell.accepted() shell.accepted()
shell.selected() shell.selected()
close();
} }
} }
} }
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