forked from nuoqian-lgtm/QianWindow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ContentList.qml
67 lines (52 loc) · 1.85 KB
/
ContentList.qml
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
import QtQuick 2.12
import QtQuick.Layouts 1.12
import QtQuick.Controls 2.14
import QtCharts 2.14
import QtQuick.Controls.Material 2.12
import Qt.Singleton 1.0
import QtGraphicalEffects 1.14
import "qrc:/common"
Rectangle {
id: contentList
color: mainColor
RowLayout {
anchors.fill: parent
anchors.rightMargin: 14
anchors.leftMargin: leftSidebar.isOpen ? 14 : 0
anchors.topMargin: 14
anchors.bottomMargin: 14
Behavior on anchors.leftMargin {
NumberAnimation { duration: 100 }
}
spacing: 20
LeftSidebar {
id: leftSidebar
Layout.fillHeight: true
layoutPreferredWidth: skin.gradSupport ? 175 : 198
bckColor: !skin.gradSupport && !skin.imageSupport ? skin.contentBackColor:
!skin.light ? Qt.rgba(0,0,0, 0.7 - setting.skinOpacity * 0.38) : Qt.rgba(1,1,1, 0.20 + setting.skinOpacity * 0.68)
}
Rectangle {
Layout.leftMargin: -leftSidebar.tailWidth
Layout.fillHeight: true
Layout.fillWidth: true
radius: skin.gradSupport || skin.imageSupport ? 14 : 8
color: !skin.gradSupport && !skin.imageSupport ? skin.contentBackColor :
!skin.light ? Qt.rgba(0,0,0, 0.7 - setting.skinOpacity * 0.38) : Qt.rgba(1,1,1, 0.10 + setting.skinOpacity * 0.88)
layer.enabled: skin.shadow
layer.effect: DropShadow {
color: !skin.gradSupport && !skin.imageSupport ? "#36000000" : "#36FFFFFF"
radius: 8
samples: 17
}
PageManager {
id: pages
anchors.fill: parent
}
}
}
Connections {
target: leftSidebar.stretchEntry
onSwitchPage: pages.switchPage(name)
}
}