RinUI 0.0.11__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.
Files changed (115) hide show
  1. RinUI/__init__.py +4 -4
  2. RinUI/assets/fonts/FluentSystemIcons-Index.js +5255 -5255
  3. RinUI/assets/img/default_app_icon.png +0 -0
  4. RinUI/components/Base.qml +78 -78
  5. RinUI/components/BasicInput/Button.qml +146 -147
  6. RinUI/components/BasicInput/CheckBox.qml +98 -98
  7. RinUI/components/BasicInput/ComboBox.qml +159 -159
  8. RinUI/components/BasicInput/DropDownButton.qml +20 -20
  9. RinUI/components/BasicInput/Hyperlink.qml +17 -17
  10. RinUI/components/BasicInput/PillButton.qml +10 -10
  11. RinUI/components/BasicInput/RadioButton.qml +94 -94
  12. RinUI/components/BasicInput/RoundButton.qml +26 -26
  13. RinUI/components/BasicInput/Slider.qml +212 -212
  14. RinUI/components/BasicInput/Switch.qml +101 -101
  15. RinUI/components/BasicInput/ToggleButton.qml +10 -10
  16. RinUI/components/BasicInput/ToolButton.qml +30 -30
  17. RinUI/components/ContextMenu.qml +183 -183
  18. RinUI/components/DateAndTime/DatePicker.qml +142 -140
  19. RinUI/components/DateAndTime/PickerView.qml +223 -223
  20. RinUI/components/DateAndTime/TimePicker.qml +114 -114
  21. RinUI/components/DialogsAndFlyouts/Dialog.qml +106 -106
  22. RinUI/components/DialogsAndFlyouts/DialogButtonBox.qml +47 -47
  23. RinUI/components/DialogsAndFlyouts/Flyout.qml +87 -144
  24. RinUI/components/DialogsAndFlyouts/Popup.qml +110 -106
  25. RinUI/components/FocusIndicator.qml +33 -33
  26. RinUI/components/IconWidget.qml +52 -52
  27. RinUI/components/Indicator.qml +89 -89
  28. RinUI/components/Layout/Expander.qml +159 -159
  29. RinUI/components/Layout/SettingExpander.qml +66 -66
  30. RinUI/components/Layout/SettingItem.qml +70 -70
  31. RinUI/components/ListAndCollections/Clip.qml +21 -21
  32. RinUI/components/ListAndCollections/Frame.qml +43 -43
  33. RinUI/components/ListAndCollections/ListView.qml +104 -104
  34. RinUI/components/ListAndCollections/ListViewDelegate.qml +82 -82
  35. RinUI/components/ListAndCollections/SettingCard.qml +72 -72
  36. RinUI/components/ListAndCollections/TableView.qml +81 -81
  37. RinUI/components/ListAndCollections/TableViewDelegate.qml +88 -88
  38. RinUI/components/Media/Avatar.qml +83 -0
  39. RinUI/components/MenusAndToolbars/Menu.qml +150 -150
  40. RinUI/components/MenusAndToolbars/MenuBar.qml +42 -42
  41. RinUI/components/MenusAndToolbars/MenuItem.qml +131 -131
  42. RinUI/components/MenusAndToolbars/MenuItemGroup.qml +43 -43
  43. RinUI/components/MenusAndToolbars/MenuSeparator.qml +13 -13
  44. RinUI/components/MenusAndToolbars/TextInputMenu.qml +37 -37
  45. RinUI/components/MenusAndToolbars/ToolSeparator.qml +16 -16
  46. RinUI/components/Navigation/ErrorPage.qml +48 -48
  47. RinUI/components/Navigation/NavigationBar.qml +179 -179
  48. RinUI/components/Navigation/NavigationItem.qml +193 -193
  49. RinUI/components/Navigation/NavigationSubItem.qml +103 -103
  50. RinUI/components/Navigation/NavigationView.qml +228 -227
  51. RinUI/components/Navigation/Segmented.qml +17 -0
  52. RinUI/components/Navigation/SegmentedItem.qml +108 -0
  53. RinUI/components/Navigation/SelectorBar.qml +12 -57
  54. RinUI/components/Navigation/SelectorBarItem.qml +89 -0
  55. RinUI/components/ScrollBar.qml +204 -204
  56. RinUI/components/ScrollView.qml +12 -12
  57. RinUI/components/Shadow.qml +47 -47
  58. RinUI/components/StatusAndInfo/InfoBadge.qml +77 -77
  59. RinUI/components/StatusAndInfo/InfoBar.qml +256 -251
  60. RinUI/components/StatusAndInfo/ProgressBar.qml +126 -126
  61. RinUI/components/StatusAndInfo/ProgressRing.qml +149 -0
  62. RinUI/components/StatusAndInfo/Toast.qml +236 -236
  63. RinUI/components/StatusAndInfo/ToolTip.qml +93 -93
  64. RinUI/components/Text/SpinBox.qml +150 -133
  65. RinUI/components/Text/Text.qml +44 -44
  66. RinUI/components/Text/TextArea.qml +117 -117
  67. RinUI/components/Text/TextField.qml +113 -113
  68. RinUI/components/Text/TextInput.qml +47 -47
  69. RinUI/components/qmldir +80 -77
  70. RinUI/core/__init__.py +4 -4
  71. RinUI/core/config.py +129 -129
  72. RinUI/core/launcher.py +129 -129
  73. RinUI/core/theme.py +339 -339
  74. RinUI/core/translator.py +25 -25
  75. RinUI/hooks/__init__.py +3 -3
  76. RinUI/hooks/hook-RinUI.py +3 -3
  77. RinUI/qmldir +108 -97
  78. RinUI/themes/Appearance.qml +36 -0
  79. RinUI/themes/Colors.qml +36 -0
  80. RinUI/themes/dark.qml +145 -136
  81. RinUI/themes/light.qml +145 -136
  82. RinUI/themes/qmldir +9 -6
  83. RinUI/themes/theme.qml +151 -149
  84. RinUI/themes/utils.qml +37 -37
  85. RinUI/utils/Animation.qml +12 -12
  86. RinUI/utils/FloatLayer.qml +132 -123
  87. RinUI/utils/FontIconLoader.qml +13 -13
  88. RinUI/utils/Position.qml +19 -19
  89. RinUI/utils/Severity.qml +13 -13
  90. RinUI/utils/Typography.qml +17 -17
  91. RinUI/utils/qmldir +4 -4
  92. RinUI/windows/CtrlBtn.qml +118 -118
  93. RinUI/windows/FluentPage.qml +92 -92
  94. RinUI/windows/FluentWindow.qml +31 -30
  95. RinUI/windows/FluentWindowBase.qml +158 -158
  96. RinUI/windows/TitleBar.qml +135 -135
  97. RinUI/windows/qmldir +7 -7
  98. RinUI/windows/window/ApplicationWindow.qml +8 -8
  99. RinUI/windows/window/Window.qml +118 -118
  100. {rinui-0.0.11.data → rinui-0.1.1.data}/data/LICENSE +21 -21
  101. {rinui-0.0.11.data → rinui-0.1.1.data}/data/README.md +100 -97
  102. {rinui-0.0.11.dist-info → rinui-0.1.1.dist-info}/METADATA +116 -112
  103. rinui-0.1.1.dist-info/RECORD +112 -0
  104. {rinui-0.0.11.dist-info → rinui-0.1.1.dist-info}/WHEEL +1 -1
  105. {rinui-0.0.11.dist-info → rinui-0.1.1.dist-info/licenses}/LICENSE +21 -21
  106. RinUI/__pycache__/__init__.cpython-38.pyc +0 -0
  107. RinUI/config/rin_ui.json +0 -8
  108. RinUI/core/__pycache__/__init__.cpython-38.pyc +0 -0
  109. RinUI/core/__pycache__/config.cpython-38.pyc +0 -0
  110. RinUI/core/__pycache__/launcher.cpython-38.pyc +0 -0
  111. RinUI/core/__pycache__/theme.cpython-38.pyc +0 -0
  112. RinUI/core/__pycache__/translator.cpython-38.pyc +0 -0
  113. rinui-0.0.11.dist-info/RECORD +0 -112
  114. {rinui-0.0.11.dist-info → rinui-0.1.1.dist-info}/entry_points.txt +0 -0
  115. {rinui-0.0.11.dist-info → rinui-0.1.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,89 @@
1
+ import QtQuick 2.15
2
+ import QtQuick.Controls 2.15
3
+ import QtQuick.Layouts 2.15
4
+ import Qt5Compat.GraphicalEffects
5
+ import "../../components"
6
+ import "../../themes"
7
+
8
+ TabButton {
9
+ id: root
10
+
11
+ implicitWidth: Math.max(row.implicitWidth + 26 , 40)
12
+ implicitHeight: 32
13
+
14
+ background: Item {}
15
+
16
+ Behavior on opacity {
17
+ NumberAnimation {
18
+ duration: Utils.animationSpeed
19
+ easing.type: Easing.InOutQuint
20
+ }
21
+ }
22
+
23
+ contentItem: Item {
24
+ clip: true
25
+ anchors.fill: parent
26
+
27
+ Row {
28
+ id: row
29
+ spacing: 8
30
+ anchors.centerIn: parent
31
+ IconWidget {
32
+ id: iconWidget
33
+ size: icon || source ? text.font.pixelSize * 1.3 : 0 // 图标大小 / Icon Size
34
+ icon: root.icon.name
35
+ source: root.icon.source
36
+ y: 0.25
37
+ }
38
+
39
+ Text {
40
+ id: text
41
+ typography: Typography.Body
42
+ text: root.text
43
+ color: Theme.currentTheme.colors.textColor
44
+ }
45
+ }
46
+
47
+ Indicator {
48
+ anchors {
49
+ bottom: parent.bottom
50
+ bottomMargin: Theme.currentTheme.appearance.borderWidth
51
+ horizontalCenter: parent.horizontalCenter
52
+ }
53
+ visible: root.checked
54
+ orientation: Qt.Horizontal
55
+ }
56
+ }
57
+
58
+ // 状态变化
59
+ states: [
60
+ State {
61
+ name: "disabled"
62
+ when: !enabled
63
+ PropertyChanges {
64
+ target: root
65
+ opacity: 0.65
66
+ }
67
+ },
68
+ State {
69
+ name: "pressed"
70
+ when: pressed
71
+ PropertyChanges {
72
+ target: root;
73
+ opacity: 0.67
74
+ }
75
+ PropertyChanges {
76
+ target: background;
77
+ scale: 0.95
78
+ }
79
+ },
80
+ State {
81
+ name: "hovered"
82
+ when: hovered
83
+ PropertyChanges {
84
+ target: root;
85
+ opacity: 0.875
86
+ }
87
+ }
88
+ ]
89
+ }
@@ -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
+ }
@@ -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
  }
@@ -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
  // }