linphone-desktop/Linphone/view/Item/ErrorText.qml
Gaelle Braud 517c6b96a5 FIXES:
error text display
show welcome page on first launch only
try to fix crash in variant object (to fix properly)
forbid connection if account already connected
contacts list first row size + contact selected signal
accounts layout
rm layout rearrange warning
login error messages layout
trust circle avatar
no error message on status ok
busy indicator on login
2024-01-17 12:06:04 +01:00

57 lines
No EOL
1,008 B
QML

import QtQuick
import QtQuick.Controls as Control
import QtQuick.Layouts 1.0
import QtQuick.Effects
import Linphone
Text {
id: mainItem
color: DefaultStyle.danger_500main
opacity: 0
function displayText() {
mainItem.state = "Visible"
}
function hideText() {
mainItem.state = "Invisible"
}
font {
pixelSize: 13 * DefaultStyle.dp
weight: 600 * DefaultStyle.dp
}
states: [
State{
name: "Visible"
PropertyChanges{target: mainItem; opacity: 1.0}
},
State{
name:"Invisible"
PropertyChanges{target: mainItem; opacity: 0.0}
}
]
transitions: [
Transition {
from: "Visible"
to: "Invisible"
NumberAnimation {
property: "opacity"
duration: 1000
}
}
]
Timer {
id: autoHideErrorMessage
interval: 2500
onTriggered: mainItem.state = "Invisible"
}
onOpacityChanged: if (opacity === 1) autoHideErrorMessage.restart()
Connections {
target: mainItem
onTextChanged: {
if (mainItem.text.length > 0) {
mainItem.state = "Visible"
}
}
}
}