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 +++++++++++++----- resources/qml/components/AdaptiveLayoutElement.qml | 4 ++-- 2 files changed, 15 insertions(+), 7 deletions(-) (limited to 'resources/qml/components') 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 } } diff --git a/resources/qml/components/AdaptiveLayoutElement.qml b/resources/qml/components/AdaptiveLayoutElement.qml index 411f6c64..3922e27d 100644 --- a/resources/qml/components/AdaptiveLayoutElement.qml +++ b/resources/qml/components/AdaptiveLayoutElement.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 Item { -- cgit 1.5.1