mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-01 11:39:26 +00:00
feat(app): use styles modules instead of qrc paths
This commit is contained in:
parent
5f98c29ae3
commit
d373f9cd8e
21 changed files with 33 additions and 30 deletions
|
|
@ -35,16 +35,16 @@
|
|||
<file>ui/components/form/DarkButton.qml</file>
|
||||
<file>ui/components/invertedMouseArea/InvertedMouseArea.qml</file>
|
||||
<file>ui/scripts/utils.js</file>
|
||||
<file>ui/style/components/qmldir</file>
|
||||
<file>ui/style/components/DialogStyle.qml</file>
|
||||
<file>ui/style/components/ScrollBarStyle.qml</file>
|
||||
<file>ui/style/components/TimelineStyle.qml</file>
|
||||
<file>ui/style/components/SearchBoxStyle.qml</file>
|
||||
<file>ui/style/components/CollapseStyle.qml</file>
|
||||
<file>ui/style/components/PopupStyle.qml</file>
|
||||
<file>ui/style/global/qmldir</file>
|
||||
<file>ui/style/global/Colors.qml</file>
|
||||
<file>ui/style/global/Constants.qml</file>
|
||||
<file>ui/style/ComponentsStyle/qmldir</file>
|
||||
<file>ui/style/ComponentsStyle/DialogStyle.qml</file>
|
||||
<file>ui/style/ComponentsStyle/ScrollBarStyle.qml</file>
|
||||
<file>ui/style/ComponentsStyle/TimelineStyle.qml</file>
|
||||
<file>ui/style/ComponentsStyle/SearchBoxStyle.qml</file>
|
||||
<file>ui/style/ComponentsStyle/CollapseStyle.qml</file>
|
||||
<file>ui/style/ComponentsStyle/PopupStyle.qml</file>
|
||||
<file>ui/style/AppStyle/qmldir</file>
|
||||
<file>ui/style/AppStyle/Colors.qml</file>
|
||||
<file>ui/style/AppStyle/Constants.qml</file>
|
||||
<file>ui/views/newCall.qml</file>
|
||||
<file>ui/views/manageAccounts.qml</file>
|
||||
<file>ui/views/mainWindow/mainWindow.qml</file>
|
||||
|
|
|
|||
|
|
@ -55,6 +55,9 @@ int main (int argc, char *argv[]) {
|
|||
QQmlFileSelector *selector = new QQmlFileSelector(&engine);
|
||||
selector->setExtraSelectors(QStringList("custom"));
|
||||
|
||||
// Set modules paths.
|
||||
engine.addImportPath(":/ui/style");
|
||||
|
||||
engine.load(QUrl("qrc:/ui/views/mainWindow/mainWindow.qml"));
|
||||
if (engine.rootObjects().isEmpty())
|
||||
return EXIT_FAILURE;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import QtQuick 2.7
|
||||
|
||||
import 'qrc:/ui/components/form'
|
||||
import ComponentsStyle 1.0
|
||||
|
||||
import 'qrc:/ui/style/components'
|
||||
import 'qrc:/ui/components/form'
|
||||
|
||||
// ===================================================================
|
||||
// A simple component to build collapsed item.
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import QtQuick 2.7
|
||||
|
||||
import 'qrc:/ui/components/form'
|
||||
import ComponentsStyle 1.0
|
||||
|
||||
import 'qrc:/ui/style/components'
|
||||
import 'qrc:/ui/components/form'
|
||||
|
||||
// ===================================================================
|
||||
// A dialog with OK/Cancel buttons.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import QtQuick 2.7
|
||||
|
||||
import 'qrc:/ui/style/components'
|
||||
import ComponentsStyle 1.0
|
||||
|
||||
// ===================================================================
|
||||
// Description content used by dialogs.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import QtQuick 2.7
|
|||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.Window 2.2
|
||||
|
||||
import 'qrc:/ui/style/components'
|
||||
import ComponentsStyle 1.0
|
||||
|
||||
// ===================================================================
|
||||
// Helper to build quickly dialogs.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import QtQuick 2.7
|
||||
|
||||
import 'qrc:/ui/style/global'
|
||||
import AppStyle 1.0
|
||||
|
||||
// ===================================================================
|
||||
// Helper to handle button click outside a component.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import QtGraphicalEffects 1.0
|
||||
|
||||
import 'qrc:/ui/style/components'
|
||||
import ComponentsStyle 1.0
|
||||
|
||||
// ===================================================================
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
|
||||
import 'qrc:/ui/style/components'
|
||||
import ComponentsStyle 1.0
|
||||
|
||||
// ===================================================================
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
|
||||
import AppStyle 1.0
|
||||
import ComponentsStyle 1.0
|
||||
|
||||
import 'qrc:/ui/components/invertedMouseArea'
|
||||
import 'qrc:/ui/components/popup'
|
||||
|
||||
import 'qrc:/ui/style/components'
|
||||
import 'qrc:/ui/style/global'
|
||||
|
||||
// ===================================================================
|
||||
|
||||
Item {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import QtQuick 2.7
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
import ComponentsStyle 1.0
|
||||
|
||||
import 'qrc:/ui/components/contact'
|
||||
import 'qrc:/ui/components/image'
|
||||
import 'qrc:/ui/components/view'
|
||||
|
||||
import 'qrc:/ui/style/components'
|
||||
|
||||
// ===================================================================
|
||||
|
||||
ColumnLayout {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# See: https://wiki.qt.io/Qml_Styling
|
||||
|
||||
module Style
|
||||
module AppStyle
|
||||
|
||||
singleton Colors 1.0 Colors.qml
|
||||
singleton Constants 1.0 Constants.qml
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
pragma Singleton
|
||||
import QtQuick 2.7
|
||||
|
||||
import 'qrc:/ui/style/global'
|
||||
import AppStyle 1.0
|
||||
|
||||
QtObject {
|
||||
property QtObject shadow: QtObject {
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
pragma Singleton
|
||||
import QtQuick 2.7
|
||||
|
||||
import 'qrc:/ui/style/global'
|
||||
import AppStyle 1.0
|
||||
|
||||
QtObject {
|
||||
property string color: Colors.c
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
pragma Singleton
|
||||
import QtQuick 2.7
|
||||
|
||||
import 'qrc:/ui/style/global'
|
||||
import AppStyle 1.0
|
||||
|
||||
QtObject {
|
||||
property string shadowColor: Colors.a
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
pragma Singleton
|
||||
import QtQuick 2.7
|
||||
|
||||
import 'qrc:/ui/style/global'
|
||||
import AppStyle 1.0
|
||||
|
||||
QtObject {
|
||||
property QtObject legend: QtObject {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# See: https://wiki.qt.io/Qml_Styling
|
||||
|
||||
module Style
|
||||
module ComponentsStyle
|
||||
|
||||
singleton CollapseStyle 1.0 CollapseStyle.qml
|
||||
singleton DialogStyle 1.0 DialogStyle.qml
|
||||
Loading…
Add table
Reference in a new issue