Commit ab21a4e5 authored by Ronan's avatar Ronan
Browse files

feat(app): try to extract style from component (unstable)

parent 6fceeeb1
......@@ -33,6 +33,7 @@ lupdate_only{
ui/components/scrollBar/*.qml \
ui/components/select/*.qml \
ui/components/timeline/*.qml \
ui/style/collapse/*.qml \
ui/views/*.qml \
ui/views/mainWindow/*.qml
}
......
......@@ -33,6 +33,8 @@
<file>ui/components/form/DarkButton.qml</file>
<file>ui/components/invertedMouseArea/InvertedMouseArea.qml</file>
<file>ui/scripts/utils.js</file>
<file>ui/style/qmldir</file>
<file>ui/style/collapse/Style.qml</file>
<file>ui/views/newCall.qml</file>
<file>ui/views/manageAccounts.qml</file>
<file>ui/views/mainWindow/mainWindow.qml</file>
......
#include <cstdlib>
#include <QQmlFileSelector>
#include <QMenu>
#include <QQmlApplicationEngine>
#include <QQmlContext>
......@@ -46,9 +47,15 @@ void setTrayIcon (QQmlApplicationEngine &engine) {
}
int main (int argc, char *argv[]) {
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
App app(argc, argv);
QQmlApplicationEngine engine(QUrl("qrc:/ui/views/mainWindow/mainWindow.qml"));
QQmlApplicationEngine engine;
// Provide `+custom` folders for custom components.
QQmlFileSelector *selector = new QQmlFileSelector(&engine);
selector->setExtraSelectors(QStringList("custom"));
engine.load(QUrl("qrc:/ui/views/mainWindow/mainWindow.qml"));
if (engine.rootObjects().isEmpty())
return EXIT_FAILURE;
......
......@@ -3,6 +3,8 @@ import QtQuick 2.7
import 'qrc:/ui/components/form'
import 'qrc:/ui/components/image'
import 'qrc:/ui/style' as Style
// ===================================================================
Item {
......@@ -18,9 +20,7 @@ Item {
ActionButton {
anchors.centerIn: parent
background: Rectangle {
color: 'transparent'
}
background: Style.CollapseStyle.background
icon: 'collapse'
iconSize: 32
id: button
......
......@@ -17,7 +17,6 @@ Item {
}
_mouseArea.parent = (function () {
// Search root.
var root = item
while (root.parent != null) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment