Implemented a screen displaying the history of operations with the board. Added dialogs for displaying messages and statuses
This commit is contained in:
48
qml/Screens/StatusPopup.qml
Normal file
48
qml/Screens/StatusPopup.qml
Normal file
@@ -0,0 +1,48 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
|
||||
import Controls 1.0 as Controls
|
||||
import Utils 1.0
|
||||
|
||||
Popup {
|
||||
id: root
|
||||
x: (parent.width - width) / 2
|
||||
y: parent.height - height - 20
|
||||
closePolicy: Popup.NoAutoClose
|
||||
|
||||
property string text: ""
|
||||
property bool good: true
|
||||
|
||||
Controls.SubtitleLabel {
|
||||
id: label
|
||||
text: root.text
|
||||
maximumLineCount: 10
|
||||
wrapMode: Text.Wrap
|
||||
color: Palette.alternativeTextColor
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
radius: 6
|
||||
color: good ? Palette.alternativeBackgroundColor : Palette.invalidColor
|
||||
border.width: 1
|
||||
border.color: Palette.borderColor
|
||||
}
|
||||
|
||||
enter: Transition {
|
||||
NumberAnimation {
|
||||
property: "opacity"
|
||||
from: 0.0
|
||||
to: 1.0
|
||||
duration: 300
|
||||
}
|
||||
}
|
||||
|
||||
exit: Transition {
|
||||
NumberAnimation {
|
||||
property: "opacity"
|
||||
from: 1.0
|
||||
to: 0.0
|
||||
duration: 2500
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user