2023-02-22 01:48:49 +03:00
|
|
|
// SPDX-FileCopyrightText: Nheko Contributors
|
2021-06-06 00:36:08 +03:00
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2023-10-26 02:51:45 +03:00
|
|
|
import QtQuick
|
2021-06-06 00:36:08 +03:00
|
|
|
|
|
|
|
Item {
|
|
|
|
property int minimumWidth: 100
|
|
|
|
property int maximumWidth: 400
|
|
|
|
property int collapsedWidth: 40
|
|
|
|
property bool collapsible: true
|
|
|
|
property bool collapsed: width < minimumWidth
|
|
|
|
property int splitterWidth: 1
|
|
|
|
property int preferredWidth: 100
|
|
|
|
|
|
|
|
Component.onCompleted: {
|
|
|
|
children[0].width = Qt.binding(() => {
|
|
|
|
return parent.singlePageMode ? parent.width : width - splitterWidth;
|
|
|
|
});
|
|
|
|
children[0].height = Qt.binding(() => {
|
|
|
|
return parent.height;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|