set media encryption according to settings
This commit is contained in:
parent
fd36fd7c88
commit
d9786c31e3
5 changed files with 35 additions and 35 deletions
|
|
@ -135,6 +135,8 @@ void Utils::createCall(const QString &sipAddress,
|
||||||
LinphoneEnums::MediaEncryption mediaEncryption,
|
LinphoneEnums::MediaEncryption mediaEncryption,
|
||||||
const QString &prepareTransfertAddress,
|
const QString &prepareTransfertAddress,
|
||||||
const QHash<QString, QString> &headers) {
|
const QHash<QString, QString> &headers) {
|
||||||
|
mediaEncryption =
|
||||||
|
App::getInstance()->getSettings()->getMediaEncryption()["id"].value<LinphoneEnums::MediaEncryption>();
|
||||||
lDebug() << "[Utils] create call with uri :" << sipAddress << mediaEncryption;
|
lDebug() << "[Utils] create call with uri :" << sipAddress << mediaEncryption;
|
||||||
App::postModelAsync([sipAddress, options, mediaEncryption, prepareTransfertAddress, headers]() {
|
App::postModelAsync([sipAddress, options, mediaEncryption, prepareTransfertAddress, headers]() {
|
||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ list(APPEND _LINPHONEAPP_QML_FILES
|
||||||
view/Control/Button/HelpIconLabelButton.qml
|
view/Control/Button/HelpIconLabelButton.qml
|
||||||
view/Control/Button/IconLabelButton.qml
|
view/Control/Button/IconLabelButton.qml
|
||||||
view/Control/Button/MenuButton.qml
|
view/Control/Button/MenuButton.qml
|
||||||
|
view/Control/Button/BigButton.qml
|
||||||
view/Control/Button/MediumButton.qml
|
view/Control/Button/MediumButton.qml
|
||||||
view/Control/Button/SmallButton.qml
|
view/Control/Button/SmallButton.qml
|
||||||
view/Control/Button/CountryIndicatorCombobox.qml
|
view/Control/Button/CountryIndicatorCombobox.qml
|
||||||
|
|
@ -144,6 +145,7 @@ list(APPEND _LINPHONEAPP_QML_FILES
|
||||||
|
|
||||||
list(APPEND _LINPHONEAPP_QML_SINGLETONS
|
list(APPEND _LINPHONEAPP_QML_SINGLETONS
|
||||||
view/Style/AppIcons.qml
|
view/Style/AppIcons.qml
|
||||||
|
view/Style/ButtonStyle.qml
|
||||||
view/Style/DefaultStyle.qml
|
view/Style/DefaultStyle.qml
|
||||||
view/Style/Typography.qml
|
view/Style/Typography.qml
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -7,27 +7,25 @@ import Linphone
|
||||||
Control.Button {
|
Control.Button {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
property int capitalization
|
property int capitalization
|
||||||
property color color: DefaultStyle.main1_500_main
|
property QtObject style
|
||||||
property color disabledColor: Qt.darker(color, 1.5)
|
property color color: style ? style.color.normal : DefaultStyle.main1_500_main
|
||||||
property color borderColor: DefaultStyle.grey_0
|
readonly property color pressedColor: style && style.color.pressed || Qt.darker(color, 1.3)
|
||||||
readonly property color pressedColor: Qt.darker(color, 1.1)
|
readonly property color hoveredColor: style && style.color.hovered || Qt.darker(color, 1.1)
|
||||||
|
property color textColor: style && style.text.normal || DefaultStyle.grey_0
|
||||||
|
property color pressedTextColor: style && style.text.pressed || textColor
|
||||||
|
property color borderColor: style && style.borderColor || "transparent"
|
||||||
property bool inversedColors: false
|
property bool inversedColors: false
|
||||||
property int textSize: 18 * DefaultStyle.dp
|
property int textSize: 18 * DefaultStyle.dp
|
||||||
property int textWeight: 600 * DefaultStyle.dp
|
property int textWeight: 600 * DefaultStyle.dp
|
||||||
property var textHAlignment: Text.AlignHCenter
|
property var textHAlignment: Text.AlignHCenter
|
||||||
property int radius: 48 * DefaultStyle.dp
|
property int radius: 48 * DefaultStyle.dp
|
||||||
property color textColor: DefaultStyle.grey_0
|
property bool underline: false
|
||||||
property bool underline: activeFocus || containsMouse
|
property bool hasNavigationFocus: enabled && (activeFocus || hovered)
|
||||||
property bool shadowEnabled: enabled && (activeFocus || containsMouse)
|
property var contentImageColor: style && style.image.normal || DefaultStyle.main2_600
|
||||||
property var contentImageColor
|
property var pressedImageColor: style && style.image.pressed || DefaultStyle.main2_600
|
||||||
property alias containsMouse: mouseArea.containsMouse
|
|
||||||
property bool asynchronous: true
|
property bool asynchronous: true
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
activeFocusOnTab: true
|
activeFocusOnTab: true
|
||||||
// leftPadding: 20 * DefaultStyle.dp
|
|
||||||
// rightPadding: 20 * DefaultStyle.dp
|
|
||||||
// topPadding: 11 * DefaultStyle.dp
|
|
||||||
// bottomPadding: 11 * DefaultStyle.dp
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: mouseArea
|
id: mouseArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
@ -40,30 +38,31 @@ Control.Button {
|
||||||
asynchronous: mainItem.asynchronous
|
asynchronous: mainItem.asynchronous
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
sourceComponent:
|
sourceComponent: Item {
|
||||||
Item {
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: buttonBackground
|
id: buttonBackground
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: mainItem.enabled
|
color: mainItem.pressed
|
||||||
? inversedColors
|
? mainItem.pressedColor
|
||||||
? mainItem.pressed || mainItem.shadowEnabled
|
: mainItem.hovered || mainItem.hasNavigationFocus
|
||||||
? DefaultStyle.grey_100
|
? mainItem.hoveredColor
|
||||||
: mainItem.borderColor
|
: mainItem.color
|
||||||
: mainItem.pressed || mainItem.shadowEnabled
|
|
||||||
? mainItem.pressedColor
|
|
||||||
: mainItem.color
|
|
||||||
: mainItem.disabledColor
|
|
||||||
radius: mainItem.radius
|
radius: mainItem.radius
|
||||||
border.color: inversedColors ? mainItem.color : mainItem.borderColor
|
border.color: mainItem.borderColor
|
||||||
|
}
|
||||||
|
Rectangle {
|
||||||
|
id: disableShadow
|
||||||
|
color: "white"
|
||||||
|
opacity: 0.2
|
||||||
|
visible: !mainItem.enabled
|
||||||
}
|
}
|
||||||
MultiEffect {
|
MultiEffect {
|
||||||
enabled: mainItem.shadowEnabled
|
enabled: mainItem.hasNavigationFocus
|
||||||
anchors.fill: buttonBackground
|
anchors.fill: buttonBackground
|
||||||
source: buttonBackground
|
source: buttonBackground
|
||||||
visible: mainItem.shadowEnabled
|
visible: mainItem.hasNavigationFocus
|
||||||
// Crash : https://bugreports.qt.io/browse/QTBUG-124730
|
// Crash : https://bugreports.qt.io/browse/QTBUG-124730
|
||||||
shadowEnabled: true //mainItem.shadowEnabled
|
shadowEnabled: mainItem.hasNavigationFocus
|
||||||
shadowColor: DefaultStyle.grey_1000
|
shadowColor: DefaultStyle.grey_1000
|
||||||
shadowBlur: 0.1
|
shadowBlur: 0.1
|
||||||
shadowOpacity: mainItem.shadowEnabled ? 0.5 : 0.0
|
shadowOpacity: mainItem.shadowEnabled ? 0.5 : 0.0
|
||||||
|
|
@ -79,7 +78,9 @@ Control.Button {
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WrapAnywhere
|
||||||
text: mainItem.text
|
text: mainItem.text
|
||||||
maximumLineCount: 1
|
maximumLineCount: 1
|
||||||
color: inversedColors ? mainItem.color : mainItem.textColor
|
color: pressed
|
||||||
|
? mainItem.pressedTextColor
|
||||||
|
: mainItem.textColor
|
||||||
font {
|
font {
|
||||||
pixelSize: mainItem.textSize
|
pixelSize: mainItem.textSize
|
||||||
weight: mainItem.textWeight
|
weight: mainItem.textWeight
|
||||||
|
|
@ -98,8 +99,7 @@ Control.Button {
|
||||||
imageSource: mainItem.icon.source
|
imageSource: mainItem.icon.source
|
||||||
imageWidth: mainItem.icon.width
|
imageWidth: mainItem.icon.width
|
||||||
imageHeight: mainItem.icon.height
|
imageHeight: mainItem.icon.height
|
||||||
colorizationColor: mainItem.contentImageColor
|
colorizationColor: mainItem.pressed ? mainItem.pressedImageColor : mainItem.contentImageColor
|
||||||
shadowEnabled: mainItem.shadowEnabled
|
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Control.StackView{
|
contentItem: Control.StackView{
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,6 @@ Button {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
textSize: Typography.b3.pixelSize
|
textSize: Typography.b3.pixelSize
|
||||||
textWeight: Typography.b3.weight
|
textWeight: Typography.b3.weight
|
||||||
color: DefaultStyle.main1_100
|
|
||||||
textColor: DefaultStyle.main1_500_main
|
|
||||||
leftPadding: 16 * DefaultStyle.dp
|
leftPadding: 16 * DefaultStyle.dp
|
||||||
rightPadding: 16 * DefaultStyle.dp
|
rightPadding: 16 * DefaultStyle.dp
|
||||||
topPadding: 10 * DefaultStyle.dp
|
topPadding: 10 * DefaultStyle.dp
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,6 @@ Button {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
textSize: Typography.b3.pixelSize
|
textSize: Typography.b3.pixelSize
|
||||||
textWeight: Typography.b3.weight
|
textWeight: Typography.b3.weight
|
||||||
color: DefaultStyle.main1_100
|
|
||||||
textColor: DefaultStyle.main1_500_main
|
|
||||||
leftPadding: 12 * DefaultStyle.dp
|
leftPadding: 12 * DefaultStyle.dp
|
||||||
rightPadding: 12 * DefaultStyle.dp
|
rightPadding: 12 * DefaultStyle.dp
|
||||||
topPadding: 6 * DefaultStyle.dp
|
topPadding: 6 * DefaultStyle.dp
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue