Files
KDDockWidgets/src/private/quick/qml/ResizeHandlerHelper.qml
Sergio Martins 017f06dcfb qtquick|MDI: Improvements for the resize handler
More margin, fixed sizes of some handlers and fixed z order
2021-03-03 13:47:14 +00:00

36 lines
1015 B
QML

/*
This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Sérgio Martins <sergio.martins@kdab.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
Contact KDAB at <info@kdab.com> for commercial licensing options.
*/
import QtQuick 2.9
import QtQuick.Controls 2.9
import QtQuick.Layouts 1.9
MouseArea {
id: root
required property int resizeMargin
required property int shape
required property bool resizeAllowed
required property QtObject frameCpp
hoverEnabled: true
cursorShape: enabled ? shape : Qt.ArrowCursor // Even if disabled the MouseArea changes cursor, as it's different than Item.enabled, so explicitly change cursor if disabled
enabled: resizeAllowed
onFrameCppChanged: {
if (frameCpp) {
// When Frame is in MDI mode, we need to detect when the mouse over the edges
frameCpp.redirectMouseEvents(this)
}
}
}