RinUI 0.1.0__py3-none-any.whl → 0.1.1.post1__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 +26 -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.post1.data}/data/LICENSE +21 -21
- {rinui-0.1.0.data → rinui-0.1.1.post1.data}/data/README.md +100 -100
- {rinui-0.1.0.dist-info → rinui-0.1.1.post1.dist-info}/METADATA +116 -115
- rinui-0.1.1.post1.dist-info/RECORD +112 -0
- {rinui-0.1.0.dist-info → rinui-0.1.1.post1.dist-info}/WHEEL +1 -1
- {rinui-0.1.0.dist-info → rinui-0.1.1.post1.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.post1.dist-info}/entry_points.txt +0 -0
- {rinui-0.1.0.dist-info → rinui-0.1.1.post1.dist-info}/top_level.txt +0 -0
@@ -1,160 +1,160 @@
|
|
1
|
-
import QtQuick 2.15
|
2
|
-
import QtQuick.Controls.Basic 2.15
|
3
|
-
import QtQuick.Layouts 2.15
|
4
|
-
import Qt5Compat.GraphicalEffects
|
5
|
-
import "../../themes"
|
6
|
-
import "../../components"
|
7
|
-
|
8
|
-
|
9
|
-
// expander
|
10
|
-
Item {
|
11
|
-
id: root
|
12
|
-
property bool enabled: true
|
13
|
-
property bool expanded: false
|
14
|
-
property alias headerHeight: header.height
|
15
|
-
property alias contentHeight: content.height
|
16
|
-
property alias contentPadding: content.padding
|
17
|
-
property alias contentSpacing: contentLayout.spacing
|
18
|
-
enum ExpandDirection { Up, Down }
|
19
|
-
property var expandDirection: Expander.Down
|
20
|
-
readonly property bool directionUp: root.expandDirection === Expander.Up
|
21
|
-
property real radius: Theme.currentTheme.appearance.windowRadius
|
22
|
-
|
23
|
-
property alias header: headerCustom.data
|
24
|
-
property string text: "Expander"
|
25
|
-
default property alias contentData: contentLayout.data
|
26
|
-
|
27
|
-
implicitWidth: Math.max(
|
28
|
-
headerLayout.implicitWidth + 5 * 2,
|
29
|
-
contentLayout.implicitWidth + contentPadding * 2,
|
30
|
-
headerCustom.implicitWidth + 20 + expandBtn.width
|
31
|
-
)
|
32
|
-
implicitHeight: headerHeight + (content.height - 2) * expanded
|
33
|
-
|
34
|
-
// 拦截交互
|
35
|
-
MouseArea {
|
36
|
-
z: 999
|
37
|
-
anchors.fill: parent
|
38
|
-
enabled: !root.enabled
|
39
|
-
hoverEnabled: false
|
40
|
-
preventStealing: true
|
41
|
-
onClicked: {} // 防止穿透
|
42
|
-
}
|
43
|
-
|
44
|
-
// 主体
|
45
|
-
Clip {
|
46
|
-
id: header
|
47
|
-
enabled: root.enabled
|
48
|
-
y: directionUp ? content.height * expanded : 0
|
49
|
-
width: parent.width
|
50
|
-
height: Math.max(
|
51
|
-
headerCustom.implicitHeight + 5 * 2,
|
52
|
-
headerLayout.implicitHeight + 5 * 2,
|
53
|
-
48
|
54
|
-
)
|
55
|
-
radius: 0
|
56
|
-
|
57
|
-
RowLayout {
|
58
|
-
id: headerCustom
|
59
|
-
anchors.fill: parent
|
60
|
-
anchors.margins: 5
|
61
|
-
anchors.leftMargin: 15
|
62
|
-
anchors.rightMargin: 5 + expandBtn.width
|
63
|
-
}
|
64
|
-
|
65
|
-
RowLayout {
|
66
|
-
id: headerLayout
|
67
|
-
anchors.fill: parent
|
68
|
-
anchors.margins: 5
|
69
|
-
anchors.leftMargin: 15
|
70
|
-
spacing: 0
|
71
|
-
Text {
|
72
|
-
Layout.fillWidth: true
|
73
|
-
text: root.text
|
74
|
-
opacity: headerCustom.children.length === 0
|
75
|
-
}
|
76
|
-
// 展开按钮
|
77
|
-
ToolButton {
|
78
|
-
id: expandBtn
|
79
|
-
focusPolicy: Qt.NoFocus
|
80
|
-
Layout.preferredWidth: 40
|
81
|
-
Layout.preferredHeight: 40
|
82
|
-
hoverable: false
|
83
|
-
size: 14
|
84
|
-
icon.name: directionUp ? "ic_fluent_chevron_up_20_filled" : "ic_fluent_chevron_down_20_filled"
|
85
|
-
|
86
|
-
// 展开动画
|
87
|
-
transform: Rotation {
|
88
|
-
angle: !expanded ? 0 : 180 ; origin.x: 40/2; origin.y: 40/2
|
89
|
-
Behavior on angle { NumberAnimation { duration: Utils.animationSpeed; easing.type: Easing.OutQuint } }
|
90
|
-
}
|
91
|
-
opacity: 0.7
|
92
|
-
|
93
|
-
onClicked: expanded =!expanded
|
94
|
-
}
|
95
|
-
}
|
96
|
-
|
97
|
-
onClicked: expanded =!expanded
|
98
|
-
|
99
|
-
Behavior on y {
|
100
|
-
NumberAnimation { duration: Utils.animationSpeed; easing.type: Easing.OutQuint }
|
101
|
-
}
|
102
|
-
}
|
103
|
-
|
104
|
-
// content
|
105
|
-
Item {
|
106
|
-
id: contentContainer
|
107
|
-
width: parent.width
|
108
|
-
height: directionUp
|
109
|
-
? expanded ? content.height : 0
|
110
|
-
: content.height
|
111
|
-
clip: true
|
112
|
-
y: directionUp ? 0 : header.height
|
113
|
-
z: -1 // 置底
|
114
|
-
|
115
|
-
Frame {
|
116
|
-
id: content
|
117
|
-
padding: 7
|
118
|
-
width: parent.width
|
119
|
-
y: expanded
|
120
|
-
? directionUp ? 2 : - 2
|
121
|
-
: directionUp ? height : - height
|
122
|
-
radius: 0
|
123
|
-
opacity: root.enabled ? 1 : 0.65
|
124
|
-
|
125
|
-
color: Theme.currentTheme.colors.cardSecondaryColor
|
126
|
-
// 内容区域 - 布局
|
127
|
-
ColumnLayout {
|
128
|
-
id: contentLayout
|
129
|
-
anchors.fill: parent
|
130
|
-
}
|
131
|
-
|
132
|
-
Behavior on y {
|
133
|
-
NumberAnimation { duration: Utils.animationSpeed; easing.type: Easing.OutQuint }
|
134
|
-
}
|
135
|
-
|
136
|
-
Behavior on opacity {
|
137
|
-
NumberAnimation { duration: Utils.appearanceSpeed; easing.type: Easing.OutQuint }
|
138
|
-
}
|
139
|
-
}
|
140
|
-
|
141
|
-
Behavior on height {
|
142
|
-
NumberAnimation { duration: Utils.animationSpeed; easing.type: Easing.OutQuint }
|
143
|
-
}
|
144
|
-
}
|
145
|
-
|
146
|
-
// 动画
|
147
|
-
Behavior on implicitHeight {
|
148
|
-
NumberAnimation { duration: Utils.animationSpeed; easing.type: Easing.OutQuint }
|
149
|
-
}
|
150
|
-
|
151
|
-
// 圆角裁切
|
152
|
-
layer.enabled: true
|
153
|
-
layer.effect: OpacityMask {
|
154
|
-
maskSource: Rectangle {
|
155
|
-
width: root.width
|
156
|
-
height: root.height
|
157
|
-
radius: root.radius
|
158
|
-
}
|
159
|
-
}
|
1
|
+
import QtQuick 2.15
|
2
|
+
import QtQuick.Controls.Basic 2.15
|
3
|
+
import QtQuick.Layouts 2.15
|
4
|
+
import Qt5Compat.GraphicalEffects
|
5
|
+
import "../../themes"
|
6
|
+
import "../../components"
|
7
|
+
|
8
|
+
|
9
|
+
// expander
|
10
|
+
Item {
|
11
|
+
id: root
|
12
|
+
property bool enabled: true
|
13
|
+
property bool expanded: false
|
14
|
+
property alias headerHeight: header.height
|
15
|
+
property alias contentHeight: content.height
|
16
|
+
property alias contentPadding: content.padding
|
17
|
+
property alias contentSpacing: contentLayout.spacing
|
18
|
+
enum ExpandDirection { Up, Down }
|
19
|
+
property var expandDirection: Expander.Down
|
20
|
+
readonly property bool directionUp: root.expandDirection === Expander.Up
|
21
|
+
property real radius: Theme.currentTheme.appearance.windowRadius
|
22
|
+
|
23
|
+
property alias header: headerCustom.data
|
24
|
+
property string text: "Expander"
|
25
|
+
default property alias contentData: contentLayout.data
|
26
|
+
|
27
|
+
implicitWidth: Math.max(
|
28
|
+
headerLayout.implicitWidth + 5 * 2,
|
29
|
+
contentLayout.implicitWidth + contentPadding * 2,
|
30
|
+
headerCustom.implicitWidth + 20 + expandBtn.width
|
31
|
+
)
|
32
|
+
implicitHeight: headerHeight + (content.height - 2) * expanded
|
33
|
+
|
34
|
+
// 拦截交互
|
35
|
+
MouseArea {
|
36
|
+
z: 999
|
37
|
+
anchors.fill: parent
|
38
|
+
enabled: !root.enabled
|
39
|
+
hoverEnabled: false
|
40
|
+
preventStealing: true
|
41
|
+
onClicked: {} // 防止穿透
|
42
|
+
}
|
43
|
+
|
44
|
+
// 主体
|
45
|
+
Clip {
|
46
|
+
id: header
|
47
|
+
enabled: root.enabled
|
48
|
+
y: directionUp ? content.height * expanded : 0
|
49
|
+
width: parent.width
|
50
|
+
height: Math.max(
|
51
|
+
headerCustom.implicitHeight + 5 * 2,
|
52
|
+
headerLayout.implicitHeight + 5 * 2,
|
53
|
+
48
|
54
|
+
)
|
55
|
+
radius: 0
|
56
|
+
|
57
|
+
RowLayout {
|
58
|
+
id: headerCustom
|
59
|
+
anchors.fill: parent
|
60
|
+
anchors.margins: 5
|
61
|
+
anchors.leftMargin: 15
|
62
|
+
anchors.rightMargin: 5 + expandBtn.width
|
63
|
+
}
|
64
|
+
|
65
|
+
RowLayout {
|
66
|
+
id: headerLayout
|
67
|
+
anchors.fill: parent
|
68
|
+
anchors.margins: 5
|
69
|
+
anchors.leftMargin: 15
|
70
|
+
spacing: 0
|
71
|
+
Text {
|
72
|
+
Layout.fillWidth: true
|
73
|
+
text: root.text
|
74
|
+
opacity: headerCustom.children.length === 0
|
75
|
+
}
|
76
|
+
// 展开按钮
|
77
|
+
ToolButton {
|
78
|
+
id: expandBtn
|
79
|
+
focusPolicy: Qt.NoFocus
|
80
|
+
Layout.preferredWidth: 40
|
81
|
+
Layout.preferredHeight: 40
|
82
|
+
hoverable: false
|
83
|
+
size: 14
|
84
|
+
icon.name: directionUp ? "ic_fluent_chevron_up_20_filled" : "ic_fluent_chevron_down_20_filled"
|
85
|
+
|
86
|
+
// 展开动画
|
87
|
+
transform: Rotation {
|
88
|
+
angle: !expanded ? 0 : 180 ; origin.x: 40/2; origin.y: 40/2
|
89
|
+
Behavior on angle { NumberAnimation { duration: Utils.animationSpeed; easing.type: Easing.OutQuint } }
|
90
|
+
}
|
91
|
+
opacity: 0.7
|
92
|
+
|
93
|
+
onClicked: expanded =!expanded
|
94
|
+
}
|
95
|
+
}
|
96
|
+
|
97
|
+
onClicked: expanded =!expanded
|
98
|
+
|
99
|
+
Behavior on y {
|
100
|
+
NumberAnimation { duration: Utils.animationSpeed; easing.type: Easing.OutQuint }
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
// content
|
105
|
+
Item {
|
106
|
+
id: contentContainer
|
107
|
+
width: parent.width
|
108
|
+
height: directionUp
|
109
|
+
? expanded ? content.height : 0
|
110
|
+
: content.height
|
111
|
+
clip: true
|
112
|
+
y: directionUp ? 0 : header.height
|
113
|
+
z: -1 // 置底
|
114
|
+
|
115
|
+
Frame {
|
116
|
+
id: content
|
117
|
+
padding: 7
|
118
|
+
width: parent.width
|
119
|
+
y: expanded
|
120
|
+
? directionUp ? 2 : - 2
|
121
|
+
: directionUp ? height : - height
|
122
|
+
radius: 0
|
123
|
+
opacity: root.enabled ? 1 : 0.65
|
124
|
+
|
125
|
+
color: Theme.currentTheme.colors.cardSecondaryColor
|
126
|
+
// 内容区域 - 布局
|
127
|
+
ColumnLayout {
|
128
|
+
id: contentLayout
|
129
|
+
anchors.fill: parent
|
130
|
+
}
|
131
|
+
|
132
|
+
Behavior on y {
|
133
|
+
NumberAnimation { duration: Utils.animationSpeed; easing.type: Easing.OutQuint }
|
134
|
+
}
|
135
|
+
|
136
|
+
Behavior on opacity {
|
137
|
+
NumberAnimation { duration: Utils.appearanceSpeed; easing.type: Easing.OutQuint }
|
138
|
+
}
|
139
|
+
}
|
140
|
+
|
141
|
+
Behavior on height {
|
142
|
+
NumberAnimation { duration: Utils.animationSpeed; easing.type: Easing.OutQuint }
|
143
|
+
}
|
144
|
+
}
|
145
|
+
|
146
|
+
// 动画
|
147
|
+
Behavior on implicitHeight {
|
148
|
+
NumberAnimation { duration: Utils.animationSpeed; easing.type: Easing.OutQuint }
|
149
|
+
}
|
150
|
+
|
151
|
+
// 圆角裁切
|
152
|
+
layer.enabled: true
|
153
|
+
layer.effect: OpacityMask {
|
154
|
+
maskSource: Rectangle {
|
155
|
+
width: root.width
|
156
|
+
height: root.height
|
157
|
+
radius: root.radius
|
158
|
+
}
|
159
|
+
}
|
160
160
|
}
|
@@ -1,67 +1,67 @@
|
|
1
|
-
import QtQuick 2.15
|
2
|
-
import QtQuick.Controls.Basic 2.15
|
3
|
-
import QtQuick.Layouts 2.15
|
4
|
-
import Qt5Compat.GraphicalEffects
|
5
|
-
import "../../themes"
|
6
|
-
import "../../components"
|
7
|
-
|
8
|
-
|
9
|
-
// expander
|
10
|
-
Expander {
|
11
|
-
id: root
|
12
|
-
property alias content: rightContent.data
|
13
|
-
// property alias showcase: showcaseContainer.data
|
14
|
-
property string title: "Title"
|
15
|
-
property alias icon: icon.icon
|
16
|
-
property alias source: icon.source
|
17
|
-
property alias iconSize: icon.size
|
18
|
-
property string description: "A description of the setting"
|
19
|
-
|
20
|
-
contentPadding: 0
|
21
|
-
contentSpacing: 0
|
22
|
-
|
23
|
-
header: RowLayout {
|
24
|
-
Layout.margins: 13
|
25
|
-
Layout.leftMargin: 0
|
26
|
-
spacing: 16
|
27
|
-
|
28
|
-
RowLayout {
|
29
|
-
id: leftContent
|
30
|
-
Layout.maximumWidth: parent.width * 0.6
|
31
|
-
spacing: 16
|
32
|
-
|
33
|
-
IconWidget {
|
34
|
-
id: icon
|
35
|
-
size: 20
|
36
|
-
}
|
37
|
-
Column {
|
38
|
-
Layout.fillWidth: true
|
39
|
-
spacing: 0
|
40
|
-
Text {
|
41
|
-
width: parent.width
|
42
|
-
typography: Typography.Body
|
43
|
-
text: title
|
44
|
-
maximumLineCount: 2 // 限制最多两行
|
45
|
-
elide: Text.ElideRight // 超过限制时用省略号
|
46
|
-
}
|
47
|
-
|
48
|
-
Text {
|
49
|
-
width: parent.width
|
50
|
-
typography: Typography.Caption
|
51
|
-
text: description
|
52
|
-
color: Theme.currentTheme.colors.textSecondaryColor
|
53
|
-
wrapMode: Text.Wrap // 启用换行
|
54
|
-
maximumLineCount: 3
|
55
|
-
elide: Text.ElideRight
|
56
|
-
}
|
57
|
-
}
|
58
|
-
}
|
59
|
-
RowLayout {
|
60
|
-
id: rightContent
|
61
|
-
Layout.fillHeight: true
|
62
|
-
Item { Layout.fillWidth: true }
|
63
|
-
Layout.alignment: Qt.AlignRight
|
64
|
-
spacing: 16
|
65
|
-
}
|
66
|
-
}
|
1
|
+
import QtQuick 2.15
|
2
|
+
import QtQuick.Controls.Basic 2.15
|
3
|
+
import QtQuick.Layouts 2.15
|
4
|
+
import Qt5Compat.GraphicalEffects
|
5
|
+
import "../../themes"
|
6
|
+
import "../../components"
|
7
|
+
|
8
|
+
|
9
|
+
// expander
|
10
|
+
Expander {
|
11
|
+
id: root
|
12
|
+
property alias content: rightContent.data
|
13
|
+
// property alias showcase: showcaseContainer.data
|
14
|
+
property string title: "Title"
|
15
|
+
property alias icon: icon.icon
|
16
|
+
property alias source: icon.source
|
17
|
+
property alias iconSize: icon.size
|
18
|
+
property string description: "A description of the setting"
|
19
|
+
|
20
|
+
contentPadding: 0
|
21
|
+
contentSpacing: 0
|
22
|
+
|
23
|
+
header: RowLayout {
|
24
|
+
Layout.margins: 13
|
25
|
+
Layout.leftMargin: 0
|
26
|
+
spacing: 16
|
27
|
+
|
28
|
+
RowLayout {
|
29
|
+
id: leftContent
|
30
|
+
Layout.maximumWidth: parent.width * 0.6
|
31
|
+
spacing: 16
|
32
|
+
|
33
|
+
IconWidget {
|
34
|
+
id: icon
|
35
|
+
size: 20
|
36
|
+
}
|
37
|
+
Column {
|
38
|
+
Layout.fillWidth: true
|
39
|
+
spacing: 0
|
40
|
+
Text {
|
41
|
+
width: parent.width
|
42
|
+
typography: Typography.Body
|
43
|
+
text: title
|
44
|
+
maximumLineCount: 2 // 限制最多两行
|
45
|
+
elide: Text.ElideRight // 超过限制时用省略号
|
46
|
+
}
|
47
|
+
|
48
|
+
Text {
|
49
|
+
width: parent.width
|
50
|
+
typography: Typography.Caption
|
51
|
+
text: description
|
52
|
+
color: Theme.currentTheme.colors.textSecondaryColor
|
53
|
+
wrapMode: Text.Wrap // 启用换行
|
54
|
+
maximumLineCount: 3
|
55
|
+
elide: Text.ElideRight
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
RowLayout {
|
60
|
+
id: rightContent
|
61
|
+
Layout.fillHeight: true
|
62
|
+
Item { Layout.fillWidth: true }
|
63
|
+
Layout.alignment: Qt.AlignRight
|
64
|
+
spacing: 16
|
65
|
+
}
|
66
|
+
}
|
67
67
|
}
|
@@ -1,71 +1,71 @@
|
|
1
|
-
import QtQuick 2.15
|
2
|
-
import QtQuick.Controls 2.15
|
3
|
-
import QtQuick.Layouts 2.15
|
4
|
-
import RinUI
|
5
|
-
|
6
|
-
|
7
|
-
Frame {
|
8
|
-
id: frame
|
9
|
-
default property alias content: rightContent.data
|
10
|
-
// property alias showcase: showcaseContainer.data
|
11
|
-
property string title
|
12
|
-
property string description
|
13
|
-
|
14
|
-
leftPadding: 15 + 35
|
15
|
-
rightPadding: 15
|
16
|
-
topPadding: 13
|
17
|
-
bottomPadding: 13
|
18
|
-
// implicitHeight: 62
|
19
|
-
Layout.fillWidth: true
|
20
|
-
|
21
|
-
background: Rectangle {
|
22
|
-
anchors.bottom: parent.bottom
|
23
|
-
width: parent.width
|
24
|
-
height: 1
|
25
|
-
color: Theme.currentTheme.colors.dividerBorderColor
|
26
|
-
}
|
27
|
-
|
28
|
-
RowLayout {
|
29
|
-
anchors.fill: parent
|
30
|
-
spacing: 16
|
31
|
-
|
32
|
-
RowLayout {
|
33
|
-
id: leftContent
|
34
|
-
Layout.maximumWidth: parent.width * 0.6
|
35
|
-
Layout.fillHeight: true
|
36
|
-
spacing: 16
|
37
|
-
|
38
|
-
Column {
|
39
|
-
Layout.fillWidth: true
|
40
|
-
spacing: 0
|
41
|
-
Text {
|
42
|
-
id: titleLabel
|
43
|
-
width: parent.width
|
44
|
-
typography: Typography.Body
|
45
|
-
text: title
|
46
|
-
maximumLineCount: 2 // 限制最多两行
|
47
|
-
elide: Text.ElideRight // 超过限制时用省略号
|
48
|
-
visible: title.length > 0
|
49
|
-
}
|
50
|
-
|
51
|
-
Text {
|
52
|
-
id: discriptionLabel
|
53
|
-
width: parent.width
|
54
|
-
typography: Typography.Caption
|
55
|
-
text: description
|
56
|
-
color: Theme.currentTheme.colors.textSecondaryColor
|
57
|
-
wrapMode: Text.Wrap // 启用换行
|
58
|
-
maximumLineCount: 3
|
59
|
-
elide: Text.ElideRight
|
60
|
-
visible: description.length > 0
|
61
|
-
}
|
62
|
-
}
|
63
|
-
visible: !(!titleLabel.visible && !discriptionLabel.visible)
|
64
|
-
}
|
65
|
-
RowLayout {
|
66
|
-
id: rightContent
|
67
|
-
Layout.alignment: Qt.AlignRight
|
68
|
-
spacing: 16
|
69
|
-
}
|
70
|
-
}
|
1
|
+
import QtQuick 2.15
|
2
|
+
import QtQuick.Controls 2.15
|
3
|
+
import QtQuick.Layouts 2.15
|
4
|
+
import RinUI
|
5
|
+
|
6
|
+
|
7
|
+
Frame {
|
8
|
+
id: frame
|
9
|
+
default property alias content: rightContent.data
|
10
|
+
// property alias showcase: showcaseContainer.data
|
11
|
+
property string title
|
12
|
+
property string description
|
13
|
+
|
14
|
+
leftPadding: 15 + 35
|
15
|
+
rightPadding: 15
|
16
|
+
topPadding: 13
|
17
|
+
bottomPadding: 13
|
18
|
+
// implicitHeight: 62
|
19
|
+
Layout.fillWidth: true
|
20
|
+
|
21
|
+
background: Rectangle {
|
22
|
+
anchors.bottom: parent.bottom
|
23
|
+
width: parent.width
|
24
|
+
height: 1
|
25
|
+
color: Theme.currentTheme.colors.dividerBorderColor
|
26
|
+
}
|
27
|
+
|
28
|
+
RowLayout {
|
29
|
+
anchors.fill: parent
|
30
|
+
spacing: 16
|
31
|
+
|
32
|
+
RowLayout {
|
33
|
+
id: leftContent
|
34
|
+
Layout.maximumWidth: parent.width * 0.6
|
35
|
+
Layout.fillHeight: true
|
36
|
+
spacing: 16
|
37
|
+
|
38
|
+
Column {
|
39
|
+
Layout.fillWidth: true
|
40
|
+
spacing: 0
|
41
|
+
Text {
|
42
|
+
id: titleLabel
|
43
|
+
width: parent.width
|
44
|
+
typography: Typography.Body
|
45
|
+
text: title
|
46
|
+
maximumLineCount: 2 // 限制最多两行
|
47
|
+
elide: Text.ElideRight // 超过限制时用省略号
|
48
|
+
visible: title.length > 0
|
49
|
+
}
|
50
|
+
|
51
|
+
Text {
|
52
|
+
id: discriptionLabel
|
53
|
+
width: parent.width
|
54
|
+
typography: Typography.Caption
|
55
|
+
text: description
|
56
|
+
color: Theme.currentTheme.colors.textSecondaryColor
|
57
|
+
wrapMode: Text.Wrap // 启用换行
|
58
|
+
maximumLineCount: 3
|
59
|
+
elide: Text.ElideRight
|
60
|
+
visible: description.length > 0
|
61
|
+
}
|
62
|
+
}
|
63
|
+
visible: !(!titleLabel.visible && !discriptionLabel.visible)
|
64
|
+
}
|
65
|
+
RowLayout {
|
66
|
+
id: rightContent
|
67
|
+
Layout.alignment: Qt.AlignRight
|
68
|
+
spacing: 16
|
69
|
+
}
|
70
|
+
}
|
71
71
|
}
|
@@ -1,22 +1,22 @@
|
|
1
|
-
import QtQuick 2.15
|
2
|
-
import QtQuick.Controls 2.15
|
3
|
-
import QtQuick.Layouts 2.15
|
4
|
-
import RinUI
|
5
|
-
|
6
|
-
|
7
|
-
Button {
|
8
|
-
id: root
|
9
|
-
property alias color: background.color
|
10
|
-
property alias radius: background.radius
|
11
|
-
property alias borderColor: background.borderColor
|
12
|
-
property alias borderWidth: background.borderWidth
|
13
|
-
|
14
|
-
background: Frame {
|
15
|
-
id: background
|
16
|
-
anchors.fill: parent
|
17
|
-
color: root.backgroundColor
|
18
|
-
opacity: 1
|
19
|
-
}
|
20
|
-
|
21
|
-
contentItem: Item {}
|
1
|
+
import QtQuick 2.15
|
2
|
+
import QtQuick.Controls 2.15
|
3
|
+
import QtQuick.Layouts 2.15
|
4
|
+
import RinUI
|
5
|
+
|
6
|
+
|
7
|
+
Button {
|
8
|
+
id: root
|
9
|
+
property alias color: background.color
|
10
|
+
property alias radius: background.radius
|
11
|
+
property alias borderColor: background.borderColor
|
12
|
+
property alias borderWidth: background.borderWidth
|
13
|
+
|
14
|
+
background: Frame {
|
15
|
+
id: background
|
16
|
+
anchors.fill: parent
|
17
|
+
color: root.backgroundColor
|
18
|
+
opacity: 1
|
19
|
+
}
|
20
|
+
|
21
|
+
contentItem: Item {}
|
22
22
|
}
|