linux.x86.linphone/Linphone/view/Control/Display/Contact/PresenceSetCustomStatus.qml
data 3b3bb966d4 Add ringtone selection dropdown and various bugfixes
- Add ComboBox for ringtone selection in Call Settings
- Convert MKV ringtones to WAV format (Linphone only supports WAV)
- Fix ComboSetting to support dialPlan type for international prefix
- Disable account devices feature to prevent API errors
- Disable automatic update check on startup
- Add ringtone fallback to default when custom file not found
- Fix ringtone dropdown to not override setting on initialization

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 08:31:15 +01:00

79 lines
2 KiB
QML
Executable file

import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Linphone
import SettingsCpp
import 'qrc:/qt/qml/Linphone/view/Style/buttonStyle.js' as ButtonStyle
import "qrc:/qt/qml/Linphone/view/Control/Tool/Helper/utils.js" as Utils
Column {
id: mainItem
spacing: Utils.getSizeWithScreenRatio(20)
anchors.centerIn: parent
property var accountGui
signal isSet
Text {
text: qsTr("contact_presence_button_set_custom_status_title")
horizontalAlignment: Text.AlignHCenter
color: DefaultStyle.main2_600
font: Typography.p2
}
Rectangle {
width: parent.width
height: Utils.getSizeWithScreenRatio(150)
color: "transparent"
border.color: DefaultStyle.main1_500_main
border.width: Utils.getSizeWithScreenRatio(1)
radius: Utils.getSizeWithScreenRatio(8)
ColumnLayout {
anchors.fill: parent
anchors.margins: Utils.getSizeWithScreenRatio(10)
TextEdit {
id: statusMessage
wrapMode: TextEdit.Wrap
font: Typography.p1
color: DefaultStyle.main2_500_main
Layout.fillHeight: true
Layout.fillWidth: true
property string previoustext: ""
text: mainItem.accountGui.core.presenceNote
onTextChanged: {
if (statusMessage.text.length > accountGui.core.maxPresenceNoteSize) {
statusMessage.text = previoustext
statusMessage.cursorPosition = statusMessage.text.length
} else {
previoustext = statusMessage.text
}
}
}
Item {
Layout.fillHeight: true
}
Text {
Layout.fillWidth: true
text: statusMessage.text.length + " / " + accountGui.core.maxPresenceNoteSize
font: Typography.p1
color: DefaultStyle.main2_400
horizontalAlignment: Text.AlignRight
}
}
}
Row {
spacing: Utils.getSizeWithScreenRatio(10)
anchors.right: parent.right
SmallButton {
style: ButtonStyle.secondary
text: qsTr("contact_presence_button_save_custom_status")
enabled: statusMessage.text.length > 0
onClicked: {
mainItem.accountGui.core.presenceNote = statusMessage.text
mainItem.isSet()
}
}
}
}