Compare commits
No commits in common. "db7ce5ef4a8fd39c8b6f2d39351f19ed39a65e4a" and "a73458dfb62d81510bbcfb2b4b4d9c6f966ba647" have entirely different histories.
db7ce5ef4a
...
a73458dfb6
12 changed files with 64 additions and 382 deletions
|
|
@ -58,8 +58,6 @@ void CarddavCore::save() {
|
|||
auto realm = Utils::appStringToCoreString(mRealm);
|
||||
auto storeNewFriendsInIt = mStoreNewFriendsInIt;
|
||||
|
||||
lInfo() << log().arg("CarddavCore::save() called") << " mUsername=" << mUsername << " mRealm=" << mRealm;
|
||||
|
||||
mCarddavModelConnection->invokeToModel([this, displayName, uri, username, password, realm, storeNewFriendsInIt]() {
|
||||
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
||||
mCarddavModel->save(displayName, uri, username, password, realm, storeNewFriendsInIt);
|
||||
|
|
|
|||
|
|
@ -930,46 +930,46 @@
|
|||
<message>
|
||||
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="68"/>
|
||||
<source>settings_call_forward_to_voicemail</source>
|
||||
<translation>Zur Voicemail</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="26"/>
|
||||
<source>settings_call_forward_address_cannot_be_empty</source>
|
||||
<translation>Adresse darf nicht leer sein</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="42"/>
|
||||
<source>settings_call_forward_activate_title</source>
|
||||
<extracomment>"Forward calls"</extracomment>
|
||||
<translation>Anrufe weiterleiten</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="44"/>
|
||||
<source>settings_call_forward_activate_subtitle</source>
|
||||
<extracomment>"Enable call forwarding to voicemail or sip address"</extracomment>
|
||||
<translation>Anrufweiterleitung zur Voicemail oder SIP-Adresse aktivieren</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="56"/>
|
||||
<source>settings_call_forward_destination_choose</source>
|
||||
<extracomment>Forward to destination</extracomment>
|
||||
<translation>Weiterleiten an</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="69"/>
|
||||
<source>settings_call_forward_to_sipaddress</source>
|
||||
<translation>Zur SIP-Adresse</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="106"/>
|
||||
<source>settings_call_forward_sipaddress_title</source>
|
||||
<extracomment>SIP Address</extracomment>
|
||||
<translation>SIP-Adresse</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Layout/Settings/CallForwardSettingsLayout.qml" line="107"/>
|
||||
<source>settings_call_forward_sipaddress_placeholder</source>
|
||||
<translation>sip:benutzer@domain.de</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
|
@ -2694,7 +2694,7 @@ Error</extracomment>
|
|||
<location filename="../../view/Page/Layout/Settings/ChatSettingsLayout.qml" line="21"/>
|
||||
<source>settings_chat_notifications_title</source>
|
||||
<extracomment>Notifications</extracomment>
|
||||
<translation>Benachrichtigungen</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Layout/Settings/ChatSettingsLayout.qml" line="32"/>
|
||||
|
|
@ -6027,13 +6027,7 @@ Pour les activer dans un projet commercial, merci de nous contacter.</source>
|
|||
<location filename="../../view/Page/Form/Settings/SettingsPage.qml" line="17"/>
|
||||
<source>settings_call_forward</source>
|
||||
<extracomment>"Transfert d'appel"</extracomment>
|
||||
<translation>Anrufweiterleitung</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Settings/SettingsPage.qml" line="25"/>
|
||||
<source>settings_user_interface_title</source>
|
||||
<extracomment>Display settings</extracomment>
|
||||
<translation>Anzeige</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Settings/SettingsPage.qml" line="19"/>
|
||||
|
|
@ -7844,62 +7838,4 @@ Pour les activer dans un projet commercial, merci de nous contacter.</source>
|
|||
<translation>Ok</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DisplaySettingsLayout</name>
|
||||
<message>
|
||||
<source>settings_display_language_title</source>
|
||||
<extracomment>Language</extracomment>
|
||||
<translation>Sprache</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>settings_display_appearance_title</source>
|
||||
<extracomment>Appearance</extracomment>
|
||||
<translation>Erscheinungsbild</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>settings_display_language_select</source>
|
||||
<extracomment>Language</extracomment>
|
||||
<translation>Sprache</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>settings_display_language_subtitle</source>
|
||||
<extracomment>Select your preferred language</extracomment>
|
||||
<translation>Wählen Sie Ihre bevorzugte Sprache</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>settings_display_language_restart_hint</source>
|
||||
<extracomment>Restart required for language change</extracomment>
|
||||
<translation>Neustart erforderlich für Sprachwechsel</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>settings_display_dark_mode_title</source>
|
||||
<extracomment>Dark mode</extracomment>
|
||||
<translation>Dunkelmodus</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>settings_display_dark_mode_subtitle</source>
|
||||
<extracomment>Enable dark mode (or follows system theme like Breeze Dark)</extracomment>
|
||||
<translation>Dunkelmodus aktivieren (oder System-Theme wie Breeze Dark folgen)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>settings_display_system_dark_detected</source>
|
||||
<extracomment>System dark theme is detected automatically</extracomment>
|
||||
<translation>System-Dunkelmodus erkannt (z.B. Breeze Dark)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>settings_display_system_light_detected</source>
|
||||
<extracomment>System light theme is detected</extracomment>
|
||||
<translation>System-Hellmodus erkannt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>settings_display_theme_color_title</source>
|
||||
<extracomment>Accent color</extracomment>
|
||||
<translation>Akzentfarbe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>settings_display_theme_color_subtitle</source>
|
||||
<extracomment>Choose the accent color for buttons and highlights</extracomment>
|
||||
<translation>Wählen Sie die Akzentfarbe für Schaltflächen und Hervorhebungen</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
|
|
|||
|
|
@ -7737,62 +7737,4 @@ To enable them in a commercial project, please contact us.</translation>
|
|||
<translation>Ok</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DisplaySettingsLayout</name>
|
||||
<message>
|
||||
<source>settings_display_language_title</source>
|
||||
<extracomment>Language</extracomment>
|
||||
<translation>Language</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>settings_display_appearance_title</source>
|
||||
<extracomment>Appearance</extracomment>
|
||||
<translation>Appearance</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>settings_display_language_select</source>
|
||||
<extracomment>Language</extracomment>
|
||||
<translation>Language</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>settings_display_language_subtitle</source>
|
||||
<extracomment>Select your preferred language</extracomment>
|
||||
<translation>Select your preferred language</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>settings_display_language_restart_hint</source>
|
||||
<extracomment>Restart required for language change</extracomment>
|
||||
<translation>Restart required for language change</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>settings_display_dark_mode_title</source>
|
||||
<extracomment>Dark mode</extracomment>
|
||||
<translation>Dark mode</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>settings_display_dark_mode_subtitle</source>
|
||||
<extracomment>Enable dark mode (or follows system theme like Breeze Dark)</extracomment>
|
||||
<translation>Enable dark mode (or follows system theme like Breeze Dark)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>settings_display_system_dark_detected</source>
|
||||
<extracomment>System dark theme is detected automatically</extracomment>
|
||||
<translation>System dark theme detected (e.g. Breeze Dark)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>settings_display_system_light_detected</source>
|
||||
<extracomment>System light theme is detected</extracomment>
|
||||
<translation>System light theme detected</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>settings_display_theme_color_title</source>
|
||||
<extracomment>Accent color</extracomment>
|
||||
<translation>Accent color</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>settings_display_theme_color_subtitle</source>
|
||||
<extracomment>Choose the accent color for buttons and highlights</extracomment>
|
||||
<translation>Choose the accent color for buttons and highlights</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
#include "model/core/CoreModel.hpp"
|
||||
#include "model/setting/SettingsModel.hpp"
|
||||
#include "tool/Utils.hpp"
|
||||
#include <QUrl>
|
||||
|
||||
DEFINE_ABSTRACT_OBJECT(CarddavModel)
|
||||
|
||||
|
|
@ -60,32 +59,16 @@ void CarddavModel::save(
|
|||
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
||||
auto core = CoreModel::getInstance()->getCore();
|
||||
|
||||
// Extract domain from URI for auth info lookup
|
||||
string domain;
|
||||
QUrl url(QString::fromStdString(uri));
|
||||
if (url.isValid()) {
|
||||
domain = url.host().toStdString();
|
||||
}
|
||||
|
||||
// If realm is empty, use domain as default realm
|
||||
if (realm.empty() && !domain.empty()) {
|
||||
realm = domain;
|
||||
lInfo() << log().arg("Using host as default realm:") << realm;
|
||||
}
|
||||
|
||||
lInfo() << log().arg("CardDAV save called with:") << " displayName=" << displayName << " uri=" << uri
|
||||
<< " username=" << username << " realm=" << realm << " domain=" << domain << " (password hidden)";
|
||||
|
||||
// Auth info handled in lazy mode, if provided handle otherwise ignore.
|
||||
// TODO: add dialog to ask user before removing existing auth info if existing already - (comment from Android)
|
||||
if (!username.empty() && !realm.empty()) {
|
||||
mRemovedAuthInfo = core->findAuthInfo(realm, username, domain);
|
||||
mRemovedAuthInfo = core->findAuthInfo(realm, username, "");
|
||||
if (mRemovedAuthInfo != nullptr) {
|
||||
lWarning() << log().arg("Auth info with username ") << username << " already exists, removing it first.";
|
||||
core->removeAuthInfo(mRemovedAuthInfo);
|
||||
}
|
||||
lInfo() << log().arg("Adding auth info with username ") << username << " and domain " << domain;
|
||||
mCreatedAuthInfo = linphone::Factory::get()->createAuthInfo(username, "", password, "", realm, domain);
|
||||
lInfo() << log().arg("Adding auth info with username") << username;
|
||||
mCreatedAuthInfo = linphone::Factory::get()->createAuthInfo(username, "", password, "", realm, "");
|
||||
core->addAuthInfo(mCreatedAuthInfo);
|
||||
} else {
|
||||
lInfo() << log().arg("No auth info provided upon saving.");
|
||||
|
|
|
|||
|
|
@ -152,7 +152,6 @@ list(APPEND _LINPHONEAPP_QML_FILES
|
|||
view/Page/Layout/Settings/CallSettingsLayout.qml
|
||||
view/Page/Layout/Settings/CallForwardSettingsLayout.qml
|
||||
view/Page/Layout/Settings/ContactsSettingsLayout.qml
|
||||
view/Page/Layout/Settings/DisplaySettingsLayout.qml
|
||||
view/Page/Layout/Settings/MeetingsSettingsLayout.qml
|
||||
view/Page/Layout/Settings/ContactsSettingsProviderLayout.qml
|
||||
view/Page/Layout/Settings/DebugSettingsLayout.qml
|
||||
|
|
|
|||
|
|
@ -4,70 +4,33 @@ import QtQuick.Layouts
|
|||
import Linphone
|
||||
import 'qrc:/qt/qml/Linphone/view/Control/Tool/Helper/utils.js' as Utils
|
||||
|
||||
RowLayout {
|
||||
ComboBox {
|
||||
id: mainItem
|
||||
property string titleText
|
||||
property string subTitleText
|
||||
Layout.preferredHeight: Utils.getSizeWithScreenRatio(49)
|
||||
property string propertyName
|
||||
|
||||
property var propertyOwner
|
||||
property var propertyOwnerGui
|
||||
property alias entries: comboBox.model
|
||||
property alias model: comboBox.model
|
||||
property alias textRole: comboBox.textRole
|
||||
property alias flagRole: comboBox.flagRole
|
||||
property alias currentIndex: comboBox.currentIndex
|
||||
property alias currentValue: comboBox.currentValue
|
||||
property alias listView: comboBox.listView
|
||||
spacing: Utils.getSizeWithScreenRatio(20)
|
||||
|
||||
ColumnLayout {
|
||||
Layout.minimumHeight: Utils.getSizeWithScreenRatio(32)
|
||||
Layout.fillWidth: true
|
||||
spacing: Utils.getSizeWithScreenRatio(4)
|
||||
visible: titleText.length > 0
|
||||
Text {
|
||||
text: titleText
|
||||
font: Typography.p2l
|
||||
wrapMode: Text.WordWrap
|
||||
color: DefaultStyle.main2_600
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Text {
|
||||
text: subTitleText
|
||||
font: Typography.p1
|
||||
wrapMode: Text.WordWrap
|
||||
visible: subTitleText.length > 0
|
||||
color: DefaultStyle.main2_600
|
||||
Layout.fillWidth: true
|
||||
property alias entries: mainItem.model
|
||||
oneLine: true
|
||||
currentIndex: Utils.findIndex(model, function (entry) {
|
||||
if(propertyOwnerGui)
|
||||
return Utils.equalObject(entry,propertyOwnerGui.core[propertyName])
|
||||
else
|
||||
return Utils.equalObject(entry,propertyOwner[propertyName])
|
||||
})
|
||||
onCurrentValueChanged: {
|
||||
if(propertyOwnerGui) {
|
||||
binding.when = !Utils.equalObject(currentValue,propertyOwnerGui.core[propertyName])
|
||||
}else{
|
||||
binding.when = !Utils.equalObject(currentValue,propertyOwner[propertyName])
|
||||
}
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
id: comboBox
|
||||
Layout.alignment: titleText.length > 0 ? (Qt.AlignRight | Qt.AlignVCenter) : Qt.AlignLeft
|
||||
Layout.preferredHeight: Utils.getSizeWithScreenRatio(49)
|
||||
Layout.preferredWidth: titleText.length > 0 ? Utils.getSizeWithScreenRatio(200) : undefined
|
||||
Layout.fillWidth: titleText.length === 0
|
||||
oneLine: true
|
||||
currentIndex: Utils.findIndex(model, function (entry) {
|
||||
if(propertyOwnerGui)
|
||||
return Utils.equalObject(entry, propertyOwnerGui.core[mainItem.propertyName])
|
||||
else
|
||||
return Utils.equalObject(entry, propertyOwner[mainItem.propertyName])
|
||||
})
|
||||
onCurrentValueChanged: {
|
||||
if(propertyOwnerGui) {
|
||||
binding.when = !Utils.equalObject(currentValue, propertyOwnerGui.core[mainItem.propertyName])
|
||||
} else {
|
||||
binding.when = !Utils.equalObject(currentValue, propertyOwner[mainItem.propertyName])
|
||||
}
|
||||
}
|
||||
Binding {
|
||||
id: binding
|
||||
target: propertyOwnerGui ? propertyOwnerGui.core : propertyOwner
|
||||
property: mainItem.propertyName
|
||||
value: comboBox.currentValue
|
||||
when: false
|
||||
}
|
||||
Binding {
|
||||
id: binding
|
||||
target: propertyOwnerGui ? propertyOwnerGui.core : propertyOwner
|
||||
property: propertyName
|
||||
value: mainItem.currentValue
|
||||
when: false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ RowLayout {
|
|||
signal toggled()
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumHeight: Utils.getSizeWithScreenRatio(32)
|
||||
spacing: Utils.getSizeWithScreenRatio(4)
|
||||
Text {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ AbstractSettingsMenu {
|
|||
//: "Réunions"
|
||||
{title: qsTr("settings_meetings_title"), layout: "MeetingsSettingsLayout", visible: !SettingsCpp.disableMeetingsFeature},
|
||||
//: "Affichage"
|
||||
{title: qsTr("settings_user_interface_title"), layout: "DisplaySettingsLayout"},
|
||||
//{title: qsTr("settings_user_interface_title"), layout: "DisplaySettingsLayout"},
|
||||
//: "Security"
|
||||
// {title: qsTr("settings_security_title"), layout: "SecuritySettingsLayout"},
|
||||
//: "Réseau"
|
||||
|
|
|
|||
|
|
@ -79,8 +79,7 @@ AbstractSettingsLayout {
|
|||
accessibleUseButtonText: qsTr("use_cardav_server_accessible_name")
|
||||
proxyModel: CarddavProxy {
|
||||
onModelReset: {
|
||||
// Allow multiple CardDAV accounts
|
||||
carddavProvider.showAddButton = true
|
||||
carddavProvider.showAddButton = carddavProvider.proxyModel.count == 0
|
||||
carddavProvider.newItemGui = createGuiObject('Carddav')
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,129 +0,0 @@
|
|||
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls.Basic as Control
|
||||
import Linphone
|
||||
import SettingsCpp 1.0
|
||||
import UtilsCpp
|
||||
import 'qrc:/qt/qml/Linphone/view/Style/buttonStyle.js' as ButtonStyle
|
||||
import "qrc:/qt/qml/Linphone/view/Control/Tool/Helper/utils.js" as Utils
|
||||
|
||||
AbstractSettingsLayout {
|
||||
id: mainItem
|
||||
width: parent?.width
|
||||
contentModel: [
|
||||
{
|
||||
//: Language
|
||||
title: qsTr("settings_display_language_title"),
|
||||
subTitle: "",
|
||||
contentComponent: languageComponent
|
||||
},
|
||||
{
|
||||
//: Appearance
|
||||
title: qsTr("settings_display_appearance_title"),
|
||||
subTitle: "",
|
||||
contentComponent: appearanceComponent
|
||||
}
|
||||
]
|
||||
|
||||
onSave: {
|
||||
SettingsCpp.save()
|
||||
}
|
||||
onUndo: SettingsCpp.undo()
|
||||
|
||||
// Language settings
|
||||
////////////////////
|
||||
|
||||
Component {
|
||||
id: languageComponent
|
||||
ColumnLayout {
|
||||
spacing: Utils.getSizeWithScreenRatio(20)
|
||||
|
||||
ComboSetting {
|
||||
Layout.fillWidth: true
|
||||
//: Language
|
||||
titleText: qsTr("settings_display_language_select")
|
||||
//: Select your preferred language
|
||||
subTitleText: qsTr("settings_display_language_subtitle")
|
||||
propertyName: "configLocale"
|
||||
propertyOwner: SettingsCpp
|
||||
model: [
|
||||
{text: "English", value: "en"},
|
||||
{text: "Deutsch", value: "de"},
|
||||
{text: "Francais", value: "fr"},
|
||||
{text: "Espanol", value: "es"},
|
||||
{text: "Portugues", value: "pt"},
|
||||
{text: "Italiano", value: "it"},
|
||||
{text: "Nederlands", value: "nl"},
|
||||
{text: "Polski", value: "pl"},
|
||||
{text: "Cesky", value: "cs"},
|
||||
{text: "Slovensky", value: "sk"},
|
||||
{text: "Magyar", value: "hu"},
|
||||
{text: "Suomi", value: "fi"},
|
||||
{text: "Russkiy", value: "ru"},
|
||||
{text: "Ukrayinska", value: "uk"},
|
||||
{text: "Zhongwen", value: "zh_Hans"}
|
||||
]
|
||||
}
|
||||
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
//: Restart required for language change
|
||||
text: qsTr("settings_display_language_restart_hint")
|
||||
color: DefaultStyle.main2_500main
|
||||
font.pixelSize: Typography.p2.pixelSize
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Appearance settings
|
||||
//////////////////////
|
||||
|
||||
Component {
|
||||
id: appearanceComponent
|
||||
ColumnLayout {
|
||||
spacing: Utils.getSizeWithScreenRatio(20)
|
||||
|
||||
SwitchSetting {
|
||||
Layout.fillWidth: true
|
||||
//: Dark mode
|
||||
titleText: qsTr("settings_display_dark_mode_title")
|
||||
//: Enable dark mode (or follows system theme like Breeze Dark)
|
||||
subTitleText: qsTr("settings_display_dark_mode_subtitle")
|
||||
propertyName: "darkModeAllowed"
|
||||
propertyOwner: SettingsCpp
|
||||
}
|
||||
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
//: System dark theme is detected automatically
|
||||
text: DefaultStyle.systemDarkMode
|
||||
? qsTr("settings_display_system_dark_detected")
|
||||
: qsTr("settings_display_system_light_detected")
|
||||
color: DefaultStyle.main2_500main
|
||||
font.pixelSize: Typography.p2.pixelSize
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
ComboSetting {
|
||||
Layout.fillWidth: true
|
||||
//: Accent color
|
||||
titleText: qsTr("settings_display_theme_color_title")
|
||||
//: Choose the accent color for buttons and highlights
|
||||
subTitleText: qsTr("settings_display_theme_color_subtitle")
|
||||
propertyName: "themeMainColor"
|
||||
propertyOwner: SettingsCpp
|
||||
model: [
|
||||
{text: "Orange", value: "orange"},
|
||||
{text: "Green", value: "green"},
|
||||
{text: "Blue", value: "blue"},
|
||||
{text: "Red", value: "red"},
|
||||
{text: "Purple", value: "purple"},
|
||||
{text: "Pink", value: "pink"},
|
||||
{text: "Yellow", value: "yellow"}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4,15 +4,10 @@ import Linphone
|
|||
import SettingsCpp
|
||||
|
||||
QtObject {
|
||||
// Dark mode detection: use setting or auto-detect from system
|
||||
property bool isDarkMode: SettingsCpp.darkModeAllowed || systemDarkMode
|
||||
property bool systemDarkMode: Qt.styleHints.colorScheme === Qt.Dark
|
||||
|
||||
property var currentTheme: Themes.themes.hasOwnProperty(SettingsCpp.themeMainColor)
|
||||
? Themes.themes[SettingsCpp.themeMainColor]
|
||||
: Themes.themes["orange"]
|
||||
|
||||
// Main accent colors (from theme)
|
||||
property var main1_100: currentTheme.main100
|
||||
property var main1_200: currentTheme.main200
|
||||
property var main1_300: currentTheme.main300
|
||||
|
|
@ -20,40 +15,37 @@ QtObject {
|
|||
property var main1_600: currentTheme.main600
|
||||
property var main1_700: currentTheme.main700
|
||||
|
||||
// Main UI colors - switch based on dark mode
|
||||
property var main2_0: isDarkMode ? "#1a1a1a" : "#FAFEFF"
|
||||
property var main2_100: isDarkMode ? "#252525" : "#EEF6F8"
|
||||
property var main2_200: isDarkMode ? "#2d2d2d" : "#DFECF2"
|
||||
property var main2_300: isDarkMode ? "#3d3d3d" : "#C0D1D9"
|
||||
property var main2_400: isDarkMode ? "#5a5a5a" : "#9AABB5"
|
||||
property var main2_500_main: isDarkMode ? "#8a8a8a" : "#6C7A87"
|
||||
property var main2_600: isDarkMode ? "#b0b0b0" : "#4E6074"
|
||||
property var main2_700: isDarkMode ? "#c8c8c8" : "#364860"
|
||||
property var main2_800: isDarkMode ? "#e0e0e0" : "#22334D"
|
||||
property var main2_900: isDarkMode ? "#f0f0f0" : "#2D3648"
|
||||
property var main2_0: "#FAFEFF"
|
||||
property var main2_100: "#EEF6F8"
|
||||
property var main2_200: "#DFECF2"
|
||||
property var main2_300: "#C0D1D9"
|
||||
property var main2_400: "#9AABB5"
|
||||
property var main2_500_main: "#6C7A87"
|
||||
property var main2_600: "#4E6074"
|
||||
property var main2_700: "#364860"
|
||||
property var main2_800: "#22334D"
|
||||
property var main2_900: "#2D3648"
|
||||
|
||||
// Grey colors - inverted for dark mode
|
||||
property var grey_0: isDarkMode ? "#1a1a1a" : "#FFFFFF"
|
||||
property var grey_100: isDarkMode ? "#252525" : "#F9F9F9"
|
||||
property var grey_200: isDarkMode ? "#333333" : "#EDEDED"
|
||||
property var grey_300: isDarkMode ? "#4a4a4a" : "#C9C9C9"
|
||||
property var grey_400: isDarkMode ? "#6b6b6b" : "#949494"
|
||||
property var grey_500: isDarkMode ? "#b1b1b1" : "#4E4E4E"
|
||||
property var grey_600: isDarkMode ? "#d1d1d1" : "#2E3030"
|
||||
property var grey_850: isDarkMode ? "#404040" : "#D9D9D9"
|
||||
property var grey_900: isDarkMode ? "#f8f8f8" : "#070707"
|
||||
property var grey_1000: isDarkMode ? "#ffffff" : "#000000"
|
||||
property var grey_0: "#FFFFFF"
|
||||
property var grey_100: "#F9F9F9"
|
||||
property var grey_200: "#EDEDED"
|
||||
property var grey_300: "#C9C9C9"
|
||||
property var grey_400: "#949494"
|
||||
property var grey_500: "#4E4E4E"
|
||||
property var grey_600: "#2E3030"
|
||||
property var grey_850: "#D9D9D9"
|
||||
property var grey_900: "#070707"
|
||||
property var grey_1000: "#000000"
|
||||
|
||||
// Status colors - keep similar but adjust for dark mode visibility
|
||||
property var warning_600: "#DBB820"
|
||||
property var warning_700: "#AF9308"
|
||||
property var danger_500_main: "#DD5F5F"
|
||||
property var warning_500_main: "#FFDC2E"
|
||||
property var danger_700: "#9E3548"
|
||||
property var danger_900: isDarkMode ? "#ff6666" : "#723333"
|
||||
property var danger_900: "#723333"
|
||||
property var success_500_main: "#4FAE80"
|
||||
property var success_700: "#377d71"
|
||||
property var success_900: isDarkMode ? "#5fd9a8" : "#1E4C53"
|
||||
property var success_900: "#1E4C53"
|
||||
property var info_500_main: "#4AA8FF"
|
||||
property var info_800_main: "#02528D"
|
||||
|
||||
|
|
@ -75,10 +67,10 @@ QtObject {
|
|||
property string flagFont: "Noto Color Emoji"
|
||||
property string defaultFont: "Noto Sans"
|
||||
|
||||
property var numericPadPressedButtonColor: isDarkMode ? "#2a3a3d" : "#EEF7F8"
|
||||
property var numericPadPressedButtonColor: "#EEF7F8"
|
||||
|
||||
property var groupCallButtonColor: isDarkMode ? "#2a3a3d" : "#EEF7F8"
|
||||
property var groupCallButtonColor: "#EEF7F8"
|
||||
|
||||
property var placeholders: isDarkMode ? '#555555' : '#CACACA'
|
||||
property var placeholders: '#CACACA' // No name in design
|
||||
|
||||
}
|
||||
|
|
|
|||
2
external/linphone-sdk
vendored
2
external/linphone-sdk
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 4193a9481e6d8530bec6f6af26efb59285a53e0e
|
||||
Subproject commit 2e6e6b927ce202f6948da02ea33081a52b89bf48
|
||||
Loading…
Reference in a new issue