mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-23 14:48:15 +00:00
feat(app): settings in progress (ui)
This commit is contained in:
parent
4f22e23c60
commit
ece8e32fa4
43 changed files with 758 additions and 66 deletions
|
|
@ -51,6 +51,13 @@
|
|||
<translation>PAUSE CALL</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CallsWindow</name>
|
||||
<message>
|
||||
<source>callsTitle</source>
|
||||
<translation type="unfinished">Calls</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Chat</name>
|
||||
<message>
|
||||
|
|
@ -503,6 +510,80 @@ Server url not configured.</translation>
|
|||
<translation type="vanished">Search contact or enter SIP address</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsCallsChat</name>
|
||||
<message>
|
||||
<source>fileServerLabel</source>
|
||||
<translation>File server</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>encryptWithLimeLabel</source>
|
||||
<translation>Encrypt with LIME</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>limeDisabled</source>
|
||||
<translation>Disabled</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>limeRequired</source>
|
||||
<translation>Requis</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>limePreferred</source>
|
||||
<translation>Preferred</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>chatTitle</source>
|
||||
<translation>Chat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>callsTitle</source>
|
||||
<translation>Calls</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>encryptionLabel</source>
|
||||
<translation>Encryption</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>noEncryption</source>
|
||||
<translation>None</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsWindow</name>
|
||||
<message>
|
||||
<source>settingsTitle</source>
|
||||
<translation>Linphone - Settings</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>sipAccountsTab</source>
|
||||
<translation>SIP accounts</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>audioTab</source>
|
||||
<translation>Audio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>videoTab</source>
|
||||
<translation>Video</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>callsAndChatTab</source>
|
||||
<translation>Calls and Chat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>networkTab</source>
|
||||
<translation>Network</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>uiTab</source>
|
||||
<translation>User Interface</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>validButton</source>
|
||||
<translation>OK</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SmartSearchBar</name>
|
||||
<message>
|
||||
|
|
|
|||
|
|
@ -43,6 +43,13 @@
|
|||
<translation>PAUSE</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CallsWindow</name>
|
||||
<message>
|
||||
<source>callsTitle</source>
|
||||
<translation type="unfinished">Appels</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Chat</name>
|
||||
<message>
|
||||
|
|
@ -513,6 +520,80 @@ Url du serveur non configurée.</translation>
|
|||
<translation type="vanished">Rechercher un contact ou entrer une adresse SIP</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsCallsChat</name>
|
||||
<message>
|
||||
<source>fileServerLabel</source>
|
||||
<translation>Serveur de partage</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>encryptWithLimeLabel</source>
|
||||
<translation>Chiffrer avec LIME</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>limeDisabled</source>
|
||||
<translation>Désactivé</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>limeRequired</source>
|
||||
<translation>Obligatoire</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>limePreferred</source>
|
||||
<translation>Préféré</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>chatTitle</source>
|
||||
<translation>Chat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>callsTitle</source>
|
||||
<translation>Appels</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>encryptionLabel</source>
|
||||
<translation>Chiffrement</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>noEncryption</source>
|
||||
<translation>Aucune</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsWindow</name>
|
||||
<message>
|
||||
<source>settingsTitle</source>
|
||||
<translation>Linphone - Paramètres</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>sipAccountsTab</source>
|
||||
<translation>Comptes SIP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>audioTab</source>
|
||||
<translation>Audio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>videoTab</source>
|
||||
<translation>Vidéo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>callsAndChatTab</source>
|
||||
<translation>Appels et Chat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>networkTab</source>
|
||||
<translation>Réseau</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>uiTab</source>
|
||||
<translation>Interface Utilisateur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>validButton</source>
|
||||
<translation>OK</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SmartSearchBar</name>
|
||||
<message>
|
||||
|
|
|
|||
|
|
@ -167,9 +167,14 @@
|
|||
<file>ui/modules/Common/Form/ActionSwitch.qml</file>
|
||||
<file>ui/modules/Common/Form/CheckBoxText.qml</file>
|
||||
<file>ui/modules/Common/Form/ExclusiveButtons.qml</file>
|
||||
<file>ui/modules/Common/Form/FormGroup.qml</file>
|
||||
<file>ui/modules/Common/Form/Form.qml</file>
|
||||
<file>ui/modules/Common/Form/ListForm.qml</file>
|
||||
<file>ui/modules/Common/Form/SmallButton.qml</file>
|
||||
<file>ui/modules/Common/Form/StaticListForm.qml</file>
|
||||
<file>ui/modules/Common/Form/Tab/TabBar.qml</file>
|
||||
<file>ui/modules/Common/Form/Tab/TabButton.qml</file>
|
||||
<file>ui/modules/Common/Form/Tab/TabContainer.qml</file>
|
||||
<file>ui/modules/Common/Form/TextButtonA.qml</file>
|
||||
<file>ui/modules/Common/Form/TextButtonB.qml</file>
|
||||
<file>ui/modules/Common/Form/TextField.qml</file>
|
||||
|
|
@ -200,8 +205,12 @@
|
|||
<file>ui/modules/Common/Styles/Form/ActionBarStyle.qml</file>
|
||||
<file>ui/modules/Common/Styles/Form/CheckBoxTextStyle.qml</file>
|
||||
<file>ui/modules/Common/Styles/Form/ExclusiveButtonsStyle.qml</file>
|
||||
<file>ui/modules/Common/Styles/Form/FormGroupStyle.qml</file>
|
||||
<file>ui/modules/Common/Styles/Form/FormStyle.qml</file>
|
||||
<file>ui/modules/Common/Styles/Form/ListFormStyle.qml</file>
|
||||
<file>ui/modules/Common/Styles/Form/SmallButtonStyle.qml</file>
|
||||
<file>ui/modules/Common/Styles/Form/Tab/TabButtonStyle.qml</file>
|
||||
<file>ui/modules/Common/Styles/Form/Tab/TabContainerStyle.qml</file>
|
||||
<file>ui/modules/Common/Styles/Form/TextButtonAStyle.qml</file>
|
||||
<file>ui/modules/Common/Styles/Form/TextButtonBStyle.qml</file>
|
||||
<file>ui/modules/Common/Styles/Form/TextFieldStyle.qml</file>
|
||||
|
|
@ -266,19 +275,27 @@
|
|||
<file>ui/views/App/Calls/IncomingCall.qml</file>
|
||||
<file>ui/views/App/Calls/OutgoingCall.qml</file>
|
||||
<file>ui/views/App/IncallFullscreen.qml</file>
|
||||
<file>ui/views/App/MainWindow/ContactEdit.qml</file>
|
||||
<file>ui/views/App/MainWindow/Contacts.qml</file>
|
||||
<file>ui/views/App/MainWindow/Conversation.qml</file>
|
||||
<file>ui/views/App/MainWindow/Home.qml</file>
|
||||
<file>ui/views/App/MainWindow/MainWindow.qml</file>
|
||||
<file>ui/views/App/Main/ContactEdit.qml</file>
|
||||
<file>ui/views/App/Main/Contacts.qml</file>
|
||||
<file>ui/views/App/Main/Conversation.qml</file>
|
||||
<file>ui/views/App/Main/Home.qml</file>
|
||||
<file>ui/views/App/Main/MainWindow.qml</file>
|
||||
<file>ui/views/App/ManageAccounts.qml</file>
|
||||
<file>ui/views/App/qmldir</file>
|
||||
<file>ui/views/App/Settings/SettingsAudio.qml</file>
|
||||
<file>ui/views/App/Settings/SettingsCallsChat.qml</file>
|
||||
<file>ui/views/App/Settings/SettingsNetwork.qml</file>
|
||||
<file>ui/views/App/Settings/SettingsSipAccounts.qml</file>
|
||||
<file>ui/views/App/Settings/SettingsUi.qml</file>
|
||||
<file>ui/views/App/Settings/SettingsVideo.qml</file>
|
||||
<file>ui/views/App/Settings/SettingsWindow.qml</file>
|
||||
<file>ui/views/App/Styles/Calls/CallStyle.qml</file>
|
||||
<file>ui/views/App/Styles/Calls/CallsWindowStyle.qml</file>
|
||||
<file>ui/views/App/Styles/MainWindow/ContactEditStyle.qml</file>
|
||||
<file>ui/views/App/Styles/MainWindow/ContactsStyle.qml</file>
|
||||
<file>ui/views/App/Styles/MainWindow/ConversationStyle.qml</file>
|
||||
<file>ui/views/App/Styles/MainWindow/MainWindowStyle.qml</file>
|
||||
<file>ui/views/App/Styles/Main/ContactEditStyle.qml</file>
|
||||
<file>ui/views/App/Styles/Main/ContactsStyle.qml</file>
|
||||
<file>ui/views/App/Styles/Main/ConversationStyle.qml</file>
|
||||
<file>ui/views/App/Styles/Main/MainWindowStyle.qml</file>
|
||||
<file>ui/views/App/Styles/qmldir</file>
|
||||
<file>ui/views/App/Styles/Settings/SettingsWindowStyle.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
|||
|
|
@ -41,9 +41,10 @@
|
|||
#define LANGUAGES_PATH ":/languages/"
|
||||
#define WINDOW_ICON_PATH ":/assets/images/linphone.png"
|
||||
|
||||
// The two main windows of Linphone desktop.
|
||||
#define QML_VIEW_MAIN_WINDOW "qrc:/ui/views/App/MainWindow/MainWindow.qml"
|
||||
#define QML_VIEW_CALL_WINDOW "qrc:/ui/views/App/Calls/CallsWindow.qml"
|
||||
// The main windows of Linphone desktop.
|
||||
#define QML_VIEW_MAIN_WINDOW "qrc:/ui/views/App/Main/MainWindow.qml"
|
||||
#define QML_VIEW_CALLS_WINDOW "qrc:/ui/views/App/Calls/CallsWindow.qml"
|
||||
#define QML_VIEW_SETTINGS_WINDOW "qrc:/ui/views/App/Settings/SettingsWindow.qml"
|
||||
|
||||
// =============================================================================
|
||||
|
||||
|
|
@ -85,11 +86,7 @@ App::App (int &argc, char **argv) : QApplication(argc, argv) {
|
|||
// -----------------------------------------------------------------------------
|
||||
|
||||
QQuickWindow *App::getCallsWindow () const {
|
||||
QQuickWindow *window = m_engine.rootContext()->contextProperty("CallsWindow").value<QQuickWindow *>();
|
||||
if (!window)
|
||||
qFatal("Unable to get calls window.");
|
||||
|
||||
return window;
|
||||
return m_calls_window;
|
||||
}
|
||||
|
||||
QQuickWindow *App::getMainWindow () const {
|
||||
|
|
@ -97,8 +94,14 @@ QQuickWindow *App::getMainWindow () const {
|
|||
return qobject_cast<QQuickWindow *>(engine.rootObjects().at(0));
|
||||
}
|
||||
|
||||
QQuickWindow *App::getSettingsWindow () const {
|
||||
return m_settings_window;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
bool App::hasFocus () const {
|
||||
return getMainWindow()->isActive() || getCallsWindow()->isActive();
|
||||
return getMainWindow()->isActive() || m_calls_window->isActive();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
@ -108,9 +111,9 @@ void App::initContentApp () {
|
|||
CoreManager::init();
|
||||
qInfo() << "Core manager initialized.";
|
||||
|
||||
// Register types and load context properties.
|
||||
// Register types ans make sub windows.
|
||||
registerTypes();
|
||||
addContextProperties();
|
||||
createSubWindows();
|
||||
|
||||
// Enable notifications.
|
||||
m_notifier = new Notifier();
|
||||
|
|
@ -130,6 +133,8 @@ void App::initContentApp () {
|
|||
setTrayIcon();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void App::registerTypes () {
|
||||
qInfo() << "Registering types...";
|
||||
|
||||
|
|
@ -214,19 +219,28 @@ void App::registerTypes () {
|
|||
qRegisterMetaType<ChatModel::EntryType>("ChatModel::EntryType");
|
||||
}
|
||||
|
||||
void App::addContextProperties () {
|
||||
qInfo() << "Adding context properties...";
|
||||
QQmlContext *context = m_engine.rootContext();
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
QQmlComponent component(&m_engine, QUrl(QML_VIEW_CALL_WINDOW));
|
||||
inline QQuickWindow *createSubWindow (QQmlApplicationEngine &engine, const char *path) {
|
||||
QQmlComponent component(&engine, QUrl(path));
|
||||
if (component.isError()) {
|
||||
qWarning() << component.errors();
|
||||
abort();
|
||||
}
|
||||
|
||||
context->setContextProperty("CallsWindow", component.create());
|
||||
// Default Ownership is Cpp: http://doc.qt.io/qt-5/qqmlengine.html#ObjectOwnership-enum
|
||||
return qobject_cast<QQuickWindow *>(component.create());
|
||||
}
|
||||
|
||||
void App::createSubWindows () {
|
||||
qInfo() << "Create sub windows...";
|
||||
|
||||
m_calls_window = createSubWindow(m_engine, QML_VIEW_CALLS_WINDOW);
|
||||
m_settings_window = createSubWindow(m_engine, QML_VIEW_SETTINGS_WINDOW);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void App::setTrayIcon () {
|
||||
QQuickWindow *root = getMainWindow();
|
||||
QMenu *menu = new QMenu();
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ public:
|
|||
|
||||
QQuickWindow *getCallsWindow () const;
|
||||
QQuickWindow *getMainWindow () const;
|
||||
QQuickWindow *getSettingsWindow () const;
|
||||
|
||||
bool hasFocus () const;
|
||||
|
||||
|
|
@ -76,7 +77,7 @@ private:
|
|||
void initContentApp ();
|
||||
|
||||
void registerTypes ();
|
||||
void addContextProperties ();
|
||||
void createSubWindows ();
|
||||
void setTrayIcon ();
|
||||
|
||||
QQmlApplicationEngine m_engine;
|
||||
|
|
@ -91,6 +92,9 @@ private:
|
|||
Notifier *m_notifier = nullptr;
|
||||
QString m_locale = "en";
|
||||
|
||||
QQuickWindow *m_calls_window = nullptr;
|
||||
QQuickWindow *m_settings_window = nullptr;
|
||||
|
||||
static App *m_instance;
|
||||
};
|
||||
|
||||
|
|
|
|||
41
linphone-desktop/ui/modules/Common/Form/Form.qml
Normal file
41
linphone-desktop/ui/modules/Common/Form/Form.qml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
import QtQuick 2.7
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
import Common.Styles 1.0
|
||||
|
||||
// =============================================================================
|
||||
|
||||
Column {
|
||||
property alias title: title.text
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
spacing: FormStyle.spacing
|
||||
|
||||
ColumnLayout {
|
||||
width: parent.width
|
||||
|
||||
spacing: FormStyle.header.spacing
|
||||
|
||||
Text {
|
||||
id: title
|
||||
|
||||
color: FormStyle.header.title.color
|
||||
font {
|
||||
bold: true
|
||||
pointSize: FormStyle.header.title.fontSize
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: FormStyle.header.separator.height
|
||||
|
||||
color: FormStyle.header.separator.color
|
||||
}
|
||||
|
||||
Item {
|
||||
height: FormStyle.header.bottomMargin
|
||||
}
|
||||
}
|
||||
}
|
||||
42
linphone-desktop/ui/modules/Common/Form/FormGroup.qml
Normal file
42
linphone-desktop/ui/modules/Common/Form/FormGroup.qml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
import QtQuick 2.7
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
import Common.Styles 1.0
|
||||
|
||||
// =============================================================================
|
||||
|
||||
RowLayout {
|
||||
property alias label: label.text
|
||||
|
||||
default property alias _content: content.data
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
spacing: FormGroupStyle.spacing
|
||||
|
||||
Text {
|
||||
id: label
|
||||
|
||||
Layout.preferredHeight: FormGroupStyle.legend.height
|
||||
Layout.preferredWidth: FormGroupStyle.legend.width
|
||||
|
||||
color: FormGroupStyle.legend.color
|
||||
font.pointSize: FormGroupStyle.legend.fontSize
|
||||
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
Item {
|
||||
id: content
|
||||
|
||||
Layout.alignment: {
|
||||
var height = _content[0].height
|
||||
return height < label.height ? Qt.AlignVCenter : Qt.AlignTop
|
||||
}
|
||||
|
||||
Layout.maximumWidth: FormGroupStyle.content.width
|
||||
Layout.preferredHeight: _content[0].height
|
||||
Layout.preferredWidth: FormGroupStyle.content.width
|
||||
}
|
||||
}
|
||||
6
linphone-desktop/ui/modules/Common/Form/Tab/TabBar.qml
Normal file
6
linphone-desktop/ui/modules/Common/Form/Tab/TabBar.qml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.1
|
||||
|
||||
// =============================================================================
|
||||
|
||||
TabBar {}
|
||||
67
linphone-desktop/ui/modules/Common/Form/Tab/TabButton.qml
Normal file
67
linphone-desktop/ui/modules/Common/Form/Tab/TabButton.qml
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.1
|
||||
|
||||
import Common.Styles 1.0
|
||||
|
||||
// =============================================================================
|
||||
|
||||
TabButton {
|
||||
id: button
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
function _getBackgroundColor () {
|
||||
if (button.parent.parent.currentItem === button) {
|
||||
return TabButtonStyle.backgroundColor.selected
|
||||
}
|
||||
|
||||
return button.down
|
||||
? TabButtonStyle.backgroundColor.pressed
|
||||
: (
|
||||
button.hovered
|
||||
? TabButtonStyle.backgroundColor.hovered
|
||||
: TabButtonStyle.backgroundColor.normal
|
||||
)
|
||||
}
|
||||
|
||||
function _getTextColor () {
|
||||
if (button.parent.parent.currentItem === button) {
|
||||
return TabButtonStyle.text.color.selected
|
||||
}
|
||||
|
||||
return button.down
|
||||
? TabButtonStyle.text.color.pressed
|
||||
: (
|
||||
button.hovered
|
||||
? TabButtonStyle.text.color.hovered
|
||||
: TabButtonStyle.text.color.normal
|
||||
)
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
background: Rectangle {
|
||||
color: _getBackgroundColor()
|
||||
implicitHeight: TabButtonStyle.text.height
|
||||
}
|
||||
|
||||
contentItem: Text {
|
||||
color: _getTextColor()
|
||||
|
||||
font {
|
||||
bold: true
|
||||
pointSize: TabButtonStyle.text.fontSize
|
||||
}
|
||||
|
||||
elide: Text.ElideRight
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
leftPadding: TabButtonStyle.text.leftPadding
|
||||
rightPadding: TabButtonStyle.text.rightPadding
|
||||
text: button.text
|
||||
}
|
||||
|
||||
hoverEnabled: true
|
||||
}
|
||||
25
linphone-desktop/ui/modules/Common/Form/Tab/TabContainer.qml
Normal file
25
linphone-desktop/ui/modules/Common/Form/Tab/TabContainer.qml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import QtQuick 2.7
|
||||
|
||||
import Common.Styles 1.0
|
||||
|
||||
// =============================================================================
|
||||
|
||||
Rectangle {
|
||||
default property alias _content: content.data
|
||||
|
||||
anchors.fill: parent
|
||||
color: TabContainerStyle.color
|
||||
|
||||
Item {
|
||||
id: content
|
||||
|
||||
anchors {
|
||||
fill: parent
|
||||
|
||||
bottomMargin: TabContainerStyle.bottomMargin
|
||||
leftMargin: TabContainerStyle.leftMargin
|
||||
rightMargin: TabContainerStyle.rightMargin
|
||||
topMargin: TabContainerStyle.topMargin
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -18,6 +18,7 @@ Controls.TextField {
|
|||
}
|
||||
color: TextFieldStyle.background.color
|
||||
implicitHeight: TextFieldStyle.background.height
|
||||
implicitWidth: TextFieldStyle.background.width
|
||||
|
||||
radius: TextFieldStyle.background.radius
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ Item {
|
|||
// See: https://www.opengl.org/sdk/docs/man/html/mix.xhtml
|
||||
fragmentShader: '
|
||||
#ifdef GL_ES
|
||||
precision lowp float;
|
||||
#endif
|
||||
precision lowp float;
|
||||
#endif
|
||||
uniform sampler2D image;
|
||||
uniform sampler2D mask;
|
||||
uniform vec4 backgroundColor;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
pragma Singleton
|
||||
import QtQuick 2.7
|
||||
|
||||
import Common 1.0
|
||||
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property int spacing: 20
|
||||
|
||||
property QtObject content: QtObject {
|
||||
property int height: 300
|
||||
property int width: 300
|
||||
}
|
||||
|
||||
property QtObject legend: QtObject {
|
||||
property color color: Colors.j
|
||||
property int fontSize: 10
|
||||
property int height: 36
|
||||
property int width: 150
|
||||
}
|
||||
}
|
||||
25
linphone-desktop/ui/modules/Common/Styles/Form/FormStyle.qml
Normal file
25
linphone-desktop/ui/modules/Common/Styles/Form/FormStyle.qml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
pragma Singleton
|
||||
import QtQuick 2.7
|
||||
|
||||
import Common 1.0
|
||||
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property int spacing: 10
|
||||
|
||||
property QtObject header: QtObject {
|
||||
property int bottomMargin: 5
|
||||
property int spacing: 5
|
||||
|
||||
property QtObject separator: QtObject {
|
||||
property color color: Colors.i
|
||||
property int height: 2
|
||||
}
|
||||
|
||||
property QtObject title: QtObject {
|
||||
property color color: Colors.i
|
||||
property int fontSize: 12
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
pragma Singleton
|
||||
import QtQuick 2.7
|
||||
|
||||
import Common 1.0
|
||||
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property QtObject backgroundColor: QtObject {
|
||||
property color hovered: Colors.s
|
||||
property color normal: Colors.i
|
||||
property color pressed: Colors.t
|
||||
property color selected: Colors.k
|
||||
}
|
||||
|
||||
property QtObject text: QtObject {
|
||||
property int fontSize: 9
|
||||
property int height: 40
|
||||
property int leftPadding: 10
|
||||
property int rightPadding: 10
|
||||
|
||||
property QtObject color: QtObject {
|
||||
property color hovered: Colors.k
|
||||
property color normal: Colors.k
|
||||
property color pressed: Colors.k
|
||||
property color selected: Colors.i
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
pragma Singleton
|
||||
import QtQuick 2.7
|
||||
|
||||
import Common 1.0
|
||||
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property color color: Colors.k
|
||||
property int bottomMargin: 15
|
||||
property int leftMargin: 30
|
||||
property int rightMargin: 30
|
||||
property int topMargin: 30
|
||||
}
|
||||
|
|
@ -9,6 +9,8 @@ QtObject {
|
|||
property QtObject background: QtObject {
|
||||
property color color: Colors.k
|
||||
property int height: 36
|
||||
property int width: 300
|
||||
|
||||
property int radius: 4
|
||||
|
||||
property QtObject border: QtObject {
|
||||
|
|
|
|||
|
|
@ -16,10 +16,15 @@ singleton DroppableTextAreaStyle 1.0 DroppableTextAreaStyle.qml
|
|||
|
||||
singleton ForceScrollBarStyle 1.0 ForceScrollBarStyle.qml
|
||||
|
||||
singleton TabButtonStyle 1.0 Form/Tab/TabButtonStyle.qml
|
||||
singleton TabContainerStyle 1.0 Form/Tab/TabContainerStyle.qml
|
||||
|
||||
singleton AbstractTextButtonStyle 1.0 Form/AbstractTextButtonStyle.qml
|
||||
singleton ActionBarStyle 1.0 Form/ActionBarStyle.qml
|
||||
singleton CheckBoxTextStyle 1.0 Form/CheckBoxTextStyle.qml
|
||||
singleton ExclusiveButtonsStyle 1.0 Form/ExclusiveButtonsStyle.qml
|
||||
singleton FormStyle 1.0 Form/FormStyle.qml
|
||||
singleton FormGroupStyle 1.0 Form/FormGroupStyle.qml
|
||||
singleton ListFormStyle 1.0 Form/ListFormStyle.qml
|
||||
singleton SmallButtonStyle 1.0 Form/SmallButtonStyle.qml
|
||||
singleton TextButtonAStyle 1.0 Form/TextButtonAStyle.qml
|
||||
|
|
|
|||
|
|
@ -31,11 +31,17 @@ DroppableTextArea 1.0 DroppableTextArea.qml
|
|||
ForceScrollBar 1.0 ForceScrollBar.qml
|
||||
|
||||
# Form
|
||||
TabBar 1.0 Form/Tab/TabBar.qml
|
||||
TabButton 1.0 Form/Tab/TabButton.qml
|
||||
TabContainer 1.0 Form/Tab/TabContainer.qml
|
||||
|
||||
ActionBar 1.0 Form/ActionBar.qml
|
||||
ActionButton 1.0 Form/ActionButton.qml
|
||||
ActionSwitch 1.0 Form/ActionSwitch.qml
|
||||
CheckBoxText 1.0 Form/CheckBoxText.qml
|
||||
ExclusiveButtons 1.0 Form/ExclusiveButtons.qml
|
||||
Form 1.0 Form/Form.qml
|
||||
FormGroup 1.0 Form/FormGroup.qml
|
||||
LightButton 1.0 Form/LightButton.qml
|
||||
ListForm 1.0 Form/ListForm.qml
|
||||
StaticListForm 1.0 Form/StaticListForm.qml
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ import Common 1.0
|
|||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property color color: Colors.k
|
||||
property int height: 120
|
||||
property int iconSize: 40
|
||||
property int spacing: 0
|
||||
property int width: 300
|
||||
property color color: Colors.k
|
||||
property int height: 120
|
||||
property int iconSize: 40
|
||||
property int spacing: 0
|
||||
property int width: 300
|
||||
property int bottomMargin: 15
|
||||
property int leftMargin: 15
|
||||
property int rightMargin: 15
|
||||
|
|
|
|||
|
|
@ -6,22 +6,22 @@ import Common 1.0
|
|||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property color color: Colors.k
|
||||
property int height: 55
|
||||
property int iconSize: 40
|
||||
property int leftMargin: 25
|
||||
property int rightMargin: 15
|
||||
property int spacing: 10
|
||||
property int width: 300
|
||||
property color color: Colors.k
|
||||
property int height: 55
|
||||
property int iconSize: 40
|
||||
property int leftMargin: 25
|
||||
property int rightMargin: 15
|
||||
property int spacing: 10
|
||||
property int width: 300
|
||||
|
||||
property QtObject fileName: QtObject {
|
||||
property color color: Colors.h
|
||||
property int fontSize: 10
|
||||
}
|
||||
property QtObject fileName: QtObject {
|
||||
property color color: Colors.h
|
||||
property int fontSize: 10
|
||||
}
|
||||
|
||||
property QtObject fileSize: QtObject {
|
||||
property color color: Colors.h
|
||||
property int fontSize: 9
|
||||
property int width: 100
|
||||
}
|
||||
property QtObject fileSize: QtObject {
|
||||
property color color: Colors.h
|
||||
property int fontSize: 9
|
||||
property int width: 100
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ Window {
|
|||
|
||||
minimumHeight: CallsWindowStyle.minimumHeight
|
||||
minimumWidth: CallsWindowStyle.minimumWidth
|
||||
title: CallsWindowStyle.title
|
||||
title: qsTr('callsTitle')
|
||||
|
||||
Paned {
|
||||
anchors.fill: parent
|
||||
|
|
|
|||
|
|
@ -359,14 +359,14 @@ Rectangle {
|
|||
}
|
||||
|
||||
ActionSwitch {
|
||||
enabled: CallsWindow.chatIsOpened
|
||||
enabled: window.chatIsOpened
|
||||
icon: 'chat'
|
||||
|
||||
onClicked: {
|
||||
if (enabled) {
|
||||
CallsWindow.closeChat()
|
||||
window.closeChat()
|
||||
} else {
|
||||
CallsWindow.openChat()
|
||||
window.openChat()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,13 +21,13 @@ Window {
|
|||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
function _exit (cb) {
|
||||
incall.close()
|
||||
function _exit (cb) {
|
||||
incall.close()
|
||||
|
||||
if (cb) {
|
||||
cb()
|
||||
}
|
||||
}
|
||||
if (cb) {
|
||||
cb()
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
9
linphone-desktop/ui/views/App/Settings/SettingsAudio.qml
Normal file
9
linphone-desktop/ui/views/App/Settings/SettingsAudio.qml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import QtQuick 2.7
|
||||
|
||||
import Common 1.0
|
||||
|
||||
// =============================================================================
|
||||
|
||||
TabContainer {
|
||||
|
||||
}
|
||||
53
linphone-desktop/ui/views/App/Settings/SettingsCallsChat.qml
Normal file
53
linphone-desktop/ui/views/App/Settings/SettingsCallsChat.qml
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
import QtQuick 2.7
|
||||
|
||||
import Common 1.0
|
||||
|
||||
// =============================================================================
|
||||
|
||||
TabContainer {
|
||||
Column {
|
||||
anchors.fill: parent
|
||||
spacing: 10
|
||||
|
||||
Form {
|
||||
title: qsTr('callsTitle')
|
||||
width: parent.width
|
||||
|
||||
FormGroup {
|
||||
label: qsTr('encryptionLabel')
|
||||
|
||||
ExclusiveButtons {
|
||||
texts: [
|
||||
qsTr('noEncryption'),
|
||||
'SRTP',
|
||||
'ZRTP',
|
||||
'DTLS'
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Form {
|
||||
title: qsTr('chatTitle')
|
||||
width: parent.width
|
||||
|
||||
FormGroup {
|
||||
label: qsTr('fileServerLabel')
|
||||
|
||||
TextField {}
|
||||
}
|
||||
|
||||
FormGroup {
|
||||
label: qsTr('encryptWithLimeLabel')
|
||||
|
||||
ExclusiveButtons {
|
||||
texts: [
|
||||
qsTr('limeDisabled'),
|
||||
qsTr('limeRequired'),
|
||||
qsTr('limePreferred')
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import QtQuick 2.7
|
||||
|
||||
import Common 1.0
|
||||
|
||||
// =============================================================================
|
||||
|
||||
TabContainer {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import QtQuick 2.7
|
||||
|
||||
import Common 1.0
|
||||
|
||||
// =============================================================================
|
||||
|
||||
TabContainer {
|
||||
|
||||
}
|
||||
9
linphone-desktop/ui/views/App/Settings/SettingsUi.qml
Normal file
9
linphone-desktop/ui/views/App/Settings/SettingsUi.qml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import QtQuick 2.7
|
||||
|
||||
import Common 1.0
|
||||
|
||||
// =============================================================================
|
||||
|
||||
TabContainer {
|
||||
|
||||
}
|
||||
9
linphone-desktop/ui/views/App/Settings/SettingsVideo.qml
Normal file
9
linphone-desktop/ui/views/App/Settings/SettingsVideo.qml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import QtQuick 2.7
|
||||
|
||||
import Common 1.0
|
||||
|
||||
// =============================================================================
|
||||
|
||||
TabContainer {
|
||||
|
||||
}
|
||||
97
linphone-desktop/ui/views/App/Settings/SettingsWindow.qml
Normal file
97
linphone-desktop/ui/views/App/Settings/SettingsWindow.qml
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.1
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
import Common 1.0
|
||||
|
||||
import App.Styles 1.0
|
||||
|
||||
// =============================================================================
|
||||
|
||||
ApplicationWindow {
|
||||
height: SettingsWindowStyle.height
|
||||
width: SettingsWindowStyle.width
|
||||
|
||||
maximumHeight: height
|
||||
maximumWidth: width
|
||||
|
||||
minimumHeight: height
|
||||
minimumWidth: width
|
||||
|
||||
title: qsTr('settingsTitle')
|
||||
visible: true
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
spacing: 0
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Navigation bar.
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
TabBar {
|
||||
id: navigationBar
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
||||
TabButton {
|
||||
text: qsTr('sipAccountsTab')
|
||||
width: implicitWidth
|
||||
}
|
||||
|
||||
TabButton {
|
||||
text: qsTr('audioTab')
|
||||
width: implicitWidth
|
||||
}
|
||||
|
||||
TabButton {
|
||||
text: qsTr('videoTab')
|
||||
width: implicitWidth
|
||||
}
|
||||
|
||||
TabButton {
|
||||
text: qsTr('callsAndChatTab')
|
||||
width: implicitWidth
|
||||
}
|
||||
|
||||
TabButton {
|
||||
text: qsTr('networkTab')
|
||||
width: implicitWidth
|
||||
}
|
||||
|
||||
TabButton {
|
||||
text: qsTr('uiTab')
|
||||
width: implicitWidth
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Content.
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
StackLayout {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
currentIndex: navigationBar.currentIndex
|
||||
|
||||
SettingsSipAccounts {}
|
||||
SettingsAudio {}
|
||||
SettingsVideo {}
|
||||
SettingsCallsChat {}
|
||||
SettingsNetwork {}
|
||||
SettingsUi {}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Buttons.
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
TextButtonB {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
Layout.bottomMargin: SettingsWindowStyle.validButton.bottomMargin
|
||||
Layout.rightMargin: SettingsWindowStyle.validButton.rightMargin
|
||||
|
||||
text: qsTr('validButton')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -8,7 +8,6 @@ import Common 1.0
|
|||
QtObject {
|
||||
property int minimumHeight: 480
|
||||
property int minimumWidth: 960
|
||||
property string title: 'Linphone'
|
||||
|
||||
property QtObject call: QtObject {
|
||||
property int minimumWidth: 395
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
pragma Singleton
|
||||
import QtQuick 2.7
|
||||
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property int height: 480
|
||||
property int width: 800
|
||||
|
||||
property QtObject validButton: QtObject {
|
||||
property int bottomMargin: 30
|
||||
property int rightMargin: 30
|
||||
}
|
||||
}
|
||||
|
|
@ -4,10 +4,12 @@ module App.Styles
|
|||
|
||||
# Views styles -----------------------------------------------------------------
|
||||
|
||||
singleton CallStyle 1.0 Calls/CallStyle.qml
|
||||
singleton CallsWindowStyle 1.0 Calls/CallsWindowStyle.qml
|
||||
singleton CallStyle 1.0 Calls/CallStyle.qml
|
||||
singleton CallsWindowStyle 1.0 Calls/CallsWindowStyle.qml
|
||||
|
||||
singleton ContactEditStyle 1.0 MainWindow/ContactEditStyle.qml
|
||||
singleton ContactsStyle 1.0 MainWindow/ContactsStyle.qml
|
||||
singleton ConversationStyle 1.0 MainWindow/ConversationStyle.qml
|
||||
singleton MainWindowStyle 1.0 MainWindow/MainWindowStyle.qml
|
||||
singleton ContactEditStyle 1.0 Main/ContactEditStyle.qml
|
||||
singleton ContactsStyle 1.0 Main/ContactsStyle.qml
|
||||
singleton ConversationStyle 1.0 Main/ConversationStyle.qml
|
||||
singleton MainWindowStyle 1.0 Main/MainWindowStyle.qml
|
||||
|
||||
singleton SettingsWindowStyle 1.0 Settings/SettingsWindowStyle.qml
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue