-
Notifications
You must be signed in to change notification settings - Fork 919
Expand file tree
/
Copy pathFileProviderSettings.qml
More file actions
62 lines (50 loc) · 1.93 KB
/
FileProviderSettings.qml
File metadata and controls
62 lines (50 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: GPL-2.0-or-later
*/
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import Style 1.0
import "../../filedetails"
import "../../tray"
import com.nextcloud.desktopclient 1.0
Page {
id: root
property bool showBorder: false
property var controller: FileProviderSettingsController
property string accountUserIdAtHost: ""
title: qsTr("Virtual files settings")
background: Rectangle {
color: palette.alternateBase
border.width: root.showBorder ? Style.normalBorderWidth : 0
border.color: palette.mid
}
leftPadding: 0
rightPadding: 0
topPadding: 12 // Style.standardSpacing is 10, the QtWidgets layout uses 12. set it here as well to avoid a rough cutoff
bottomPadding: 12
// 1. Tell the Page how tall it actually is
implicitHeight: rootColumn.implicitHeight + topPadding + bottomPadding
ColumnLayout {
id: rootColumn
anchors.left: parent.left
anchors.right: parent.right
spacing: Style.standardSpacing
RowLayout {
Layout.fillWidth: true
EnforcedPlainTextLabel {
Layout.fillWidth: true
horizontalAlignment: Text.AlignLeft
wrapMode: Text.WordWrap
text: qsTr("Virtual files appear like regular files, but they do not use local storage space. The content downloads automatically when you open the file. Virtual files and classic sync can not be used at the same time.")
}
Switch {
id: vfsEnabledCheckBox
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
checked: root.controller.vfsEnabledForAccount(root.accountUserIdAtHost)
onClicked: root.controller.setVfsEnabledForAccount(root.accountUserIdAtHost, checked)
}
}
}
}