From 88039083213a37ad132461429f7122e651874717 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sun, 13 Jun 2021 01:48:11 +0200 Subject: Try to be compatible with Qt 5.12 --- resources/qml/components/AdaptiveLayout.qml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'resources/qml/components/AdaptiveLayout.qml') diff --git a/resources/qml/components/AdaptiveLayout.qml b/resources/qml/components/AdaptiveLayout.qml index eea85e38..1d44ba90 100644 --- a/resources/qml/components/AdaptiveLayout.qml +++ b/resources/qml/components/AdaptiveLayout.qml @@ -2,8 +2,8 @@ // // SPDX-License-Identifier: GPL-3.0-or-later -import QtQuick 2.15 -import QtQuick.Controls 2.15 +import QtQuick 2.12 +import QtQuick.Controls 2.5 import QtQuick.Layouts 1.15 import im.nheko 1.0 @@ -87,6 +87,13 @@ Container { x: parent.preferredWidth z: 3 + CursorShape { + height: parent.height + width: container.splitterGrabMargin * 2 + x: -container.splitterGrabMargin + cursorShape: Qt.SizeHorCursor + } + DragHandler { id: dragHandler @@ -96,9 +103,9 @@ Container { xAxis.minimum: splitter.minimumWidth - 1 xAxis.maximum: splitter.maximumWidth margin: container.splitterGrabMargin - dragThreshold: 0 + //dragThreshold: 0 grabPermissions: PointerHandler.CanTakeOverFromAnything | PointerHandler.ApprovesTakeOverByHandlersOfSameType - cursorShape: Qt.SizeHorCursor + //cursorShape: Qt.SizeHorCursor onActiveChanged: { if (!active) splitter.parent.preferredWidth = splitter.x; @@ -107,9 +114,10 @@ Container { } HoverHandler { + //cursorShape: Qt.SizeHorCursor + enabled: !container.singlePageMode margin: container.splitterGrabMargin - cursorShape: Qt.SizeHorCursor } } -- cgit 1.5.1 From 9fd70c34f90a9ef010091024ae13f9af8d131c61 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sun, 13 Jun 2021 02:48:22 +0200 Subject: Layout 1.15 -> 1.12 --- resources/qml/components/AdaptiveLayout.qml | 2 +- resources/qml/components/AdaptiveLayoutElement.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'resources/qml/components/AdaptiveLayout.qml') diff --git a/resources/qml/components/AdaptiveLayout.qml b/resources/qml/components/AdaptiveLayout.qml index 1d44ba90..357a7831 100644 --- a/resources/qml/components/AdaptiveLayout.qml +++ b/resources/qml/components/AdaptiveLayout.qml @@ -4,7 +4,7 @@ import QtQuick 2.12 import QtQuick.Controls 2.5 -import QtQuick.Layouts 1.15 +import QtQuick.Layouts 1.12 import im.nheko 1.0 Container { diff --git a/resources/qml/components/AdaptiveLayoutElement.qml b/resources/qml/components/AdaptiveLayoutElement.qml index 3922e27d..a4aec72e 100644 --- a/resources/qml/components/AdaptiveLayoutElement.qml +++ b/resources/qml/components/AdaptiveLayoutElement.qml @@ -4,7 +4,7 @@ import QtQuick 2.12 import QtQuick.Controls 2.5 -import QtQuick.Layouts 1.15 +import QtQuick.Layouts 1.12 Item { property int minimumWidth: 100 -- cgit 1.5.1