Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 59c2c8ad authored by Camilo Higuita's avatar Camilo Higuita

make it work again with latets mauitki and for now remove gumbo and wait form...

make it work again with latets mauitki and for now remove gumbo and wait form the new scrapper from kde
parent e5a9f3f3
......@@ -18,11 +18,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_definitions( -Wall -O2 -fexceptions -std=c99)
#add_definitions( -Wall -O2 -fexceptions -std=c99)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/QGumboParser
${CMAKE_CURRENT_BINARY_DIR}/QGumboParser
# ${CMAKE_CURRENT_SOURCE_DIR}/QGumboParser
# ${CMAKE_CURRENT_BINARY_DIR}/QGumboParser
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_BINARY_DIR}/src
......@@ -72,62 +72,62 @@ set(buho_ASSETS
assets/icon-theme.qrc
)
set(qgumbo_SRCS
QGumboParser/qgumbodocument.cpp
QGumboParser/qgumbonode.cpp
QGumboParser/qgumboattribute.cpp
QGumboParser/gumbo-parser/src/attribute.c
QGumboParser/gumbo-parser/src/char_ref.c
QGumboParser/gumbo-parser/src/error.c
QGumboParser/gumbo-parser/src/parser.c
QGumboParser/gumbo-parser/src/string_buffer.c
QGumboParser/gumbo-parser/src/string_piece.c
QGumboParser/gumbo-parser/src/tag.c
QGumboParser/gumbo-parser/src/tokenizer.c
QGumboParser/gumbo-parser/src/utf8.c
QGumboParser/gumbo-parser/src/util.c
QGumboParser/gumbo-parser/src/vector.c
)
set(qgumbo_HDRS
QGumboParser/qgumboattribute.h
QGumboParser/qgumbodocument.h
QGumboParser/HtmlTag.h
QGumboParser/qgumbonode.h
QGumboParser/gumbo-parser/src/attribute.h
QGumboParser/gumbo-parser/src/char_ref.h
QGumboParser/gumbo-parser/src/char_ref.rl
QGumboParser/gumbo-parser/src/error.h
QGumboParser/gumbo-parser/src/gumbo.h
QGumboParser/gumbo-parser/src/insertion_mode.h
QGumboParser/gumbo-parser/src/parser.h
QGumboParser/gumbo-parser/src/string_buffer.h
QGumboParser/gumbo-parser/src/string_piece.h
QGumboParser/gumbo-parser/src/tag_enum.h
QGumboParser/gumbo-parser/src/tag_gperf.h
QGumboParser/gumbo-parser/src/tag_sizes.h
QGumboParser/gumbo-parser/src/tag_strings.h
QGumboParser/gumbo-parser/src/token_type.h
QGumboParser/gumbo-parser/src/tokenizer_states.h
QGumboParser/gumbo-parser/src/tokenizer.h
QGumboParser/gumbo-parser/src/utf8.h
QGumboParser/gumbo-parser/src/util.h
QGumboParser/gumbo-parser/src/vector.h
)
#set(qgumbo_SRCS
# QGumboParser/qgumbodocument.cpp
# QGumboParser/qgumbonode.cpp
# QGumboParser/qgumboattribute.cpp
# QGumboParser/gumbo-parser/src/attribute.c
# QGumboParser/gumbo-parser/src/char_ref.c
# QGumboParser/gumbo-parser/src/error.c
# QGumboParser/gumbo-parser/src/parser.c
# QGumboParser/gumbo-parser/src/string_buffer.c
# QGumboParser/gumbo-parser/src/string_piece.c
# QGumboParser/gumbo-parser/src/tag.c
# QGumboParser/gumbo-parser/src/tokenizer.c
# QGumboParser/gumbo-parser/src/utf8.c
# QGumboParser/gumbo-parser/src/util.c
# QGumboParser/gumbo-parser/src/vector.c
# )
#set(qgumbo_HDRS
# QGumboParser/qgumboattribute.h
# QGumboParser/qgumbodocument.h
# QGumboParser/HtmlTag.h
# QGumboParser/qgumbonode.h
# QGumboParser/gumbo-parser/src/attribute.h
# QGumboParser/gumbo-parser/src/char_ref.h
# QGumboParser/gumbo-parser/src/char_ref.rl
# QGumboParser/gumbo-parser/src/error.h
# QGumboParser/gumbo-parser/src/gumbo.h
# QGumboParser/gumbo-parser/src/insertion_mode.h
# QGumboParser/gumbo-parser/src/parser.h
# QGumboParser/gumbo-parser/src/string_buffer.h
# QGumboParser/gumbo-parser/src/string_piece.h
# QGumboParser/gumbo-parser/src/tag_enum.h
# QGumboParser/gumbo-parser/src/tag_gperf.h
# QGumboParser/gumbo-parser/src/tag_sizes.h
# QGumboParser/gumbo-parser/src/tag_strings.h
# QGumboParser/gumbo-parser/src/token_type.h
# QGumboParser/gumbo-parser/src/tokenizer_states.h
# QGumboParser/gumbo-parser/src/tokenizer.h
# QGumboParser/gumbo-parser/src/utf8.h
# QGumboParser/gumbo-parser/src/util.h
# QGumboParser/gumbo-parser/src/vector.h
# )
add_executable(buho
${buho_SRCS}
${buho_HDRS}
${buho_ASSETS}
${qgumbo_SRCS}
${qgumbo_HDRS}
# ${qgumbo_SRCS}
# ${qgumbo_HDRS}
)
if (ANDROID)
find_package(Qt5 REQUIRED COMPONENTS AndroidExtras)
target_link_libraries(vvave Qt5::AndroidExtras)
target_link_libraries(buho Qt5::AndroidExtras)
kde_source_files_enable_exceptions(buho src/buho.cpp)
else()
find_package(KF5 ${KF5_VERSION} REQUIRED COMPONENTS I18n Notifications Config KIO Attica SyntaxHighlighting)
......@@ -149,4 +149,4 @@ install(FILES org.kde.buho.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
install(FILES assets/buho.svg DESTINATION ${KDE_INSTALL_ICONDIR}/hicolor/scalable/apps)
#install(FILES org.kde.buho.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
......@@ -207,7 +207,7 @@ GumboTag gumbo_tagn_enum(const char* tagname, unsigned int length);
/**
* Attribute namespaces.
* HTML includes special handling for XLink, XML, and XMLNS namespaces on
* attributes. Everything else goes in the generic "NONE" namespace.
* attributes. Everything else goes in the generic "NONE" nameMaui.Style.space.
*/
typedef enum {
GUMBO_ATTR_NAMESPACE_NONE,
......@@ -299,7 +299,7 @@ typedef enum {
GUMBO_NODE_CDATA,
/** Comment node. v will be a GumboText, excluding comment delimiters. */
GUMBO_NODE_COMMENT,
/** Text node, where all contents is whitespace. v will be a GumboText. */
/** Text node, where all contents is whiteMaui.Style.space. v will be a GumboText. */
GUMBO_NODE_WHITESPACE,
/** Template node. This is separate from GUMBO_NODE_ELEMENT because many
* client libraries will want to ignore the contents of template nodes, as
......@@ -329,7 +329,7 @@ typedef enum {
* Unlike in X(HT)ML, namespaces in HTML5 are not denoted by a prefix. Rather,
* anything inside an <svg> tag is in the SVG namespace, anything inside the
* <math> tag is in the MathML namespace, and anything else is inside the HTML
* namespace. No other namespaces are supported, so this can be an enum only.
* nameMaui.Style.space. No other namespaces are supported, so this can be an enum only.
*/
typedef enum {
GUMBO_NAMESPACE_HTML,
......
......@@ -48,7 +48,7 @@ typedef struct {
void gumbo_string_buffer_init(
struct GumboInternalParser* parser, GumboStringBuffer* output);
// Ensures that the buffer contains at least a certain amount of space. Most
// Ensures that the buffer contains at least a certain amount of Maui.Style.space. Most
// useful with snprintf and the other length-delimited string functions, which
// may want to write directly into the buffer.
void gumbo_string_buffer_reserve(struct GumboInternalParser* parser,
......
......@@ -2,7 +2,6 @@
#include <QIcon>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QQuickStyle>
#ifdef STATIC_KIRIGAMI
#include "3rdparty/kirigami/src/kirigamiplugin.h"
......@@ -18,7 +17,7 @@
#include <QtWebView/QtWebView>
#else
#include <QApplication>
#include <QtWebEngine>
#include <QtWebView/QtWebView>
#endif
#include "./src/buho.h"
......
......@@ -25,7 +25,7 @@ Maui.ApplicationWindow
// highlightColor: accentColor
// altColorText : "white"/*Qt.darker(accentColor, 2.5)*/
showAccounts: true
Maui.App.handleAccounts: true
Maui.App.description: qsTr("Buho allows you to take quick notes, collect links and take long notes organized by chapters.")
Maui.App.iconName: "qrc:/buho.svg"
......@@ -91,20 +91,20 @@ Maui.ApplicationWindow
}
// headBar.colorScheme.borderColor: Qt.darker(accentColor, 1.4)
// headBar.implicitHeight: toolBarHeight * 1.5
// headBar.implicitHeight: Maui.Style.toolBarHeight * 1.5
Rectangle
{
z: 999
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.margins: toolBarHeight
anchors.bottomMargin: toolBarHeight
height: toolBarHeight
anchors.margins: Maui.Style.toolBarHeight
anchors.bottomMargin: Maui.Style.toolBarHeight
height: Maui.Style.toolBarHeight
width: height
color: Kirigami.Theme.highlightColor
radius: radiusV
radius: Maui.Style.radiusV
Maui.PieButton
{
......
......@@ -50,57 +50,57 @@ QByteArray Linker::getUrl(const QString &url)
/* extract needs to extract from a url the title, the body and a preview image*/
void Linker::extract(const QString &url)
{
auto data = getUrl(url);
// auto data = getUrl(url);
QString title = url;
auto titles = query(data, HtmlTag::TITLE);
// QString title = url;
// auto titles = query(data, HtmlTag::TITLE);
if(!titles.isEmpty())
title = titles[0];
// if(!titles.isEmpty())
// title = titles[0];
title = title.isEmpty() ? url : title;
// title = title.isEmpty() ? url : title;
QStringList imgs;
// QStringList imgs;
// auto tags = query(data, HtmlTag::META);
// // auto tags = query(data, HtmlTag::META);
for(auto img : query(data, HtmlTag::IMG, "src"))
{
if(imgs.contains(img) || img.isEmpty()) continue;
// for(auto img : query(data, HtmlTag::IMG, "src"))
// {
// if(imgs.contains(img) || img.isEmpty()) continue;
qDebug()<< "IMGAE URL" << img;
if((img.startsWith("http") || img.startsWith("https"))
&& (img.endsWith(".png", Qt::CaseInsensitive) ||
img.endsWith(".jpg", Qt::CaseInsensitive) ||
img.endsWith(".gif", Qt::CaseInsensitive) ||
img.endsWith(".jpeg", Qt::CaseInsensitive)))
// qDebug()<< "IMGAE URL" << img;
// if((img.startsWith("http") || img.startsWith("https"))
// && (img.endsWith(".png", Qt::CaseInsensitive) ||
// img.endsWith(".jpg", Qt::CaseInsensitive) ||
// img.endsWith(".gif", Qt::CaseInsensitive) ||
// img.endsWith(".jpeg", Qt::CaseInsensitive)))
imgs << img;
else continue;
}
// imgs << img;
// else continue;
// }
qDebug() << imgs;
LINK link_data {{FMH::MODEL_NAME[FMH::MODEL_KEY::TITLE], title.trimmed()},
{FMH::MODEL_NAME[FMH::MODEL_KEY::CONTENT], data},
{FMH::MODEL_NAME[FMH::MODEL_KEY::URL], data},
{FMH::MODEL_NAME[FMH::MODEL_KEY::IMG], imgs}};
emit previewReady(link_data);
// qDebug() << imgs;
// LINK link_data {{FMH::MODEL_NAME[FMH::MODEL_KEY::TITLE], title.trimmed()},
// {FMH::MODEL_NAME[FMH::MODEL_KEY::CONTENT], data},
// {FMH::MODEL_NAME[FMH::MODEL_KEY::URL], data},
// {FMH::MODEL_NAME[FMH::MODEL_KEY::IMG], imgs}};
// emit previewReady(link_data);
}
QStringList Linker::query(const QByteArray &array, const HtmlTag &tag, const QString &attribute)
QStringList Linker::query(const QByteArray &array, const QString &tag, const QString &attribute)
{
QStringList res;
auto doc = QGumboDocument::parse(array);
auto root = doc.rootNode();
// auto doc = QGumboDocument::parse(array);
// auto root = doc.rootNode();
auto node = root.getElementsByTagName(tag);
// auto node = root.getElementsByTagName(tag);
for(const auto &i : node)
{
if(attribute.isEmpty())
res << i.innerText();
else res << i.getAttribute(attribute);
}
// for(const auto &i : node)
// {
// if(attribute.isEmpty())
// res << i.innerText();
// else res << i.getAttribute(attribute);
// }
return res;
}
......
......@@ -3,8 +3,8 @@
#include <QObject>
#include "qgumbodocument.h"
#include "qgumbonode.h"
//#include "qgumbodocument.h"
//#include "qgumbonode.h"
#include <QVariantMap>
typedef QVariantMap LINK;
......@@ -19,7 +19,7 @@ public:
Q_INVOKABLE void extract(const QString &url);
private:
QStringList query(const QByteArray &array, const HtmlTag &tag, const QString &attribute = QString());
QStringList query(const QByteArray &array, const QString &tag, const QString &attribute = QString());
signals:
void previewReady(QVariantMap link);
......
......@@ -5,9 +5,7 @@
#ifdef STATIC_MAUIKIT
#include "mauiaccounts.h"
#include "mauiapp.h"
#else
#include <MauiKit/mauiapp.h>
#include <MauiKit/mauiaccounts.h>
#endif
......@@ -16,7 +14,7 @@ Books::Books(QObject *parent) : MauiList(parent),
{
this->syncer->setProvider(new NextNote);
const auto m_account = MauiApp::instance()->getAccounts();
const auto m_account = MauiAccounts::instance();
connect(m_account, &MauiAccounts::currentAccountChanged, [&](QVariantMap currentAccount)
{
Q_UNUSED(currentAccount)
......
......@@ -10,7 +10,6 @@
#else
#include <MauiKit/tagging.h>
#include <MauiKit/fm.h>
#include <MauiKit/mauiapp.h>
#include <MauiKit/mauiaccounts.h>
#endif
......@@ -21,7 +20,7 @@ Notes::Notes(QObject *parent) : MauiList(parent),
this->syncer->setProvider(new NextNote);
const auto m_account = MauiApp::instance()->getAccounts();
const auto m_account = MauiAccounts::instance();
connect(m_account, &MauiAccounts::currentAccountChanged, [&](QVariantMap currentAccount)
{
Q_UNUSED(currentAccount)
......
......@@ -5,9 +5,12 @@
#include <functional>
#ifdef STATIC_MAUIKIT
#include "fmh.h"
#include "downloader.h"
#else
#include <MauiKit/fmh.h>
#include <MauiKit/downloader.h>
#endif
/**
* @brief The AbstractNoteSyncer class
* is an abstraction for different services backend to sync notes.
......
......@@ -56,11 +56,11 @@ void NextNote::getNote(const QString &id)
QMap<QString, QString> header {{"Authorization", headerData.toLocal8Bit()}};
auto downloader = new FMH::Downloader;
connect(downloader, &FMH::Downloader::dataReady, [&, downloader = std::move(downloader)](QByteArray array)
connect(downloader, &FMH::Downloader::dataReady, [&, downloader_ = std::move(downloader)](QByteArray array)
{
const auto notes = this->parseNotes(array);
emit this->noteReady(notes.isEmpty() ? FMH::MODEL() : notes.first());
downloader->deleteLater();
downloader_->deleteLater();
});
downloader->getArray(url, header);
......@@ -87,7 +87,7 @@ void NextNote::getNotes()
QMap<QString, QString> header {{"Authorization", headerData.toLocal8Bit()}};
const auto downloader = new FMH::Downloader;
connect(downloader, &FMH::Downloader::dataReady, [&, downloader = std::move(downloader)](QByteArray array)
connect(downloader, &FMH::Downloader::dataReady, [&, downloader_ = std::move(downloader)](QByteArray array)
{
//exclude notes that have its own category
FMH::MODEL_LIST notes;
......@@ -96,7 +96,7 @@ void NextNote::getNotes()
notes << data;
emit this->notesReady(notes);
downloader->deleteLater();
downloader_->deleteLater();
});
downloader->getArray(url, header);
......@@ -113,7 +113,7 @@ void NextNote::getBooklets()
QMap<QString, QString> header {{"Authorization", headerData.toLocal8Bit()}};
const auto downloader = new FMH::Downloader;
connect(downloader, &FMH::Downloader::dataReady, [&, downloader = std::move(downloader)](QByteArray array)
connect(downloader, &FMH::Downloader::dataReady, [&, downloader_ = std::move(downloader)](QByteArray array)
{
//exclude notes that have its own category
FMH::MODEL_LIST booklets;
......@@ -122,7 +122,7 @@ void NextNote::getBooklets()
booklets << data;
emit this->bookletsReady(booklets);
downloader->deleteLater();
downloader_->deleteLater();
});
downloader->getArray(url, header);
......@@ -130,7 +130,7 @@ void NextNote::getBooklets()
void NextNote::insertNote(const FMH::MODEL &note)
{
QByteArray payload = QJsonDocument::fromVariant(FM::toMap(note)).toJson();
QByteArray payload = QJsonDocument::fromVariant(FMH::toMap(note)).toJson();
qDebug() << "UPLOADING NEW NOT" << QVariant(payload).toString();
const auto url = QString(NextNote::API+"%1").replace("PROVIDER", this->m_provider).arg("notes");
......@@ -162,7 +162,7 @@ void NextNote::insertNote(const FMH::MODEL &note)
void NextNote::insertBooklet(const FMH::MODEL &booklet)
{
QByteArray payload = QJsonDocument::fromVariant(FM::toMap(booklet)).toJson();
QByteArray payload = QJsonDocument::fromVariant(FMH::toMap(booklet)).toJson();
qDebug() << "UPLOADING NEW BOOKLET" << QVariant(payload).toString();
const auto url = QString(NextNote::API+"%1").replace("PROVIDER", this->m_provider).arg("notes");
......@@ -200,7 +200,7 @@ void NextNote::updateNote(const QString &id, const FMH::MODEL &note)
return;
}
QByteArray payload = QJsonDocument::fromVariant(FM::toMap(FMH::filterModel(note, {FMH::MODEL_KEY::CONTENT,
QByteArray payload = QJsonDocument::fromVariant(FMH::toMap(FMH::filterModel(note, {FMH::MODEL_KEY::CONTENT,
FMH::MODEL_KEY::FAVORITE,
FMH::MODEL_KEY::MODIFIED,
FMH::MODEL_KEY::CATEGORY}))).toJson();
......@@ -243,7 +243,7 @@ void NextNote::updateBooklet(const QString &id, const FMH::MODEL &booklet)
return;
}
QByteArray payload = QJsonDocument::fromVariant(FM::toMap(FMH::filterModel(booklet, {FMH::MODEL_KEY::CONTENT,
QByteArray payload = QJsonDocument::fromVariant(FMH::toMap(FMH::filterModel(booklet, {FMH::MODEL_KEY::CONTENT,
FMH::MODEL_KEY::FAVORITE,
FMH::MODEL_KEY::MODIFIED,
FMH::MODEL_KEY::CATEGORY}))).toJson();
......@@ -332,13 +332,10 @@ const FMH::MODEL_LIST NextNote::parseNotes(const QByteArray &array)
if(data.isNull() || !data.isValid())
return res;
if(!data.toList().isEmpty())
{
for(const auto &map : data.toList())
res << FM::toModel(map.toMap());
}
if(!data.toList().isEmpty())
res<< FMH::toModelList(data.toList());
else
res << FM::toModel(data.toMap());
res << FMH::toModel(data.toMap());
return res;
}
......
......@@ -8,11 +8,10 @@
#include "tagging.h"
#include "fm.h"
#include "mauiaccounts.h"
#include "mauiapp.h"
#else
#include <MauiKit/tagging.h>
#include <MauiKit/fm.h>
#include <MauiKit/mauiapp.h>
#include <MauiKit/fmstatic.h>
#include <MauiKit/mauiaccounts.h>
#endif
......@@ -21,7 +20,7 @@ Syncer::Syncer(QObject *parent) : QObject(parent),
db(DB::getInstance()),
provider(nullptr) {
const auto m_account = MauiApp::instance()->getAccounts();
const auto m_account = MauiAccounts::instance();
connect(m_account, &MauiAccounts::currentAccountChanged, [&](QVariantMap currentAccount)
{
this->setAccount(FMH::toModel(currentAccount));
......@@ -485,7 +484,7 @@ bool Syncer::insertBookLocal(FMH::MODEL &book)
return false;
}
if(!FM::createDir(QUrl::fromLocalFile(OWL::BooksPath), book[FMH::MODEL_KEY::TITLE]))
if(!FMStatic::createDir(QUrl::fromLocalFile(OWL::BooksPath), book[FMH::MODEL_KEY::TITLE]))
{
qWarning() << "Could not create directory for the given book name. Syncer::insertBookLocal" << book[FMH::MODEL_KEY::TITLE];
return false;
......
......@@ -53,11 +53,11 @@ Item
id: title
Layout.fillWidth: true
Layout.fillHeight: true
// Layout.margins: space.medium
// Layout.margins: Maui.Style.space.medium
placeholderText: qsTr("New chapter...")
font.weight: Font.Bold
font.bold: true
font.pointSize: fontSizes.large
font.pointSize: Maui.Style.fontSizes.large
text: currentBooklet.title
// Kirigami.Theme.backgroundColor: selectedColor
// Kirigami.Theme.textColor: Qt.darker(selectedColor, 2.5)
......@@ -75,7 +75,7 @@ Item
id: _holder
visible: !_listView.count || !currentBooklet
emoji: "qrc:/Type.png"
emojiSize: iconSizes.huge
emojiSize: Maui.Style.iconSizes.huge
isMask: false
title : "Nothing to edit!"
body: "Select a chapter or create a new one"
......@@ -135,10 +135,10 @@ Item
Maui.Holder
{
anchors.margins: space.huge
anchors.margins: Maui.Style.space.huge
visible: !_listView.count
emoji: "qrc:/E-reading.png"
emojiSize: iconSizes.huge
emojiSize: Maui.Style.iconSizes.huge
isMask: false
title : "This book is empty!"
body: "Start by creating a new chapter for your book by clicking the + icon"
......@@ -179,13 +179,13 @@ Item
{
z: 999
anchors.bottom: parent.bottom
anchors.margins: space.huge
anchors.margins: Maui.Style.space.huge
anchors.horizontalCenter: parent.horizontalCenter
height: toolBarHeight
height: Maui.Style.toolBarHeight
width: height
color: Kirigami.Theme.positiveTextColor
radius: radiusV
radius: Maui.Style.radiusV
ToolButton
{
......
......@@ -49,7 +49,7 @@ StackView
Maui.Page
{
id: _booksPage
padding: showDetails ? 0 : space.big
padding: showDetails ? 0 : Maui.Style.space.big
title : cardsView.count + " books"
// headBar.leftContent: [
......@@ -76,7 +76,7 @@ StackView
id: _holder
visible: !cardsView.count
emoji: "qrc:/notepad.png"
emojiSize: iconSizes.huge
emojiSize: Maui.Style.iconSizes.huge
isMask: false
title : "There are not Books!"
body: "You can create new books and organize your notes"
......@@ -89,9 +89,9 @@ StackView
id: cardsView
anchors.fill: parent
adaptContent: !showDetails
itemSize: showDetails ? iconSizes.big : iconSizes.huge
itemSize: showDetails ? Maui.Style.iconSizes.big : Maui.Style.iconSizes.huge
// centerContent: true
spacing: space.huge
spacing: Maui.Style.space.huge
cellWidth: showDetails ? parent.width : itemSize * 1.5
cellHeight: itemSize * 1.5
......@@ -137,7 +137,7 @@ StackView
Layout.fillHeight: true
color: hovered ? Kirigami.Theme.highlightColor : "transparent"
radius: radiusV
radius: Maui.Style.radiusV
Label
{
width: parent.width
......@@ -157,7 +157,7 @@ StackView
{
left: parent.left
top: parent.top
margins: space.small
margins: Maui.Style.space.small
}
Kirigami.Theme.backgroundColor: Kirigami.Theme.neutralTextColor
......
......@@ -22,7 +22,7 @@ Maui.Page
signal linkClicked(var link)
headBar.visible: !cardsView.holder.visible
padding: space.big
padding: Maui.Style.space.big
title : cardsView.count + " links"
headBar.leftContent: [
ToolButton
......@@ -134,8 +134,8 @@ Maui.Page
holder.isMask: false
holder.title : "No Links!"
holder.body: "Click here to save a new link"
holder.emojiSize: iconSizes.huge
itemHeight: unit * 250
holder.emojiSize: Maui.Style.iconSizes.huge
itemHeight: Maui.Style.unit * 250
model: linksModel
......
......@@ -10,7 +10,7 @@ Maui.Dialog
parent: parent
heightHint: 0.97
widthHint: 0.97
maxWidth: 800*unit
maxWidth: 800*Maui.Style.unit
maxHeight: maxWidth
page.padding: 0
property color selectedColor : "transparent"
......@@ -92,7 +92,7 @@ Maui.Dialog
// Item
// {
// Layout.fillWidth: true
// height: rowHeightAlt
// height: Maui.Style.rowHeightAlt
// Label
// {
......@@ -103,7 +103,7 @@ Maui.Dialog
// horizontalAlignment: Qt.AlignHCenter
// verticalAlignment: Qt.AlignVCenter
// font.bold: true
// font.pointSize: fontSizes.big
// font.pointSize: Maui.Style.fontSizes.big
// font.weight: Font.Bold
// elide: Label.ElideRight
// }
......
......@@ -18,7 +18,7 @@ Maui.Page
signal noteClicked(var note)
padding: space.big
padding: Maui.Style.space.big
headBar.visible: !cardsView.holder.visible
title : cardsView.count + " notes"
......@@ -148,7 +148,7 @@ Maui.Page
}
color: Kirigami.Theme.backgroundColor
radius: radiusV
radius: Maui.Style.radiusV
border.color: Qt.darker(Kirigami.Theme.backgroundColor, 1.4)
}
......@@ -161,7 +161,7 @@ Maui.Page
Layout.fillWidth: true
width: parent.width
holder.emoji: "qrc:/Type.png"
holder.emojiSize: iconSizes.huge
holder.emojiSize: Maui.Style.iconSizes.huge
holder.isMask: false
holder.title : "No notes!"
holder.body: "Click here to create a new note"
......
......@@ -3,15 +3,16 @@ import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import org.kde.kirigami 2.2 as Kirigami
import org.kde.kirigami 2.7 as Kirigami
import org.kde.mauikit 1.0 as Maui