Commit 96cae144 authored by camilo higuita's avatar camilo higuita

add app name, version and icon, and also some fixes to follow Nomad HIG and style close #17

parent dbcc2eb3
......@@ -4,5 +4,6 @@
<file>assets/Babe.notifyrc</file>
<file>assets/face-sleeping.png</file>
<file>assets/face-hug.png</file>
<file>assets/pix.png</file>
</qresource>
</RCC>
#include <QApplication>
#include <QQmlApplicationEngine>
#include <QFontDatabase>
#include <QQmlContext>
#include <QQuickStyle>
#include <QIcon>
#include "src/pix.h"
#ifdef Q_OS_ANDROID
......@@ -14,17 +14,19 @@ int main(int argc, char *argv[])
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv);
QFontDatabase::addApplicationFont(":/utils/materialdesignicons-webfont.ttf");
app.setApplicationName(PIX::App);
app.setApplicationVersion(PIX::version);
app.setApplicationDisplayName(PIX::App);
app.setWindowIcon(QIcon(":/img/assets/pix.png"));
#ifdef Q_OS_ANDROID
KirigamiPlugin::getInstance().registerTypes();
#else
//#else
// if(QQuickStyle::availableStyles().contains("nomad"))
// QQuickStyle::setStyle("nomad");
#endif
Pix pix;
Pix pix;
QQmlApplicationEngine engine;
QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, [&]()
......@@ -33,7 +35,7 @@ int main(int argc, char *argv[])
pix.refreshCollection();
});
auto context = engine.rootContext();
auto context = engine.rootContext();
context->setContextProperty("pix", &pix);
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
......
......@@ -29,28 +29,11 @@ Page
anchors.fill: parent
spacing: 0
Rectangle
ToolBar
{
id: header
height: toolbarHeight
Layout.fillWidth: true
visible: headerbarVisible
focus: true
color: backgroundColor
Kirigami.Separator
{
visible: !isMobile
width: parent.width
height: 1
anchors
{
left: parent.left
right: parent.right
bottom: parent.bottom
}
}
RowLayout
{
......
......@@ -8,6 +8,8 @@ import "../view_models"
ToolBar
{
position: ToolBar.Header
property string accentColor : pix.pixColor()
property string textColor : textColor
......@@ -191,8 +193,6 @@ ToolBar
ToolTip.text: qsTr("Search")
}
}
}
}
......@@ -13,6 +13,8 @@ PixPage
content: StackView
{
id: stackView
height: parent.height
width: parent.width
initialItem: FoldersGrid
{
......
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