Commit 1f6aedf8 authored by camilo higuita's avatar camilo higuita

more toolbars styling, identify Main toolbars [header toolbar, footer toolbar]...

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