linux.x86.linphone/Linphone/view/Control/Popup/Notification/TemporaryNotification.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

66 lines
1.6 KiB
QML
Executable file

import QtQuick
import QtQuick.Effects
import Linphone
import "qrc:/qt/qml/Linphone/view/Control/Tool/Helper/utils.js" as Utils
Control.Control {
id: mainItem
// width: Utils.getSizeWithScreenRatio(269)
y: -height
z: 1
topPadding: Utils.getSizeWithScreenRatio(8)
bottomPadding: Utils.getSizeWithScreenRatio(8)
leftPadding: Utils.getSizeWithScreenRatio(37)
rightPadding: Utils.getSizeWithScreenRatio(37)
anchors.horizontalCenter: parent.horizontalCenter
clip: true
property string text
property string imageSource
property color contentColor
property int yCoord
signal clicked()
function open() {
y = mainItem.yCoord
autoCloseNotification.restart()
}
MouseArea {
anchors.fill: parent
onClicked: mainItem.clicked()
}
Timer {
id: autoCloseNotification
interval: 4000
onTriggered: {
mainItem.y = -mainItem.height
}
}
Behavior on y {NumberAnimation {duration: 1000}}
background: Rectangle {
anchors.fill: parent
color: DefaultStyle.grey_0
border.color: mainItem.contentColor
border.width: Utils.getSizeWithScreenRatio(1)
radius: Utils.getSizeWithScreenRatio(50)
}
contentItem: RowLayout {
Image {
visible: mainItem.imageSource != undefined
source: mainItem.imageSource
Layout.preferredWidth: Utils.getSizeWithScreenRatio(24)
Layout.preferredHeight: Utils.getSizeWithScreenRatio(24)
fillMode: Image.PreserveAspectFit
Layout.fillWidth: true
}
Text {
color: mainItem.contentColor
text: mainItem.text
Layout.fillWidth: true
font {
pixelSize: Utils.getSizeWithScreenRatio(14)
}
}
}
}