| 1 |
// SPDX-FileCopyrightText: Nheko Contributors |
| 2 |
// |
| 3 |
// SPDX-License-Identifier: GPL-3.0-or-later |
| 4 |
|
| 5 |
import QtQuick |
| 6 |
|
| 7 |
Item { |
| 8 |
property int minimumWidth: 100 |
| 9 |
property int maximumWidth: 400 |
| 10 |
property int collapsedWidth: 40 |
| 11 |
property bool collapsible: true |
| 12 |
property bool collapsed: width < minimumWidth |
| 13 |
property int splitterWidth: 1 |
| 14 |
property int preferredWidth: 100 |
| 15 |
|
| 16 |
Component.onCompleted: { |
| 17 |
children[0].width = Qt.binding(() => { |
| 18 |
return parent.singlePageMode ? parent.width : width - splitterWidth; |
| 19 |
}); |
| 20 |
children[0].height = Qt.binding(() => { |
| 21 |
return parent.height; |
| 22 |
}); |
| 23 |
} |
| 24 |
} |