blob: bae630a4db9d8156038850caa99135a1172f1f52 (
plain)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import Style 1.0
import com.nextcloud.desktopclient 1.0 as NC
RowLayout {
id: layout
property alias model: syncStatus
spacing: Style.trayHorizontalMargin
NC.SyncStatusSummary {
id: syncStatus
}
NCBusyIndicator {
id: syncIcon
property int size: Style.trayListItemIconSize * 0.6
property int whiteSpace: (Style.trayListItemIconSize - size)
Layout.preferredWidth: size
Layout.preferredHeight: size
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
Layout.topMargin: 16
Layout.rightMargin: whiteSpace * (0.5 + Style.thumbnailImageSizeReduction)
Layout.bottomMargin: 16
Layout.leftMargin: Style.trayHorizontalMargin + (whiteSpace * (0.5 - Style.thumbnailImageSizeReduction))
padding: 0
imageSource: syncStatus.syncIcon
running: syncStatus.syncing
}
ColumnLayout {
id: syncProgressLayout
Layout.alignment: Qt.AlignVCenter
Layout.topMargin: 8
Layout.rightMargin: Style.trayHorizontalMargin
Layout.bottomMargin: 8
Layout.fillWidth: true
Layout.fillHeight: true
Text {
id: syncProgressText
Layout.fillWidth: true
text: syncStatus.syncStatusString
verticalAlignment: Text.AlignVCenter
font.pixelSize: Style.topLinePixelSize
font.bold: true
color: Style.ncTextColor
}
Loader {
Layout.fillWidth: true
active: syncStatus.syncing
visible: syncStatus.syncing
sourceComponent: ProgressBar {
id: syncProgressBar
value: syncStatus.syncProgress
}
}
Text {
id: syncProgressDetailText
Layout.fillWidth: true
text: syncStatus.syncStatusDetailString
visible: syncStatus.syncStatusDetailString !== ""
color: Style.ncSecondaryTextColor
font.pixelSize: Style.subLinePixelSize
}
}
}
|