aboutsummaryrefslogtreecommitdiffstats
path: root/community/koko/0001-fix-sidebar-on-mobile.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/koko/0001-fix-sidebar-on-mobile.patch')
-rw-r--r--community/koko/0001-fix-sidebar-on-mobile.patch435
1 files changed, 0 insertions, 435 deletions
diff --git a/community/koko/0001-fix-sidebar-on-mobile.patch b/community/koko/0001-fix-sidebar-on-mobile.patch
deleted file mode 100644
index dde465a0eb..0000000000
--- a/community/koko/0001-fix-sidebar-on-mobile.patch
+++ /dev/null
@@ -1,435 +0,0 @@
-From 1063588db682f562595a676f7b60d0dcc91d7fca Mon Sep 17 00:00:00 2001
-From: Carl Schwan <carl@carlschwan.eu>
-Date: Wed, 12 May 2021 16:05:39 +0200
-Subject: [PATCH] Fix sidebar on mobile
-
----
- src/qml/Main.qml | 22 +--
- src/qml/Sidebar.qml | 346 ++++++++++++++++++++++----------------------
- 2 files changed, 189 insertions(+), 179 deletions(-)
-
-diff --git a/src/qml/Main.qml b/src/qml/Main.qml
-index 7663f4d..b96b679 100644
---- a/src/qml/Main.qml
-+++ b/src/qml/Main.qml
-@@ -198,16 +198,18 @@ Kirigami.ApplicationWindow {
- }
- albumView.gridViewItem.forceActiveFocus();
- }
-- Kirigami.BasicListItem {
-- text: i18n("Settings")
-- onClicked: root.pageStack.layers.push(settingsPage)
-- icon: "settings-configure"
-- }
-- Kirigami.BasicListItem {
-- text: i18n("About")
-- onClicked: root.pageStack.layers.push(aboutPage)
-- icon: "help-about"
-- }
-+ contentObject: [
-+ Kirigami.BasicListItem {
-+ text: i18n("Settings")
-+ onClicked: root.pageStack.layers.push(settingsPage)
-+ icon: "settings-configure"
-+ },
-+ Kirigami.BasicListItem {
-+ text: i18n("About")
-+ onClicked: root.pageStack.layers.push(aboutPage)
-+ icon: "help-about"
-+ }
-+ ]
- }
-
- Koko.SortModel {
-diff --git a/src/qml/Sidebar.qml b/src/qml/Sidebar.qml
-index d3d0c44..0b19522 100644
---- a/src/qml/Sidebar.qml
-+++ b/src/qml/Sidebar.qml
-@@ -10,14 +10,17 @@ import QtQuick.Controls 2.15 as QQC2
-
- import org.kde.kirigami 2.5 as Kirigami
-
--Kirigami.GlobalDrawer {
-+Kirigami.OverlayDrawer {
- signal filterBy(string value, string query)
- property var currentlySelectedAction
- property var previouslySelectedAction
- property var tags
-+ property alias contentObject: column.children
-
-- // FIXME: Dirty workaround for 385992
-- contentItem.implicitWidth: Kirigami.Units.gridUnit * 14
-+ edge: Qt.application.layoutDirection == Qt.RightToLeft ? Qt.RightEdge : Qt.LeftEdge
-+ handleClosedIcon.source: null
-+ handleOpenIcon.source: null
-+ handleVisible: (modal || !drawerOpen) && (typeof(applicationWindow)===typeof(Function) && applicationWindow() ? applicationWindow().controlsVisible : true)
-
- // Autohiding behavior
- modal: !root.wideScreen
-@@ -29,192 +32,197 @@ Kirigami.GlobalDrawer {
- topPadding: 0
- bottomPadding: 0
-
-- header: Kirigami.AbstractApplicationHeader {
-- topPadding: Kirigami.Units.smallSpacing;
-- bottomPadding: Kirigami.Units.smallSpacing;
-- leftPadding: Kirigami.Units.largeSpacing
-- rightPadding: Kirigami.Units.largeSpacing
-- Kirigami.Heading {
-- level: 1
-- text: i18n("Sort by")
-- }
-- }
--
- // Place
-- QQC2.ScrollView {
-- id: scrollView
-- Layout.topMargin: -Kirigami.Units.smallSpacing;
-- Layout.bottomMargin: -Kirigami.Units.smallSpacing;
-- Layout.fillHeight: true
-- Layout.fillWidth: true
--
-- Accessible.role: Accessible.MenuBar
--
-- component PlaceHeading : Kirigami.Heading {
-- topPadding: Kirigami.Units.largeSpacing
-+ contentItem: ColumnLayout {
-+ id: column
-+ // FIXME: Dirty workaround for 385992
-+ implicitWidth: Kirigami.Units.gridUnit * 14
-+ Kirigami.AbstractApplicationHeader {
-+ topPadding: Kirigami.Units.smallSpacing;
-+ bottomPadding: Kirigami.Units.smallSpacing;
- leftPadding: Kirigami.Units.largeSpacing
-+ rightPadding: Kirigami.Units.largeSpacing
- Layout.fillWidth: true
-- level: 6
-- opacity: 0.7
-+ Kirigami.Heading {
-+ level: 1
-+ text: i18n("Sort by")
-+ }
- }
--
-- component PlaceItem : Kirigami.AbstractListItem {
-- id: item
-- property string icon
-- property string filter
-- property string query
-- checkable: true
-- separatorVisible: false
-+ QQC2.ScrollView {
-+ id: scrollView
-+ Layout.topMargin: -Kirigami.Units.smallSpacing;
-+ Layout.bottomMargin: -Kirigami.Units.smallSpacing;
-+ Layout.fillHeight: true
- Layout.fillWidth: true
-- Keys.onDownPressed: nextItemInFocusChain().forceActiveFocus(Qt.TabFocusReason)
-- Keys.onUpPressed: nextItemInFocusChain(false).forceActiveFocus(Qt.TabFocusReason)
-- Accessible.role: Accessible.MenuItem
-- contentItem: Row {
-- Kirigami.Icon {
-- source: item.icon
-- width: height
-- height: Kirigami.Units.iconSizes.small
-- }
-- QQC2.Label {
-- leftPadding: Kirigami.Units.smallSpacing
-- text: item.text
-+
-+ Accessible.role: Accessible.MenuBar
-+
-+ component PlaceHeading : Kirigami.Heading {
-+ topPadding: Kirigami.Units.largeSpacing
-+ leftPadding: Kirigami.Units.largeSpacing
-+ Layout.fillWidth: true
-+ level: 6
-+ opacity: 0.7
-+ }
-+
-+ component PlaceItem : Kirigami.AbstractListItem {
-+ id: item
-+ property string icon
-+ property string filter
-+ property string query
-+ checkable: true
-+ separatorVisible: false
-+ Layout.fillWidth: true
-+ Keys.onDownPressed: nextItemInFocusChain().forceActiveFocus(Qt.TabFocusReason)
-+ Keys.onUpPressed: nextItemInFocusChain(false).forceActiveFocus(Qt.TabFocusReason)
-+ Accessible.role: Accessible.MenuItem
-+ contentItem: Row {
-+ Kirigami.Icon {
-+ source: item.icon
-+ width: height
-+ height: Kirigami.Units.iconSizes.small
-+ }
-+ QQC2.Label {
-+ leftPadding: Kirigami.Units.smallSpacing
-+ text: item.text
-+ }
-+ }
-+ onClicked: {
-+ currentlySelectedAction = item
-+ filterBy(filter, query)
-+ previouslySelectedAction = item
- }
- }
-- onClicked: {
-- currentlySelectedAction = item
-- filterBy(filter, query)
-- previouslySelectedAction = item
-- }
-- }
-
-- ColumnLayout {
-- spacing: 1
-- width: scrollView.width
-- PlaceHeading {
-- text: i18n("Places")
-- }
-- PlaceItem {
-- id: picturesAction
-- icon: "folder-pictures"
-- text: i18n("Pictures")
-- filter: "Folders"
-- }
-- PlaceItem {
-- text: i18n("Favorites")
-- icon: "starred-symbolic"
-- filter: "Favorites"
-- }
-- Repeater {
-- model: kokoConfig.savedFolders
-+ ColumnLayout {
-+ spacing: 1
-+ width: scrollView.width
-+ PlaceHeading {
-+ text: i18n("Places")
-+ }
- PlaceItem {
-- icon: "folder-symbolic"
-- text: {
-- var str = modelData
-- if (str.endsWith("/")) {
-- str = str.slice(0, -1)
-+ id: picturesAction
-+ icon: "folder-pictures"
-+ text: i18n("Pictures")
-+ filter: "Folders"
-+ }
-+ PlaceItem {
-+ text: i18n("Favorites")
-+ icon: "starred-symbolic"
-+ filter: "Favorites"
-+ }
-+ Repeater {
-+ model: kokoConfig.savedFolders
-+ PlaceItem {
-+ icon: "folder-symbolic"
-+ text: {
-+ var str = modelData
-+ if (str.endsWith("/")) {
-+ str = str.slice(0, -1)
-+ }
-+ return str.split("/")[str.split("/").length-1]
- }
-- return str.split("/")[str.split("/").length-1]
-+ filter: "Folders"
-+ query: modelData
- }
-- filter: "Folders"
-- query: modelData
- }
-- }
-- PlaceItem {
-- icon: "user-trash-symbolic"
-- text: i18n("Trash")
-- filter: "Trash"
-- query: "trash:/"
-- }
-- PlaceHeading {
-- text: i18nc("Remote network locations", "Remote")
-- }
-- PlaceItem {
-- icon: "folder-cloud"
-- text: i18n("Network")
-- filter: "Remote"
-- query: "remote:/"
-- }
-- PlaceHeading {
-- text: i18n("Locations")
-- }
-- PlaceItem {
-- text: i18n("Countries")
-- icon: "tag-places"
-- filter: "Countries"
-- }
-- PlaceItem {
-- text: i18n("States")
-- icon: "tag-places"
-- filter: "States"
-- }
-- PlaceItem {
-- text: i18n("Cities")
-- icon: "tag-places"
-- filter: "Cities"
-- }
-- PlaceHeading {
-- text: i18n("Time")
-- }
-- PlaceItem {
-- text: i18n("Years")
-- icon: "view-calendar"
-- filter: "Years"
-- }
-- PlaceItem {
-- text: i18n("Months")
-- icon: "view-calendar"
-- filter: "Months"
-- }
-- PlaceItem {
-- text: i18n("Weeks")
-- icon: "view-calendar"
-- filter: "Weeks"
-- }
-- PlaceItem {
-- text: i18n("Days")
-- icon: "view-calendar"
-- filter: "Days"
-- }
-- PlaceHeading {
-- text: i18n("Tags")
-- visible: tags.length > 0
-- }
-- Repeater {
-- model: tags
- PlaceItem {
-- icon: "tag"
-- text: modelData
-- filter: "Tags"
-- query: modelData
-+ icon: "user-trash-symbolic"
-+ text: i18n("Trash")
-+ filter: "Trash"
-+ query: "trash:/"
-+ }
-+ PlaceHeading {
-+ text: i18nc("Remote network locations", "Remote")
-+ }
-+ PlaceItem {
-+ icon: "folder-cloud"
-+ text: i18n("Network")
-+ filter: "Remote"
-+ query: "remote:/"
-+ }
-+ PlaceHeading {
-+ text: i18n("Locations")
-+ }
-+ PlaceItem {
-+ text: i18n("Countries")
-+ icon: "tag-places"
-+ filter: "Countries"
-+ }
-+ PlaceItem {
-+ text: i18n("States")
-+ icon: "tag-places"
-+ filter: "States"
-+ }
-+ PlaceItem {
-+ text: i18n("Cities")
-+ icon: "tag-places"
-+ filter: "Cities"
-+ }
-+ PlaceHeading {
-+ text: i18n("Time")
-+ }
-+ PlaceItem {
-+ text: i18n("Years")
-+ icon: "view-calendar"
-+ filter: "Years"
-+ }
-+ PlaceItem {
-+ text: i18n("Months")
-+ icon: "view-calendar"
-+ filter: "Months"
-+ }
-+ PlaceItem {
-+ text: i18n("Weeks")
-+ icon: "view-calendar"
-+ filter: "Weeks"
-+ }
-+ PlaceItem {
-+ text: i18n("Days")
-+ icon: "view-calendar"
-+ filter: "Days"
-+ }
-+ PlaceHeading {
-+ text: i18n("Tags")
-+ visible: tags.length > 0
-+ }
-+ Repeater {
-+ model: tags
-+ PlaceItem {
-+ icon: "tag"
-+ text: modelData
-+ filter: "Tags"
-+ query: modelData
-+ }
- }
- }
- }
-- }
-+ QQC2.ToolSeparator {
-+ Layout.topMargin: -1;
-+ Layout.fillWidth: true
-+ orientation: Qt.Horizontal
-+ visible: scrollView.contentHeight > scrollView.height
-+ }
-
-- QQC2.ToolSeparator {
-- Layout.topMargin: -1;
-- Layout.fillWidth: true
-- orientation: Qt.Horizontal
-- visible: scrollView.contentHeight > scrollView.height
-- }
-+ PlaceHeading {
-+ Layout.topMargin: -Kirigami.Units.smallSpacing;
-+ text: i18n("Thumbnails size:")
-+ }
-
-- PlaceHeading {
-- Layout.topMargin: -Kirigami.Units.smallSpacing;
-- text: i18n("Thumbnails size:")
-+ QQC2.Slider {
-+ QQC2.ToolTip.text: i18n("%1 px", kokoConfig.iconSize)
-+ QQC2.ToolTip.visible: hovered
-+ QQC2.ToolTip.delay: Kirigami.Units.longDuration
-+ Layout.fillWidth: true
-+ Layout.leftMargin: Kirigami.Units.smallSpacing
-+ Layout.rightMargin: Kirigami.Units.smallSpacing
-+ from: Kirigami.Units.gridUnit * 4
-+ to: Kirigami.Units.gridUnit * 8
-+ value: kokoConfig.iconSize
-+ onMoved: kokoConfig.iconSize = value;
-+ }
- }
-
-- QQC2.Slider {
-- QQC2.ToolTip.text: i18n("%1 px", kokoConfig.iconSize)
-- QQC2.ToolTip.visible: hovered
-- QQC2.ToolTip.delay: Kirigami.Units.longDuration
-- Layout.fillWidth: true
-- Layout.leftMargin: Kirigami.Units.smallSpacing
-- Layout.rightMargin: Kirigami.Units.smallSpacing
-- from: Kirigami.Units.gridUnit * 4
-- to: Kirigami.Units.gridUnit * 8
-- value: kokoConfig.iconSize
-- onMoved: kokoConfig.iconSize = value;
-- }
-
- Component.onCompleted: {
- picturesAction.checked = true
---
-GitLab
-