On Tue, Aug 16, 2016 at 03:48:49PM +0200, Marco Martin wrote: > On Tuesday 16 August 2016, Dirk Hohndel wrote: > > Just to make sure I understand this correctly... You are suggesting that I > > shouldn't build Kirigami as a separate library, but that I should include > > the kirigami.pri file from the Subsurface-mobile.pro file? And I assume > > that i then don't need much of what I spent all weekend trying to make > > work? > > ah, if what you have now works, then that's fine :) > was something to try if it wasn't working yet :)
So here are the kirigami patches that I now use. The last one I don't think you want to take. But I'd love to see a property that a program using Kirigami can use to overwrite the fairly narrow defauly of 20 grid units. /D
>From 12d43e899ee28493098bb8d78f17413bddd10fd2 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel <d...@hohndel.org> Date: Mon, 15 Aug 2016 16:39:21 -0700 Subject: [PATCH 1/4] More qmake fixes The .pro file didn't include the resource file, which made things not work when built with qmake. Also, the .pri file was missing the enums .cpp/.h files. Signed-off-by: Dirk Hohndel <d...@hohndel.org> --- kirigami.pri | 4 ++-- kirigami.pro | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/kirigami.pri b/kirigami.pri index fc88c4c..8bf35a3 100644 --- a/kirigami.pri +++ b/kirigami.pri @@ -1,7 +1,7 @@ QT += qml quick gui svg -HEADERS += $$PWD/src/kirigamiplugin.h -SOURCES += $$PWD/src/kirigamiplugin.cpp +HEADERS += $$PWD/src/kirigamiplugin.h $$PWD/src/enums.h +SOURCES += $$PWD/src/kirigamiplugin.cpp $$PWD/src/enums.cpp INCLUDEPATH += $$PWD/src DEFINES += KIRIGAMI_BUILD_TYPE_STATIC diff --git a/kirigami.pro b/kirigami.pro index f7d6fe6..87af61f 100644 --- a/kirigami.pro +++ b/kirigami.pro @@ -4,6 +4,7 @@ CONFIG += plugin QT += qml quick gui svg HEADERS += $$PWD/src/kirigamiplugin.h $$PWD/src/enums.h SOURCES += $$PWD/src/kirigamiplugin.cpp $$PWD/src/enums.cpp +RESOURCES += $$PWD/kirigami.qrc API_VER=1.0 -- 2.7.4 (Apple Git-66)
>From a7db5877074d1ee6edc258827b54337eb67ca8f1 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel <d...@hohndel.org> Date: Mon, 15 Aug 2016 16:42:08 -0700 Subject: [PATCH 2/4] Q_RESOURCE_INIT macro has to be called by user Calling this from within the library doesn't seem to be the right thing to do, according to the documentation at http://doc.qt.io/qt-5/resources.html Signed-off-by: Dirk Hohndel <d...@hohndel.org> --- src/kirigamiplugin.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/kirigamiplugin.cpp b/src/kirigamiplugin.cpp index fc530b3..83b4dc2 100644 --- a/src/kirigamiplugin.cpp +++ b/src/kirigamiplugin.cpp @@ -43,10 +43,6 @@ QString KirigamiPlugin::componentPath(const QString &fileName) const void KirigamiPlugin::registerTypes(const char *uri) { -#ifdef KIRIGAMI_BUILD_TYPE_STATIC - Q_INIT_RESOURCE(kirigami); -#endif - Q_ASSERT(uri == QLatin1String("org.kde.kirigami")); const QString style = QString::fromLatin1(qgetenv("QT_QUICK_CONTROLS_STYLE")); -- 2.7.4 (Apple Git-66)
>From 6fcefdfd9cc8c44dda9334a84a5f35da23d62adf Mon Sep 17 00:00:00 2001 From: Dirk Hohndel <d...@hohndel.org> Date: Mon, 15 Aug 2016 19:15:36 -0700 Subject: [PATCH 3/4] Don't exit the app on iOS. iOS users perceive that as "the app has crashed" Signed-off-by: Dirk Hohndel <d...@hohndel.org> --- src/controls/ApplicationWindow.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controls/ApplicationWindow.qml b/src/controls/ApplicationWindow.qml index 5060214..2526453 100644 --- a/src/controls/ApplicationWindow.qml +++ b/src/controls/ApplicationWindow.qml @@ -145,7 +145,7 @@ AbstractApplicationWindow { } } - if (Settings.isMobile && !backEvent.accepted) { + if (Settings.isMobile && !backEvent.accepted && Qt.platform.os !== "ios") { Qt.quit(); } } -- 2.7.4 (Apple Git-66)
>From 555b0062b777e9120fb749ecde5a81c85156be6b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel <d...@hohndel.org> Date: Mon, 15 Aug 2016 19:58:12 -0700 Subject: [PATCH 4/4] 20 gridUnits is too narrow Signed-off-by: Dirk Hohndel <d...@hohndel.org> --- src/controls/templates/private/PageRow.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controls/templates/private/PageRow.qml b/src/controls/templates/private/PageRow.qml index 00e25d6..2b154e7 100644 --- a/src/controls/templates/private/PageRow.qml +++ b/src/controls/templates/private/PageRow.qml @@ -61,7 +61,7 @@ Item { * Pages can override it with their Layout.fillWidth, * implicitWidth Layout.minimumWidth etc. */ - property int defaultColumnWidth: Units.gridUnit * 20 + property int defaultColumnWidth: Units.gridUnit * 30 /** * interactive: bool -- 2.7.4 (Apple Git-66)