linux.x86.linphone/Linphone/view/Control/Button/RadioButton.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

60 lines
1.6 KiB
QML
Executable file

import QtQuick
import QtQuick.Controls.Basic as Control
import QtQuick.Layouts
import QtQuick.Effects
import Linphone
import "qrc:/qt/qml/Linphone/view/Control/Tool/Helper/utils.js" as Utils
Control.RadioButton {
id: mainItem
property string title
property string contentText
property string imgUrl
property bool checkOnClick: true
property color color
property real indicatorSize: Utils.getSizeWithScreenRatio(16)
property bool shadowEnabled: mainItem.activeFocus || mainItem.hovered
//onClicked: if (checkOnClick && !mainItem.checked) mainItem.toggle()
MouseArea{
id: mouseArea
anchors.fill:parent
hoverEnabled: true
acceptedButtons: Qt.NoButton
cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
}
indicator: Item {
implicitWidth: mainItem.indicatorSize
implicitHeight: mainItem.indicatorSize
anchors.verticalCenter: mainItem.verticalCenter
Rectangle {
id: backgroundArea
anchors.fill: parent
radius: mainItem.indicatorSize/2
color: "transparent"
border.color: mainItem.color
border.width: Utils.getSizeWithScreenRatio(2)
Rectangle {
width: parent.width/2
height: parent.height/2
x: parent.width/4
y: parent.width/4
radius: width/2
color: mainItem.color
visible: mainItem.checked
}
}
MultiEffect {
enabled: mainItem.shadowEnabled
anchors.fill: backgroundArea
source: backgroundArea
visible: mainItem.shadowEnabled
// Crash : https://bugreports.qt.io/browse/QTBUG-124730
shadowEnabled: true //mainItem.shadowEnabled
shadowColor: DefaultStyle.grey_1000
shadowBlur: 0.1
shadowOpacity: mainItem.shadowEnabled ? 0.5 : 0.0
}
}
}