mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 04:28:49 +03:00
96f791daf1
See also: https://daniel.haxx.se/blog/2023/01/08/copyright-without-years/ https://hynek.me/til/copyright-years/
26 lines
714 B
QML
26 lines
714 B
QML
// SPDX-FileCopyrightText: Nheko Contributors
|
|
//
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
import QtQuick 2.12
|
|
import QtQuick.Controls 2.5
|
|
import QtQuick.Layouts 1.12
|
|
|
|
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;
|
|
});
|
|
}
|
|
}
|