RinUI 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- RinUI/__init__.py +4 -4
- RinUI/assets/fonts/FluentSystemIcons-Index.js +5255 -5255
- RinUI/components/Base.qml +78 -78
- RinUI/components/BasicInput/Button.qml +146 -146
- RinUI/components/BasicInput/CheckBox.qml +98 -98
- RinUI/components/BasicInput/ComboBox.qml +159 -159
- RinUI/components/BasicInput/DropDownButton.qml +20 -20
- RinUI/components/BasicInput/Hyperlink.qml +17 -17
- RinUI/components/BasicInput/PillButton.qml +10 -10
- RinUI/components/BasicInput/RadioButton.qml +94 -94
- RinUI/components/BasicInput/RoundButton.qml +26 -26
- RinUI/components/BasicInput/Slider.qml +212 -212
- RinUI/components/BasicInput/Switch.qml +101 -101
- RinUI/components/BasicInput/ToggleButton.qml +10 -10
- RinUI/components/BasicInput/ToolButton.qml +30 -30
- RinUI/components/ContextMenu.qml +183 -183
- RinUI/components/DateAndTime/DatePicker.qml +142 -140
- RinUI/components/DateAndTime/PickerView.qml +223 -223
- RinUI/components/DateAndTime/TimePicker.qml +114 -114
- RinUI/components/DialogsAndFlyouts/Dialog.qml +106 -106
- RinUI/components/DialogsAndFlyouts/DialogButtonBox.qml +47 -47
- RinUI/components/DialogsAndFlyouts/Flyout.qml +87 -87
- RinUI/components/DialogsAndFlyouts/Popup.qml +110 -106
- RinUI/components/FocusIndicator.qml +33 -33
- RinUI/components/IconWidget.qml +52 -52
- RinUI/components/Indicator.qml +89 -89
- RinUI/components/Layout/Expander.qml +159 -159
- RinUI/components/Layout/SettingExpander.qml +66 -66
- RinUI/components/Layout/SettingItem.qml +70 -70
- RinUI/components/ListAndCollections/Clip.qml +21 -21
- RinUI/components/ListAndCollections/Frame.qml +43 -43
- RinUI/components/ListAndCollections/ListView.qml +104 -104
- RinUI/components/ListAndCollections/ListViewDelegate.qml +82 -82
- RinUI/components/ListAndCollections/SettingCard.qml +72 -72
- RinUI/components/ListAndCollections/TableView.qml +81 -81
- RinUI/components/ListAndCollections/TableViewDelegate.qml +88 -88
- RinUI/components/Media/Avatar.qml +82 -82
- RinUI/components/MenusAndToolbars/Menu.qml +150 -150
- RinUI/components/MenusAndToolbars/MenuBar.qml +42 -42
- RinUI/components/MenusAndToolbars/MenuItem.qml +131 -131
- RinUI/components/MenusAndToolbars/MenuItemGroup.qml +43 -43
- RinUI/components/MenusAndToolbars/MenuSeparator.qml +13 -13
- RinUI/components/MenusAndToolbars/TextInputMenu.qml +37 -37
- RinUI/components/MenusAndToolbars/ToolSeparator.qml +16 -16
- RinUI/components/Navigation/ErrorPage.qml +48 -48
- RinUI/components/Navigation/NavigationBar.qml +179 -179
- RinUI/components/Navigation/NavigationItem.qml +193 -193
- RinUI/components/Navigation/NavigationSubItem.qml +103 -103
- RinUI/components/Navigation/NavigationView.qml +228 -227
- RinUI/components/Navigation/Segmented.qml +16 -16
- RinUI/components/Navigation/SegmentedItem.qml +107 -107
- RinUI/components/Navigation/SelectorBar.qml +12 -12
- RinUI/components/Navigation/SelectorBarItem.qml +88 -88
- RinUI/components/ScrollBar.qml +204 -204
- RinUI/components/ScrollView.qml +12 -12
- RinUI/components/Shadow.qml +47 -47
- RinUI/components/StatusAndInfo/InfoBadge.qml +77 -77
- RinUI/components/StatusAndInfo/InfoBar.qml +256 -251
- RinUI/components/StatusAndInfo/ProgressBar.qml +126 -126
- RinUI/components/StatusAndInfo/ProgressRing.qml +149 -0
- RinUI/components/StatusAndInfo/Toast.qml +236 -236
- RinUI/components/StatusAndInfo/ToolTip.qml +93 -93
- RinUI/components/Text/SpinBox.qml +150 -133
- RinUI/components/Text/Text.qml +44 -44
- RinUI/components/Text/TextArea.qml +117 -117
- RinUI/components/Text/TextField.qml +113 -113
- RinUI/components/Text/TextInput.qml +47 -47
- RinUI/components/qmldir +80 -80
- RinUI/core/__init__.py +4 -4
- RinUI/core/config.py +129 -129
- RinUI/core/launcher.py +129 -129
- RinUI/core/theme.py +339 -339
- RinUI/core/translator.py +25 -25
- RinUI/hooks/__init__.py +3 -3
- RinUI/hooks/hook-RinUI.py +3 -3
- RinUI/qmldir +108 -104
- RinUI/themes/Appearance.qml +36 -0
- RinUI/themes/Colors.qml +36 -0
- RinUI/themes/dark.qml +145 -145
- RinUI/themes/light.qml +145 -145
- RinUI/themes/qmldir +9 -6
- RinUI/themes/theme.qml +151 -149
- RinUI/themes/utils.qml +37 -37
- RinUI/utils/Animation.qml +12 -12
- RinUI/utils/FloatLayer.qml +132 -123
- RinUI/utils/FontIconLoader.qml +13 -13
- RinUI/utils/Position.qml +19 -19
- RinUI/utils/Severity.qml +13 -13
- RinUI/utils/Typography.qml +17 -17
- RinUI/utils/qmldir +4 -4
- RinUI/windows/CtrlBtn.qml +118 -118
- RinUI/windows/FluentPage.qml +92 -92
- RinUI/windows/FluentWindow.qml +31 -30
- RinUI/windows/FluentWindowBase.qml +158 -158
- RinUI/windows/TitleBar.qml +135 -135
- RinUI/windows/qmldir +7 -7
- RinUI/windows/window/ApplicationWindow.qml +8 -8
- RinUI/windows/window/Window.qml +118 -118
- {rinui-0.1.0.data → rinui-0.1.1.data}/data/LICENSE +21 -21
- {rinui-0.1.0.data → rinui-0.1.1.data}/data/README.md +100 -100
- {rinui-0.1.0.dist-info → rinui-0.1.1.dist-info}/METADATA +116 -115
- rinui-0.1.1.dist-info/RECORD +112 -0
- {rinui-0.1.0.dist-info → rinui-0.1.1.dist-info}/WHEEL +1 -1
- {rinui-0.1.0.dist-info → rinui-0.1.1.dist-info/licenses}/LICENSE +21 -21
- RinUI/__pycache__/__init__.cpython-38.pyc +0 -0
- RinUI/config/rin_ui.json +0 -8
- RinUI/core/__pycache__/__init__.cpython-38.pyc +0 -0
- RinUI/core/__pycache__/config.cpython-38.pyc +0 -0
- RinUI/core/__pycache__/launcher.cpython-38.pyc +0 -0
- RinUI/core/__pycache__/theme.cpython-38.pyc +0 -0
- RinUI/core/__pycache__/translator.cpython-38.pyc +0 -0
- rinui-0.1.0.dist-info/RECORD +0 -116
- {rinui-0.1.0.dist-info → rinui-0.1.1.dist-info}/entry_points.txt +0 -0
- {rinui-0.1.0.dist-info → rinui-0.1.1.dist-info}/top_level.txt +0 -0
RinUI/components/ScrollBar.qml
CHANGED
@@ -1,204 +1,204 @@
|
|
1
|
-
import QtQuick 2.15
|
2
|
-
import QtQuick.Templates 2.15 // 从Templates导入ScrollBar,否则qt6强制用原生样式……byd我看了大半天
|
3
|
-
import "../themes"
|
4
|
-
import "../components"
|
5
|
-
|
6
|
-
ScrollBar {
|
7
|
-
id: scrollBar
|
8
|
-
|
9
|
-
property int minimumWidth: Theme.currentTheme.appearance.scrollBarMinWidth
|
10
|
-
property int expandWidth: Theme.currentTheme.appearance.scrollBarWidth
|
11
|
-
|
12
|
-
// 宽高
|
13
|
-
implicitWidth: horizontal ? parent.width
|
14
|
-
: (implicitContentWidth + leftPadding + rightPadding)
|
15
|
-
implicitHeight: vertical ? parent.height
|
16
|
-
: (implicitContentHeight + topPadding + bottomPadding)
|
17
|
-
|
18
|
-
// 锚点 //
|
19
|
-
anchors.verticalCenter: vertical ? parent.verticalCenter : undefined
|
20
|
-
anchors.horizontalCenter: horizontal ? parent.horizontalCenter : undefined
|
21
|
-
anchors.right: vertical ? parent.right : undefined
|
22
|
-
anchors.bottom: horizontal ? parent.bottom : undefined
|
23
|
-
|
24
|
-
verticalPadding : vertical ? 15 : 3
|
25
|
-
horizontalPadding : horizontal ? 15 : 3
|
26
|
-
enabled: size < 1.0
|
27
|
-
|
28
|
-
// 控制按钮 / Control Button //
|
29
|
-
ToolButton {
|
30
|
-
background: Item {} // 无背景
|
31
|
-
|
32
|
-
width: 15
|
33
|
-
height: 15
|
34
|
-
size: 8
|
35
|
-
color: Theme.currentTheme.colors.textSecondaryColor
|
36
|
-
icon.name: vertical ? "ic_fluent_triangle_up_20_filled" : "ic_fluent_triangle_left_20_filled"
|
37
|
-
anchors {
|
38
|
-
top: vertical ? parent.top : undefined
|
39
|
-
left: horizontal ? parent.left : undefined
|
40
|
-
horizontalCenter: vertical ? parent.horizontalCenter : undefined
|
41
|
-
verticalCenter: horizontal ? parent.verticalCenter : undefined
|
42
|
-
}
|
43
|
-
onClicked: scrollBar.decrease()
|
44
|
-
|
45
|
-
visible: scrollBar.size < 1.0
|
46
|
-
opacity: background.opacity
|
47
|
-
}
|
48
|
-
|
49
|
-
ToolButton {
|
50
|
-
background: Item {} // 无背景
|
51
|
-
|
52
|
-
width: 15
|
53
|
-
height: 15
|
54
|
-
size: 8
|
55
|
-
color: Theme.currentTheme.colors.textSecondaryColor
|
56
|
-
icon.name: vertical ? "ic_fluent_triangle_down_20_filled" : "ic_fluent_triangle_right_20_filled"
|
57
|
-
anchors {
|
58
|
-
bottom: vertical ? parent.bottom : undefined
|
59
|
-
right: horizontal ? parent.right : undefined
|
60
|
-
horizontalCenter: vertical ? parent.horizontalCenter : undefined
|
61
|
-
verticalCenter: horizontal ? parent.verticalCenter : undefined
|
62
|
-
}
|
63
|
-
onClicked: scrollBar.increase()
|
64
|
-
|
65
|
-
visible: scrollBar.size < 1.0
|
66
|
-
opacity: background.opacity
|
67
|
-
}
|
68
|
-
|
69
|
-
|
70
|
-
// 内容 / Content //
|
71
|
-
contentItem: Item {
|
72
|
-
id: item
|
73
|
-
// collapsed / 收缩状态 //
|
74
|
-
property bool collapsed: (
|
75
|
-
scrollBar.policy === ScrollBar.AlwaysOn || (scrollBar.active)
|
76
|
-
) // 当滚动条处于AlwaysOn状态或处于激活状态且尺寸小于1.0时,则为收缩状态
|
77
|
-
|
78
|
-
// 最小尺寸 / Minimum Size //
|
79
|
-
implicitWidth: scrollBar.interactive ? scrollBar.expandWidth : scrollBar.minimumWidth
|
80
|
-
implicitHeight: scrollBar.interactive ? scrollBar.expandWidth : scrollBar.minimumWidth
|
81
|
-
|
82
|
-
Rectangle{
|
83
|
-
id: bar
|
84
|
-
width: vertical ? scrollBar.minimumWidth : parent.width
|
85
|
-
height: horizontal ? scrollBar.minimumWidth : parent.height
|
86
|
-
color: Theme.currentTheme.colors.controlStrongColor
|
87
|
-
anchors{
|
88
|
-
right: vertical ? parent.right : undefined
|
89
|
-
bottom: horizontal ? parent.bottom : undefined
|
90
|
-
}
|
91
|
-
radius: 9999
|
92
|
-
visible: scrollBar.size < 1.0
|
93
|
-
|
94
|
-
Behavior on color {
|
95
|
-
ColorAnimation {
|
96
|
-
duration: Utils.appearanceSpeed
|
97
|
-
easing.type: Easing.OutCubic
|
98
|
-
}
|
99
|
-
}
|
100
|
-
}
|
101
|
-
|
102
|
-
states: [
|
103
|
-
State{
|
104
|
-
name: "collapsed"
|
105
|
-
when: contentItem.collapsed
|
106
|
-
PropertyChanges {
|
107
|
-
target: bar
|
108
|
-
width: vertical ? scrollBar.expandWidth : parent.width
|
109
|
-
height: horizontal ? scrollBar.expandWidth : parent.height
|
110
|
-
}
|
111
|
-
},
|
112
|
-
State{
|
113
|
-
name: "minimum"
|
114
|
-
when: !contentItem.collapsed
|
115
|
-
PropertyChanges {
|
116
|
-
target: bar
|
117
|
-
width: vertical ? scrollBar.minimumWidth : parent.width
|
118
|
-
height: horizontal ? scrollBar.minimumWidth : parent.height
|
119
|
-
}
|
120
|
-
}
|
121
|
-
]
|
122
|
-
transitions:[
|
123
|
-
Transition {
|
124
|
-
to: "minimum"
|
125
|
-
SequentialAnimation {
|
126
|
-
PauseAnimation { duration: 450 } // 等待时长
|
127
|
-
NumberAnimation {
|
128
|
-
target: bar
|
129
|
-
properties: vertical ? "width" : "height"
|
130
|
-
duration: 167
|
131
|
-
easing.type: Easing.OutCubic
|
132
|
-
}
|
133
|
-
}
|
134
|
-
},
|
135
|
-
Transition {
|
136
|
-
to: "collapsed"
|
137
|
-
SequentialAnimation {
|
138
|
-
PauseAnimation { duration: 150 }
|
139
|
-
NumberAnimation {
|
140
|
-
target: bar
|
141
|
-
properties: vertical ? "width" : "height"
|
142
|
-
duration: 167
|
143
|
-
easing.type: Easing.OutCubic
|
144
|
-
}
|
145
|
-
}
|
146
|
-
}
|
147
|
-
]
|
148
|
-
}
|
149
|
-
// 背景 / Background //
|
150
|
-
background: Rectangle{
|
151
|
-
id: background
|
152
|
-
radius: 5
|
153
|
-
color: Theme.currentTheme.colors.backgroundAcrylicColor
|
154
|
-
opacity: 0
|
155
|
-
visible: scrollBar.size < 1.0
|
156
|
-
|
157
|
-
states: [
|
158
|
-
State{
|
159
|
-
name: "show"
|
160
|
-
when: contentItem.collapsed
|
161
|
-
PropertyChanges {
|
162
|
-
target: background
|
163
|
-
opacity: 1
|
164
|
-
}
|
165
|
-
},
|
166
|
-
State{
|
167
|
-
name: "hide"
|
168
|
-
when: !contentItem.collapsed
|
169
|
-
PropertyChanges {
|
170
|
-
target: background
|
171
|
-
opacity: 0
|
172
|
-
}
|
173
|
-
}
|
174
|
-
]
|
175
|
-
|
176
|
-
// 动画
|
177
|
-
transitions:[
|
178
|
-
Transition {
|
179
|
-
to: "hide"
|
180
|
-
SequentialAnimation {
|
181
|
-
PauseAnimation { duration: 450 } // 等待时长
|
182
|
-
NumberAnimation {
|
183
|
-
target: background
|
184
|
-
properties: "opacity"
|
185
|
-
duration: 167
|
186
|
-
easing.type: Easing.OutCubic
|
187
|
-
}
|
188
|
-
}
|
189
|
-
},
|
190
|
-
Transition {
|
191
|
-
to: "show"
|
192
|
-
SequentialAnimation {
|
193
|
-
PauseAnimation { duration: 150 }
|
194
|
-
NumberAnimation {
|
195
|
-
target: background
|
196
|
-
properties: "opacity"
|
197
|
-
duration: 167
|
198
|
-
easing.type: Easing.OutCubic
|
199
|
-
}
|
200
|
-
}
|
201
|
-
}
|
202
|
-
]
|
203
|
-
}
|
204
|
-
}
|
1
|
+
import QtQuick 2.15
|
2
|
+
import QtQuick.Templates 2.15 // 从Templates导入ScrollBar,否则qt6强制用原生样式……byd我看了大半天
|
3
|
+
import "../themes"
|
4
|
+
import "../components"
|
5
|
+
|
6
|
+
ScrollBar {
|
7
|
+
id: scrollBar
|
8
|
+
|
9
|
+
property int minimumWidth: Theme.currentTheme.appearance.scrollBarMinWidth
|
10
|
+
property int expandWidth: Theme.currentTheme.appearance.scrollBarWidth
|
11
|
+
|
12
|
+
// 宽高
|
13
|
+
implicitWidth: horizontal ? parent.width
|
14
|
+
: (implicitContentWidth + leftPadding + rightPadding)
|
15
|
+
implicitHeight: vertical ? parent.height
|
16
|
+
: (implicitContentHeight + topPadding + bottomPadding)
|
17
|
+
|
18
|
+
// 锚点 //
|
19
|
+
anchors.verticalCenter: vertical ? parent.verticalCenter : undefined
|
20
|
+
anchors.horizontalCenter: horizontal ? parent.horizontalCenter : undefined
|
21
|
+
anchors.right: vertical ? parent.right : undefined
|
22
|
+
anchors.bottom: horizontal ? parent.bottom : undefined
|
23
|
+
|
24
|
+
verticalPadding : vertical ? 15 : 3
|
25
|
+
horizontalPadding : horizontal ? 15 : 3
|
26
|
+
enabled: size < 1.0
|
27
|
+
|
28
|
+
// 控制按钮 / Control Button //
|
29
|
+
ToolButton {
|
30
|
+
background: Item {} // 无背景
|
31
|
+
|
32
|
+
width: 15
|
33
|
+
height: 15
|
34
|
+
size: 8
|
35
|
+
color: Theme.currentTheme.colors.textSecondaryColor
|
36
|
+
icon.name: vertical ? "ic_fluent_triangle_up_20_filled" : "ic_fluent_triangle_left_20_filled"
|
37
|
+
anchors {
|
38
|
+
top: vertical ? parent.top : undefined
|
39
|
+
left: horizontal ? parent.left : undefined
|
40
|
+
horizontalCenter: vertical ? parent.horizontalCenter : undefined
|
41
|
+
verticalCenter: horizontal ? parent.verticalCenter : undefined
|
42
|
+
}
|
43
|
+
onClicked: scrollBar.decrease()
|
44
|
+
|
45
|
+
visible: scrollBar.size < 1.0
|
46
|
+
opacity: background.opacity
|
47
|
+
}
|
48
|
+
|
49
|
+
ToolButton {
|
50
|
+
background: Item {} // 无背景
|
51
|
+
|
52
|
+
width: 15
|
53
|
+
height: 15
|
54
|
+
size: 8
|
55
|
+
color: Theme.currentTheme.colors.textSecondaryColor
|
56
|
+
icon.name: vertical ? "ic_fluent_triangle_down_20_filled" : "ic_fluent_triangle_right_20_filled"
|
57
|
+
anchors {
|
58
|
+
bottom: vertical ? parent.bottom : undefined
|
59
|
+
right: horizontal ? parent.right : undefined
|
60
|
+
horizontalCenter: vertical ? parent.horizontalCenter : undefined
|
61
|
+
verticalCenter: horizontal ? parent.verticalCenter : undefined
|
62
|
+
}
|
63
|
+
onClicked: scrollBar.increase()
|
64
|
+
|
65
|
+
visible: scrollBar.size < 1.0
|
66
|
+
opacity: background.opacity
|
67
|
+
}
|
68
|
+
|
69
|
+
|
70
|
+
// 内容 / Content //
|
71
|
+
contentItem: Item {
|
72
|
+
id: item
|
73
|
+
// collapsed / 收缩状态 //
|
74
|
+
property bool collapsed: (
|
75
|
+
scrollBar.policy === ScrollBar.AlwaysOn || (scrollBar.active)
|
76
|
+
) // 当滚动条处于AlwaysOn状态或处于激活状态且尺寸小于1.0时,则为收缩状态
|
77
|
+
|
78
|
+
// 最小尺寸 / Minimum Size //
|
79
|
+
implicitWidth: scrollBar.interactive ? scrollBar.expandWidth : scrollBar.minimumWidth
|
80
|
+
implicitHeight: scrollBar.interactive ? scrollBar.expandWidth : scrollBar.minimumWidth
|
81
|
+
|
82
|
+
Rectangle{
|
83
|
+
id: bar
|
84
|
+
width: vertical ? scrollBar.minimumWidth : parent.width
|
85
|
+
height: horizontal ? scrollBar.minimumWidth : parent.height
|
86
|
+
color: Theme.currentTheme.colors.controlStrongColor
|
87
|
+
anchors{
|
88
|
+
right: vertical ? parent.right : undefined
|
89
|
+
bottom: horizontal ? parent.bottom : undefined
|
90
|
+
}
|
91
|
+
radius: 9999
|
92
|
+
visible: scrollBar.size < 1.0
|
93
|
+
|
94
|
+
Behavior on color {
|
95
|
+
ColorAnimation {
|
96
|
+
duration: Utils.appearanceSpeed
|
97
|
+
easing.type: Easing.OutCubic
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
102
|
+
states: [
|
103
|
+
State{
|
104
|
+
name: "collapsed"
|
105
|
+
when: contentItem.collapsed
|
106
|
+
PropertyChanges {
|
107
|
+
target: bar
|
108
|
+
width: vertical ? scrollBar.expandWidth : parent.width
|
109
|
+
height: horizontal ? scrollBar.expandWidth : parent.height
|
110
|
+
}
|
111
|
+
},
|
112
|
+
State{
|
113
|
+
name: "minimum"
|
114
|
+
when: !contentItem.collapsed
|
115
|
+
PropertyChanges {
|
116
|
+
target: bar
|
117
|
+
width: vertical ? scrollBar.minimumWidth : parent.width
|
118
|
+
height: horizontal ? scrollBar.minimumWidth : parent.height
|
119
|
+
}
|
120
|
+
}
|
121
|
+
]
|
122
|
+
transitions:[
|
123
|
+
Transition {
|
124
|
+
to: "minimum"
|
125
|
+
SequentialAnimation {
|
126
|
+
PauseAnimation { duration: 450 } // 等待时长
|
127
|
+
NumberAnimation {
|
128
|
+
target: bar
|
129
|
+
properties: vertical ? "width" : "height"
|
130
|
+
duration: 167
|
131
|
+
easing.type: Easing.OutCubic
|
132
|
+
}
|
133
|
+
}
|
134
|
+
},
|
135
|
+
Transition {
|
136
|
+
to: "collapsed"
|
137
|
+
SequentialAnimation {
|
138
|
+
PauseAnimation { duration: 150 }
|
139
|
+
NumberAnimation {
|
140
|
+
target: bar
|
141
|
+
properties: vertical ? "width" : "height"
|
142
|
+
duration: 167
|
143
|
+
easing.type: Easing.OutCubic
|
144
|
+
}
|
145
|
+
}
|
146
|
+
}
|
147
|
+
]
|
148
|
+
}
|
149
|
+
// 背景 / Background //
|
150
|
+
background: Rectangle{
|
151
|
+
id: background
|
152
|
+
radius: 5
|
153
|
+
color: Theme.currentTheme.colors.backgroundAcrylicColor
|
154
|
+
opacity: 0
|
155
|
+
visible: scrollBar.size < 1.0
|
156
|
+
|
157
|
+
states: [
|
158
|
+
State{
|
159
|
+
name: "show"
|
160
|
+
when: contentItem.collapsed
|
161
|
+
PropertyChanges {
|
162
|
+
target: background
|
163
|
+
opacity: 1
|
164
|
+
}
|
165
|
+
},
|
166
|
+
State{
|
167
|
+
name: "hide"
|
168
|
+
when: !contentItem.collapsed
|
169
|
+
PropertyChanges {
|
170
|
+
target: background
|
171
|
+
opacity: 0
|
172
|
+
}
|
173
|
+
}
|
174
|
+
]
|
175
|
+
|
176
|
+
// 动画
|
177
|
+
transitions:[
|
178
|
+
Transition {
|
179
|
+
to: "hide"
|
180
|
+
SequentialAnimation {
|
181
|
+
PauseAnimation { duration: 450 } // 等待时长
|
182
|
+
NumberAnimation {
|
183
|
+
target: background
|
184
|
+
properties: "opacity"
|
185
|
+
duration: 167
|
186
|
+
easing.type: Easing.OutCubic
|
187
|
+
}
|
188
|
+
}
|
189
|
+
},
|
190
|
+
Transition {
|
191
|
+
to: "show"
|
192
|
+
SequentialAnimation {
|
193
|
+
PauseAnimation { duration: 150 }
|
194
|
+
NumberAnimation {
|
195
|
+
target: background
|
196
|
+
properties: "opacity"
|
197
|
+
duration: 167
|
198
|
+
easing.type: Easing.OutCubic
|
199
|
+
}
|
200
|
+
}
|
201
|
+
}
|
202
|
+
]
|
203
|
+
}
|
204
|
+
}
|
RinUI/components/ScrollView.qml
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
import QtQuick 2.15
|
2
|
-
import QtQuick.Templates 2.15
|
3
|
-
import "../themes"
|
4
|
-
import "../components"
|
5
|
-
|
6
|
-
ScrollView {
|
7
|
-
ScrollBar.vertical: ScrollBar {
|
8
|
-
policy: ScrollBar.AsNeeded
|
9
|
-
}
|
10
|
-
ScrollBar.horizontal: ScrollBar {
|
11
|
-
policy: ScrollBar.AsNeeded
|
12
|
-
}
|
1
|
+
import QtQuick 2.15
|
2
|
+
import QtQuick.Templates 2.15
|
3
|
+
import "../themes"
|
4
|
+
import "../components"
|
5
|
+
|
6
|
+
ScrollView {
|
7
|
+
ScrollBar.vertical: ScrollBar {
|
8
|
+
policy: ScrollBar.AsNeeded
|
9
|
+
}
|
10
|
+
ScrollBar.horizontal: ScrollBar {
|
11
|
+
policy: ScrollBar.AsNeeded
|
12
|
+
}
|
13
13
|
}
|
RinUI/components/Shadow.qml
CHANGED
@@ -1,48 +1,48 @@
|
|
1
|
-
import QtQuick 2.15
|
2
|
-
import QtQuick.Controls 2.15
|
3
|
-
import Qt5Compat.GraphicalEffects
|
4
|
-
import "../themes"
|
5
|
-
|
6
|
-
DropShadow {
|
7
|
-
property string style: "cardRest" // shadow style
|
8
|
-
|
9
|
-
anchors.fill: source
|
10
|
-
horizontalOffset: 0
|
11
|
-
verticalOffset: Theme.currentTheme.shadows[style].offsetY
|
12
|
-
radius: Theme.currentTheme.shadows[style].blur
|
13
|
-
color: Theme.currentTheme.shadows[style].color
|
14
|
-
samples: 1 + radius * 2
|
15
|
-
// source: sourceItem
|
16
|
-
cached: true
|
17
|
-
}
|
18
|
-
|
19
|
-
// Repeater {
|
20
|
-
// id: shadowRepeater
|
21
|
-
// property string style: "cardRest"
|
22
|
-
// property int blurRadius: Theme.currentTheme.shadows[style].blur
|
23
|
-
// property int offsetY: Theme.currentTheme.shadows[style].offsetY
|
24
|
-
// property real intensity: 1.5 // 阴影强度系数
|
25
|
-
// property real spreadRatio: 1 // 阴影扩散系数
|
26
|
-
// property real controlRadius: 8 // 控制半径
|
27
|
-
// readonly property color shadowColor: Theme.currentTheme.shadows[style].color
|
28
|
-
//
|
29
|
-
// model: Math.max(blurRadius, 16) // 保证最小8层渲染
|
30
|
-
//
|
31
|
-
// Rectangle {
|
32
|
-
// anchors {
|
33
|
-
// fill: parent
|
34
|
-
// margins: -index * spreadRatio // 非线性扩散
|
35
|
-
// topMargin: -index * spreadRatio + (offsetY) // 动态偏移分配
|
36
|
-
// }
|
37
|
-
//
|
38
|
-
// color: "transparent"
|
39
|
-
// radius: controlRadius + (index * spreadRatio) // 优化半径增长曲线
|
40
|
-
// border.width: 1
|
41
|
-
// border.color: shadowColor
|
42
|
-
//
|
43
|
-
// // 非线性透明度衰减
|
44
|
-
// opacity: (0.011 * (count - index + 1)) * shadowRepeater.opacity
|
45
|
-
//
|
46
|
-
// z: -1
|
47
|
-
// }
|
1
|
+
import QtQuick 2.15
|
2
|
+
import QtQuick.Controls 2.15
|
3
|
+
import Qt5Compat.GraphicalEffects
|
4
|
+
import "../themes"
|
5
|
+
|
6
|
+
DropShadow {
|
7
|
+
property string style: "cardRest" // shadow style
|
8
|
+
|
9
|
+
anchors.fill: source
|
10
|
+
horizontalOffset: 0
|
11
|
+
verticalOffset: Theme.currentTheme.shadows[style].offsetY
|
12
|
+
radius: Theme.currentTheme.shadows[style].blur
|
13
|
+
color: Theme.currentTheme.shadows[style].color
|
14
|
+
samples: 1 + radius * 2
|
15
|
+
// source: sourceItem
|
16
|
+
cached: true
|
17
|
+
}
|
18
|
+
|
19
|
+
// Repeater {
|
20
|
+
// id: shadowRepeater
|
21
|
+
// property string style: "cardRest"
|
22
|
+
// property int blurRadius: Theme.currentTheme.shadows[style].blur
|
23
|
+
// property int offsetY: Theme.currentTheme.shadows[style].offsetY
|
24
|
+
// property real intensity: 1.5 // 阴影强度系数
|
25
|
+
// property real spreadRatio: 1 // 阴影扩散系数
|
26
|
+
// property real controlRadius: 8 // 控制半径
|
27
|
+
// readonly property color shadowColor: Theme.currentTheme.shadows[style].color
|
28
|
+
//
|
29
|
+
// model: Math.max(blurRadius, 16) // 保证最小8层渲染
|
30
|
+
//
|
31
|
+
// Rectangle {
|
32
|
+
// anchors {
|
33
|
+
// fill: parent
|
34
|
+
// margins: -index * spreadRatio // 非线性扩散
|
35
|
+
// topMargin: -index * spreadRatio + (offsetY) // 动态偏移分配
|
36
|
+
// }
|
37
|
+
//
|
38
|
+
// color: "transparent"
|
39
|
+
// radius: controlRadius + (index * spreadRatio) // 优化半径增长曲线
|
40
|
+
// border.width: 1
|
41
|
+
// border.color: shadowColor
|
42
|
+
//
|
43
|
+
// // 非线性透明度衰减
|
44
|
+
// opacity: (0.011 * (count - index + 1)) * shadowRepeater.opacity
|
45
|
+
//
|
46
|
+
// z: -1
|
47
|
+
// }
|
48
48
|
// }
|