linphone-desktop/Linphone/view/Control/Display/TemporaryText.qml
Gaelle Braud e07cd93fad ui fixes
paste code register
bold search result part of display names
fix magic search list
fix navigation
2024-09-27 10:45:06 +02:00

37 lines
No EOL
668 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
visible: false
function clear() {
autoHideErrorMessage.stop()
text = ""
mainItem.visible = false
}
function setText(text) {
if (text.length === 0) {
clear()
} else {
mainItem.visible = true
mainItem.text = text
}
}
font {
pixelSize: 12 * DefaultStyle.dp
weight: 300 * DefaultStyle.dp
}
Timer {
id: autoHideErrorMessage
interval: 5000
onTriggered: {
mainItem.clear()
}
}
onTextChanged: if (mainItem.text.length > 0) autoHideErrorMessage.restart()
}