2019-10-12 17:43:59 +00:00
|
|
|
diff -rwu ../kirigami/src/controls/GlobalDrawer.qml ./src/controls/GlobalDrawer.qml
|
2019-10-08 19:22:52 +00:00
|
|
|
--- ../kirigami/src/controls/GlobalDrawer.qml 2019-10-10 17:13:41.384333413 -0700
|
2019-10-12 17:43:59 +00:00
|
|
|
+++ ./src/controls/GlobalDrawer.qml 2019-10-11 19:44:58.988220651 -0700
|
2019-10-09 17:17:02 +00:00
|
|
|
@@ -215,6 +215,20 @@
|
|
|
|
readonly property Action currentSubMenu: stackView.currentItem ? stackView.currentItem.current: null
|
|
|
|
|
|
|
|
/**
|
|
|
|
+ * scrollViewItem: ScrollView
|
|
|
|
+ *
|
|
|
|
+ * Points to the internal ScrollView so the caller can implement the Back button
|
|
|
|
+ */
|
|
|
|
+ readonly property Item scrollViewItem: scrollView
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * pop: function
|
|
|
|
+ *
|
|
|
|
+ * Point to the pop function of the stackView inside the scrollView in order to be able to implement the Back button in the caller
|
|
|
|
+ */
|
|
|
|
+ function pop() { scrollView.pop }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
* Notifies that the banner has been clicked
|
|
|
|
*/
|
|
|
|
signal bannerClicked()
|
|
|
|
@@ -238,6 +252,7 @@
|
|
|
|
anchors.fill: parent
|
|
|
|
implicitWidth: Math.min (Units.gridUnit * 20, root.parent.width * 0.8)
|
|
|
|
horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff
|
2019-10-12 17:43:59 +00:00
|
|
|
+ function pop() { stackView.pop() }
|
2019-10-09 17:17:02 +00:00
|
|
|
|
|
|
|
Flickable {
|
|
|
|
id: mainFlickable
|
|
|
|
@@ -331,17 +346,13 @@
|
2018-09-30 18:59:32 +00:00
|
|
|
ColumnLayout {
|
2018-06-16 20:59:02 +00:00
|
|
|
id: topContent
|
|
|
|
spacing: 0
|
|
|
|
- Layout.alignment: Qt.AlignHCenter
|
|
|
|
- Layout.leftMargin: root.leftPadding
|
|
|
|
- Layout.rightMargin: root.rightPadding
|
|
|
|
Layout.bottomMargin: Units.smallSpacing
|
|
|
|
- Layout.topMargin: root.topPadding
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
2018-09-30 18:59:32 +00:00
|
|
|
Layout.preferredHeight: implicitHeight * opacity
|
2018-06-16 20:59:02 +00:00
|
|
|
//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
|
2019-10-12 17:43:59 +00:00
|
|
|
+ Layout.minimumWidth: parent.width
|
2018-09-30 18:59:32 +00:00
|
|
|
visible: children.length > 0 && childrenRect.height > 0 && opacity > 0
|
|
|
|
opacity: !root.collapsed || showTopContentWhenCollapsed
|
|
|
|
Behavior on opacity {
|
2019-10-09 17:17:02 +00:00
|
|
|
@@ -435,7 +446,7 @@
|
|
|
|
easing.type: Easing.InOutQuad
|
|
|
|
}
|
|
|
|
}
|
|
|
|
-
|
|
|
|
+/*
|
|
|
|
BasicListItem {
|
|
|
|
id: backItem
|
|
|
|
visible: level > 0
|
2019-10-08 19:22:52 +00:00
|
|
|
@@ -454,7 +465,7 @@
|
2019-10-09 17:17:02 +00:00
|
|
|
sequence: backItem.MnemonicData.sequence
|
|
|
|
onActivated: backItem.clicked()
|
|
|
|
}
|
|
|
|
-
|
|
|
|
+*/
|
|
|
|
Repeater {
|
|
|
|
id: actionsRepeater
|
|
|
|
model: root.actions
|
2019-10-12 17:43:59 +00:00
|
|
|
diff -rwu ../kirigami/src/controls/private/GlobalDrawerActionItem.qml ./src/controls/private/GlobalDrawerActionItem.qml
|
2019-10-08 19:22:52 +00:00
|
|
|
--- ../kirigami/src/controls/private/GlobalDrawerActionItem.qml 2019-10-10 17:13:41.387666766 -0700
|
2019-10-12 17:43:59 +00:00
|
|
|
+++ ./src/controls/private/GlobalDrawerActionItem.qml 2019-10-11 19:44:58.988220651 -0700
|
2019-10-08 19:22:52 +00:00
|
|
|
@@ -94,7 +94,7 @@
|
|
|
|
Layout.preferredHeight: !root.collapsed ? Units.iconSizes.smallMedium : Units.iconSizes.small/2
|
|
|
|
selected: listItem.checked || listItem.pressed
|
|
|
|
Layout.preferredWidth: Layout.preferredHeight
|
|
|
|
- source: (LayoutMirroring.enabled ? "go-next-symbolic-rtl" : "go-next-symbolic")
|
2019-10-12 17:43:59 +00:00
|
|
|
+ source: (LayoutMirroring.enabled ? ":/go-next-symbolic-rtl" : ":/go-next-symbolic")
|
2019-10-08 19:22:52 +00:00
|
|
|
visible: (!isExpandible || root.collapsed) && !listItem.isSeparator && modelData.hasOwnProperty("children") && modelData.children!==undefined && modelData.children.length > 0
|
|
|
|
}
|
|
|
|
data: [
|
2019-10-12 17:43:59 +00:00
|
|
|
diff -rwu ../kirigami/src/controls/private/globaltoolbar/BreadcrumbControl.qml ./src/controls/private/globaltoolbar/BreadcrumbControl.qml
|
|
|
|
--- ../kirigami/src/controls/private/globaltoolbar/BreadcrumbControl.qml 2019-10-10 17:13:41.391000120 -0700
|
|
|
|
+++ ./src/controls/private/globaltoolbar/BreadcrumbControl.qml 2019-10-11 22:59:45.248031517 -0700
|
|
|
|
@@ -82,7 +81,7 @@
|
|
|
|
Kirigami.Heading {
|
|
|
|
Layout.leftMargin: Kirigami.Units.largeSpacing
|
|
|
|
font.pointSize: -1
|
|
|
|
- font.pixelSize: Math.max(1, mainLayout.height * 0.6)
|
|
|
|
+ font.pixelSize: Math.max(1, Kirigami.Units.defaultFontSize)
|
|
|
|
color: Kirigami.Theme.textColor
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
wrapMode: Text.NoWrap
|
|
|
|
diff -rwu ../kirigami/src/controls/private/globaltoolbar/PageRowGlobalToolBarUI.qml ./src/controls/private/globaltoolbar/PageRowGlobalToolBarUI.qml
|
2019-10-08 19:22:52 +00:00
|
|
|
--- ../kirigami/src/controls/private/globaltoolbar/PageRowGlobalToolBarUI.qml 2019-10-10 17:13:41.391000120 -0700
|
2019-10-12 17:43:59 +00:00
|
|
|
+++ ./src/controls/private/globaltoolbar/PageRowGlobalToolBarUI.qml 2019-10-12 10:36:39.396460010 -0700
|
|
|
|
@@ -36,15 +36,23 @@
|
|
|
|
readonly property Item currentItem: layerIsMainRow ? root.currentItem : root.layers.currentItem
|
|
|
|
|
|
|
|
height: visible ? implicitHeight : 0
|
|
|
|
+
|
|
|
|
minimumHeight: globalToolBar.minimumHeight
|
2019-10-08 17:06:02 +00:00
|
|
|
preferredHeight: globalToolBar.preferredHeight
|
|
|
|
maximumHeight: globalToolBar.maximumHeight
|
|
|
|
separatorVisible: globalToolBar.separatorVisible
|
|
|
|
+ background: Rectangle { color: subsurfaceTheme.primaryColor }
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
anchors.fill: parent
|
2019-10-12 17:43:59 +00:00
|
|
|
spacing: 0
|
|
|
|
-
|
|
|
|
+ // I can't make the layout work without this invisible rectangle to anchor things on
|
|
|
|
+ Rectangle {
|
|
|
|
+ id: correct
|
|
|
|
+ height: parent.height
|
|
|
|
+ width: 0
|
|
|
|
+ color: "transparent"
|
|
|
|
+ }
|
|
|
|
Item {
|
|
|
|
id: leftHandleAnchor
|
|
|
|
visible: (typeof applicationWindow() !== "undefined" && applicationWindow().globalDrawer && applicationWindow().globalDrawer.enabled && applicationWindow().globalDrawer.handleVisible &&
|
|
|
|
@@ -60,20 +68,21 @@
|
|
|
|
RowLayout {
|
|
|
|
id: buttonsLayout
|
|
|
|
Layout.fillHeight: true
|
|
|
|
-
|
|
|
|
Layout.leftMargin: leftHandleAnchor.visible ? Kirigami.Units.smallSpacing : 0
|
|
|
|
-
|
|
|
|
+ Layout.alignment: Qt.AlignTop | Qt.AlignVCenter
|
|
|
|
visible: (globalToolBar.showNavigationButtons != Kirigami.ApplicationHeaderStyle.NoNavigationButtons || root.layers.depth > 1) && (globalToolBar.actualStyle != Kirigami.ApplicationHeaderStyle.None)
|
|
|
|
|
|
|
|
Layout.maximumWidth: visibleChildren.length > 0 ? implicitWidth : 0
|
|
|
|
-
|
|
|
|
TemplatesPrivate.BackButton {
|
|
|
|
id: backButton
|
|
|
|
Layout.leftMargin: leftHandleAnchor.visible ? 0 : Kirigami.Units.smallSpacing
|
|
|
|
Layout.preferredWidth: height
|
|
|
|
+ Layout.topMargin: 0
|
|
|
|
+ Layout.maximumHeight: correct.height
|
|
|
|
}
|
|
|
|
TemplatesPrivate.ForwardButton {
|
|
|
|
Layout.preferredWidth: height
|
|
|
|
+ Layout.maximumHeight: correct.height
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@@ -110,6 +119,6 @@
|
2019-10-08 17:06:02 +00:00
|
|
|
Layout.preferredWidth: height
|
|
|
|
}
|
|
|
|
}
|
|
|
|
- background.opacity: breadcrumbLoader.opacity
|
|
|
|
+ //background.opacity: breadcrumbLoader.opacity
|
|
|
|
}
|
|
|
|
|
2019-10-12 17:43:59 +00:00
|
|
|
diff -rwu ../kirigami/src/controls/templates/private/BackButton.qml ./src/controls/templates/private/BackButton.qml
|
2019-10-08 19:22:52 +00:00
|
|
|
--- ../kirigami/src/controls/templates/private/BackButton.qml 2019-10-10 17:13:41.391000120 -0700
|
2019-10-12 17:43:59 +00:00
|
|
|
+++ ./src/controls/templates/private/BackButton.qml 2019-10-12 10:32:00.517728443 -0700
|
2019-10-08 19:24:47 +00:00
|
|
|
@@ -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))
|
|
|
|
|
2019-10-12 17:43:59 +00:00
|
|
|
diff -rwu ../kirigami/src/controls/templates/private/ForwardButton.qml ./src/controls/templates/private/ForwardButton.qml
|
2019-10-08 19:22:52 +00:00
|
|
|
--- ../kirigami/src/controls/templates/private/ForwardButton.qml 2019-10-10 17:13:41.391000120 -0700
|
2019-10-12 17:43:59 +00:00
|
|
|
+++ ./src/controls/templates/private/ForwardButton.qml 2019-10-11 19:44:58.988220651 -0700
|
2019-10-08 19:24:47 +00:00
|
|
|
@@ -27,6 +27,7 @@
|
|
|
|
id: button
|
2019-10-08 19:22:52 +00:00
|
|
|
|
2019-10-08 19:24:47 +00:00
|
|
|
icon.name: (LayoutMirroring.enabled ? "go-next-symbolic-rtl" : "go-next-symbolic")
|
|
|
|
+ icon.source: (LayoutMirroring.enabled ? "go-next-symbolic-rtl" : "go-next-symbolic")
|
2019-10-08 19:22:52 +00:00
|
|
|
|
2019-10-08 19:24:47 +00:00
|
|
|
enabled: applicationWindow().pageStack.currentIndex < applicationWindow().pageStack.depth-1
|
2019-10-08 19:22:52 +00:00
|
|
|
|
2019-10-12 17:43:59 +00:00
|
|
|
diff -rwu ../kirigami/src/controls/Units.qml ./src/controls/Units.qml
|
|
|
|
--- ../kirigami/src/controls/Units.qml 2019-10-10 17:13:41.387666766 -0700
|
|
|
|
+++ ./src/controls/Units.qml 2019-10-11 20:48:07.216139938 -0700
|
|
|
|
@@ -113,6 +113,11 @@
|
|
|
|
readonly property int wheelScrollLines: 3
|
|
|
|
|
|
|
|
/**
|
|
|
|
+ * Use this to hardcode the font size of the global toolbar that Kirigami gets wrong
|
|
|
|
+ */
|
|
|
|
+ property double defaultFontSize: fontMetrics.font.pixelSize
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
* metrics used by the default font
|
|
|
|
*/
|
|
|
|
property variant fontMetrics: TextMetrics {
|
|
|
|
diff -rwu ../kirigami/src/kirigamiplugin.cpp ./src/kirigamiplugin.cpp
|
2019-10-08 19:22:52 +00:00
|
|
|
--- ../kirigami/src/kirigamiplugin.cpp 2019-10-10 17:13:41.391000120 -0700
|
2019-10-12 17:43:59 +00:00
|
|
|
+++ ./src/kirigamiplugin.cpp 2019-10-11 19:44:58.991554017 -0700
|
2019-10-08 17:06:02 +00:00
|
|
|
@@ -41,7 +41,7 @@
|
|
|
|
|
|
|
|
//Q_INIT_RESOURCE(kirigami);
|
|
|
|
#ifdef KIRIGAMI_BUILD_TYPE_STATIC
|
|
|
|
-#include <qrc_kirigami.cpp>
|
|
|
|
+//#include <qrc_kirigami.cpp>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
QUrl KirigamiPlugin::componentUrl(const QString &fileName) const
|
2019-10-27 21:17:48 +00:00
|
|
|
diff -rwu ../kirigami/src/controls/private/ActionButton.qml ./src/controls/private/ActionButton.qml
|
|
|
|
--- ../kirigami/src/controls/private/ActionButton.qml 2019-10-11 14:00:51.783839545 -0400
|
|
|
|
+++ ./src/controls/private/ActionButton.qml 2019-10-27 17:12:04.339302719 -0400
|
2020-03-27 18:06:26 +00:00
|
|
|
@@ -70,12 +70,12 @@
|
2019-10-27 21:17:48 +00:00
|
|
|
|
|
|
|
anchors.bottom: edgeMouseArea.bottom
|
|
|
|
|
|
|
|
- implicitWidth: implicitHeight + Units.iconSizes.smallMedium*2 + Units.gridUnit
|
2020-03-27 18:06:26 +00:00
|
|
|
+ implicitWidth: implicitHeight + Units.iconSizes.smallMedium*4 + Units.gridUnit
|
2019-10-27 21:17:48 +00:00
|
|
|
implicitHeight: Units.iconSizes.medium + Units.largeSpacing * 2
|
|
|
|
|
|
|
|
|
2020-03-27 18:06:26 +00:00
|
|
|
onXChanged: {
|
|
|
|
- if (mouseArea.pressed || edgeMouseArea.pressed || fakeContextMenuButton.pressed) {
|
|
|
|
+ if (0 && (mouseArea.pressed || edgeMouseArea.pressed || fakeContextMenuButton.pressed)) {
|
|
|
|
if (root.hasGlobalDrawer && globalDrawer.enabled && globalDrawer.modal) {
|
|
|
|
globalDrawer.peeking = true;
|
|
|
|
globalDrawer.visible = true;
|
|
|
|
@@ -97,13 +97,13 @@
|
|
|
|
property bool internalVisibility: (!root.hasApplicationWindow || (applicationWindow().controlsVisible && applicationWindow().height > root.height*2)) && (root.action === null || root.action.visible === undefined || root.action.visible)
|
|
|
|
preventStealing: true
|
|
|
|
|
|
|
|
- drag {
|
|
|
|
- target: button
|
|
|
|
- //filterChildren: true
|
|
|
|
- axis: Drag.XAxis
|
|
|
|
- minimumX: root.hasContextDrawer && contextDrawer.enabled && contextDrawer.modal ? 0 : root.width/2 - button.width/2
|
|
|
|
- maximumX: root.hasGlobalDrawer && globalDrawer.enabled && globalDrawer.modal ? root.width : root.width/2 - button.width/2
|
|
|
|
- }
|
|
|
|
+// drag {
|
|
|
|
+// target: button
|
|
|
|
+// //filterChildren: true
|
|
|
|
+// axis: Drag.XAxis
|
|
|
|
+// minimumX: root.hasContextDrawer && contextDrawer.enabled && contextDrawer.modal ? 0 : root.width/2 - button.width/2
|
|
|
|
+// maximumX: root.hasGlobalDrawer && globalDrawer.enabled && globalDrawer.modal ? root.width : root.width/2 - button.width/2
|
|
|
|
+// }
|
|
|
|
|
|
|
|
property var downTimestamp;
|
|
|
|
property int startX
|
|
|
|
@@ -147,24 +147,24 @@
|
|
|
|
drawerShowAdjust = 0;
|
|
|
|
|
|
|
|
//project where it would be a full second in the future
|
|
|
|
- if (root.hasContextDrawer && root.hasGlobalDrawer && globalDrawer.modal && x + speed > Math.min(root.width/4*3, root.width/2 + globalDrawer.contentItem.width/2)) {
|
|
|
|
- globalDrawer.open();
|
|
|
|
- contextDrawer.close();
|
|
|
|
- } else if (root.hasContextDrawer && x + speed < Math.max(root.width/4, root.width/2 - contextDrawer.contentItem.width/2)) {
|
|
|
|
- if (root.hasContextDrawer && contextDrawer.modal) {
|
|
|
|
- contextDrawer.open();
|
|
|
|
- }
|
|
|
|
- if (root.hasGlobalDrawer && globalDrawer.modal) {
|
|
|
|
- globalDrawer.close();
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- if (root.hasGlobalDrawer && globalDrawer.modal) {
|
|
|
|
- globalDrawer.close();
|
|
|
|
- }
|
|
|
|
- if (root.hasContextDrawer && contextDrawer.modal) {
|
|
|
|
- contextDrawer.close();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
+// if (root.hasContextDrawer && root.hasGlobalDrawer && globalDrawer.modal && x + speed > Math.min(root.width/4*3, root.width/2 + globalDrawer.contentItem.width/2)) {
|
|
|
|
+// globalDrawer.open();
|
|
|
|
+// contextDrawer.close();
|
|
|
|
+// } else if (root.hasContextDrawer && x + speed < Math.max(root.width/4, root.width/2 - contextDrawer.contentItem.width/2)) {
|
|
|
|
+// if (root.hasContextDrawer && contextDrawer.modal) {
|
|
|
|
+// contextDrawer.open();
|
|
|
|
+// }
|
|
|
|
+// if (root.hasGlobalDrawer && globalDrawer.modal) {
|
|
|
|
+// globalDrawer.close();
|
|
|
|
+// }
|
|
|
|
+// } else {
|
|
|
|
+// if (root.hasGlobalDrawer && globalDrawer.modal) {
|
|
|
|
+// globalDrawer.close();
|
|
|
|
+// }
|
|
|
|
+// if (root.hasContextDrawer && contextDrawer.modal) {
|
|
|
|
+// contextDrawer.close();
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
//Don't rely on native onClicked, but fake it here:
|
|
|
|
//Qt.startDragDistance is not adapted to devices dpi in case
|
|
|
|
//of Android, so consider the button "clicked" when:
|
|
|
|
@@ -201,10 +201,10 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- onPositionChanged: {
|
|
|
|
- drawerShowAdjust = Math.min(0.3, Math.max(0, (startMouseY - mouse.y)/(Units.gridUnit*15)));
|
|
|
|
- button.xChanged();
|
|
|
|
- }
|
|
|
|
+// onPositionChanged: {
|
|
|
|
+// drawerShowAdjust = Math.min(0.3, Math.max(0, (startMouseY - mouse.y)/(Units.gridUnit*15)));
|
|
|
|
+// button.xChanged();
|
|
|
|
+// }
|
|
|
|
onPressAndHold: {
|
|
|
|
if (!actionUnderMouse) {
|
|
|
|
return;
|
2019-10-27 21:53:34 +00:00
|
|
|
@@ -291,7 +291,7 @@
|
|
|
|
bottomMargin: Units.smallSpacing
|
|
|
|
}
|
|
|
|
enabled: root.leftAction && root.leftAction.enabled
|
|
|
|
- radius: Units.devicePixelRatio*2
|
|
|
|
+ radius: Units.devicePixelRatio*4
|
|
|
|
height: Units.iconSizes.smallMedium + Units.smallSpacing * 2
|
|
|
|
width: height + (root.action ? Units.gridUnit*2 : 0)
|
|
|
|
visible: root.leftAction
|
|
|
|
@@ -326,6 +326,17 @@
|
|
|
|
margins: Units.smallSpacing * 2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
+ Rectangle {
|
|
|
|
+ anchors.left: parent.left
|
|
|
|
+ anchors.leftMargin: Units.smallSpacing
|
|
|
|
+ anchors.verticalCenter: parent.verticalCenter
|
|
|
|
+ width: Units.iconSizes.smallMedium + Units.smallSpacing * 2
|
|
|
|
+ height: width
|
|
|
|
+ radius: width / 2
|
|
|
|
+ color: "transparent"
|
|
|
|
+ border.color: Qt.lighter(buttonGraphics.baseColor, 1.1)
|
|
|
|
+ border.width: 0.5
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
//right button
|
|
|
|
Rectangle {
|
|
|
|
@@ -372,6 +383,17 @@
|
|
|
|
margins: Units.smallSpacing * 2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
+ Rectangle {
|
|
|
|
+ anchors.right: parent.right
|
|
|
|
+ anchors.rightMargin: Units.smallSpacing
|
|
|
|
+ anchors.verticalCenter: parent.verticalCenter
|
|
|
|
+ width: Units.iconSizes.smallMedium + Units.smallSpacing * 2
|
|
|
|
+ height: width
|
|
|
|
+ radius: width / 2
|
|
|
|
+ color: "transparent"
|
|
|
|
+ border.color: Qt.lighter(buttonGraphics.baseColor, 1.1)
|
|
|
|
+ border.width: 0.5
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|