Skip to content

Commit

Permalink
add two popups
Browse files Browse the repository at this point in the history
  • Loading branch information
childcity committed Sep 4, 2020
1 parent f85ed9e commit ed39804
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/qml/ErrorMsgPopup.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import QtQuick 2.0

PopupBase {

}
36 changes: 36 additions & 0 deletions src/qml/PopupBase.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import QtQuick 2.11
import QtQuick.Window 2.11
import QtQuick.Controls 2.2

Popup {
id: root
modal: true
focus: true
dim: true

//transformOrigin: Item.Center
x: parent ? ((parent.width - width) / 2) : 0
y: parent ? ((parent.height - height) / 2) : 0
width: parent ? (parent.width / 2 - margin) : 128
height: parent ? (parent.height / 2 - margin) : 128
padding: 0

closePolicy: Popup.CloseOnEscape | Popup.CloseOnReleaseOutside

enter: Transition {
PropertyAnimation {
property: "opacity";
from: 0.3; to: 1.0
duration: 500
}
}

exit: Transition {
NumberAnimation {
property: "opacity";
from: 1.0; to: 0.3
duration: 500
}
}

}

0 comments on commit ed39804

Please sign in to comment.