diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2019-10-08 14:24:47 -0500 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-10-13 11:32:27 -0700 |
commit | e91a8ff7f95c117623a4657b82811590bf48e0b1 (patch) | |
tree | f7349da22a2592498143cf477b000683d8d88ee1 /scripts | |
parent | 26a7cf1698c61e53be59ee91f5b3e3c814556571 (diff) | |
download | subsurface-e91a8ff7f95c117623a4657b82811590bf48e0b1.tar.gz |
Mobile: hack around missing icons in the toolbar
This looks extremely fishy to me, but it does seem sufficient to
get the forward and backward buttons to show up in the toolbar.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/kirigami.diff | 28 | ||||
-rwxr-xr-x | scripts/mobilecomponents.sh | 6 |
2 files changed, 30 insertions, 4 deletions
diff --git a/scripts/kirigami.diff b/scripts/kirigami.diff index b0fb01ad6..d5760049e 100644 --- a/scripts/kirigami.diff +++ b/scripts/kirigami.diff @@ -1,6 +1,6 @@ diff -rwu ../kirigami/src/controls/GlobalDrawer.qml mobile-widgets/qml/kirigami/src/controls/GlobalDrawer.qml ---- ../kirigami/src/controls/GlobalDrawer.qml 2019-10-05 11:32:27.131891061 -0500 -+++ src/controls/GlobalDrawer.qml 2019-10-06 13:14:34.830804840 -0500 +--- ../kirigami/src/controls/GlobalDrawer.qml 2019-10-08 13:21:17.459065272 -0500 ++++ src/controls/GlobalDrawer.qml 2019-10-08 14:15:17.892762708 -0500 @@ -331,17 +331,13 @@ ColumnLayout { id: topContent @@ -16,7 +16,7 @@ diff -rwu ../kirigami/src/controls/GlobalDrawer.qml mobile-widgets/qml/kirigami/ //NOTE: why this? just Layout.fillWidth: true doesn't seem sufficient //as items are added only after this column creation - Layout.minimumWidth: parent.width - root.leftPadding - root.rightPadding -+ Layout.minimumWidth: parent.width ++ Layout.minimumWidth: parent.width visible: children.length > 0 && childrenRect.height > 0 && opacity > 0 opacity: !root.collapsed || showTopContentWhenCollapsed Behavior on opacity { @@ -39,6 +39,28 @@ diff -rwu ../kirigami/src/controls/private/globaltoolbar/PageRowGlobalToolBarUI. + //background.opacity: breadcrumbLoader.opacity } +diff -rwu ../kirigami/src/controls/templates/private/BackButton.qml mobile-widgets/qml/kirigami/src/controls/templates/private/BackButton.qml +--- ../kirigami/src/controls/templates/private/BackButton.qml 2019-10-05 11:32:27.138557762 -0500 ++++ src/controls/templates/private/BackButton.qml 2019-10-08 14:16:53.677758571 -0500 +@@ -27,6 +27,7 @@ + id: button + + icon.name: (LayoutMirroring.enabled ? "go-previous-symbolic-rtl" : "go-previous-symbolic") ++ icon.source: (LayoutMirroring.enabled ? "go-previous-symbolic-rtl" : "go-previous-symbolic") + + enabled: applicationWindow().pageStack.layers.depth > 1 || (applicationWindow().pageStack.depth > 1 && (applicationWindow().pageStack.currentIndex > 0 || applicationWindow().pageStack.contentItem.contentX > 0)) + +diff -rwu ../kirigami/src/controls/templates/private/ForwardButton.qml mobile-widgets/qml/kirigami/src/controls/templates/private/ForwardButton.qml +--- ../kirigami/src/controls/templates/private/ForwardButton.qml 2019-10-05 11:32:27.138557762 -0500 ++++ src/controls/templates/private/ForwardButton.qml 2019-10-08 14:13:40.804488568 -0500 +@@ -27,6 +27,7 @@ + id: button + + icon.name: (LayoutMirroring.enabled ? "go-next-symbolic-rtl" : "go-next-symbolic") ++ icon.source: (LayoutMirroring.enabled ? "go-next-symbolic-rtl" : "go-next-symbolic") + + enabled: applicationWindow().pageStack.currentIndex < applicationWindow().pageStack.depth-1 + diff -rwu ../kirigami/src/kirigamiplugin.cpp mobile-widgets/qml/kirigami/src/kirigamiplugin.cpp --- ../kirigami/src/kirigamiplugin.cpp 2019-10-05 11:32:27.141891113 -0500 +++ src/kirigamiplugin.cpp 2019-10-05 11:52:30.444777441 -0500 diff --git a/scripts/mobilecomponents.sh b/scripts/mobilecomponents.sh index 9b527fc6b..328d76ea2 100755 --- a/scripts/mobilecomponents.sh +++ b/scripts/mobilecomponents.sh @@ -59,7 +59,7 @@ ln -s $SRC/breeze-icons . # https://bugs.kde.org/show_bug.cgi?id=394204 sed -i -e "s/width: backgroundRect/enabled: root.enabled; width: backgroundRect/g" src/controls/templates/private/PassiveNotification.qml -# three more hacks - as a diff file for simplicity +# four more hacks - as a diff file for simplicity # (1) Do not include the Kirigami resources (on static build). It causes # double defined symbols in our setting. I would like a nicer fix for this # issue, but failed to find one. For example, not adding the resource in @@ -78,6 +78,10 @@ sed -i -e "s/width: backgroundRect/enabled: root.enabled; width: backgroundRe # the theme, but somehow that always gets overwritten with the default # value for 'active' set in qtquickcontrols2.conf +# (4) add a source line mirroring the name line for the forward and +# backward icons in the global tool bar. Otherwise those icons aren't +# found + patch -p0 < $SRC/subsurface/scripts/kirigami.diff popd |