-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
childcity
committed
Sep 4, 2020
1 parent
f85ed9e
commit ed39804
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import QtQuick 2.0 | ||
|
||
PopupBase { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
|
||
} |