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
@@ -1,106 +1,106 @@
1
- import QtQuick 2.15
2
- import QtQuick.Controls 2.15
3
- import QtQuick.Layouts 2.15
4
- import "../../themes"
5
- import "../../components"
6
-
7
-
8
- Dialog {
9
- id: root
10
-
11
- property bool titleBarVisible: false
12
-
13
- anchors.centerIn: Overlay.overlay // Center in the overlay
14
- closePolicy: Popup.NoAutoClose // 更符合fds规范
15
-
16
- padding: 24
17
- topPadding: 24
18
- bottomPadding: 24
19
- implicitWidth: Math.max(Utils.dialogMinimumWidth, Math.min(implicitContentWidth + 48, Utils.dialogMaximumWidth))
20
-
21
- contentItem: ColumnLayout {
22
- spacing: 12
23
- Text {
24
- Layout.fillWidth: true
25
- typography: Typography.Subtitle
26
- text: root.title
27
- }
28
- }
29
-
30
-
31
- header: Item {}
32
-
33
- // 定制footer
34
- footer: DialogButtonBox {
35
- id: buttonBox
36
- standardButtons: root.standardButtons
37
- }
38
-
39
- background: Rectangle {
40
- id: background
41
- anchors.fill: parent
42
- color: Theme.currentTheme.colors.backgroundAcrylicColor
43
- border.color: Theme.currentTheme.colors.windowBorderColor
44
- border.width: 1
45
- radius: Theme.currentTheme.appearance.windowRadius
46
-
47
- Behavior on color {
48
- ColorAnimation {
49
- duration: Utils.backdropEnabled ? 0 : 150
50
- }
51
- }
52
-
53
- layer.enabled: true
54
- layer.effect: Shadow {
55
- style: "dialog"
56
- source: background
57
- }
58
- }
59
-
60
- Overlay.modal: Rectangle {
61
- color: Theme.currentTheme.colors.backgroundSmokeColor
62
- }
63
-
64
- // 动画 / Animation //
65
- enter: Transition {
66
- ParallelAnimation {
67
- NumberAnimation {
68
- target: root
69
- property: "opacity"
70
- from: 0
71
- to: 1
72
- duration: Utils.appearanceSpeed
73
- easing.type: Easing.InOutQuart
74
- }
75
- NumberAnimation {
76
- target: root
77
- property: "scale"
78
- from: 1.1
79
- to: 1
80
- duration: Utils.animationSpeedMiddle
81
- easing.type: Easing.OutQuint
82
- }
83
- }
84
- }
85
-
86
- exit: Transition {
87
- ParallelAnimation {
88
- NumberAnimation {
89
- target: root
90
- property: "opacity"
91
- from: 1
92
- to: 0
93
- duration: 100
94
- easing.type: Easing.InOutQuart
95
- }
96
- NumberAnimation {
97
- target: root
98
- property: "scale"
99
- from: 1
100
- to: 1.1
101
- duration: Utils.animationSpeedMiddle
102
- easing.type: Easing.OutQuint
103
- }
104
- }
105
- }
106
- }
1
+ import QtQuick 2.15
2
+ import QtQuick.Controls 2.15
3
+ import QtQuick.Layouts 2.15
4
+ import "../../themes"
5
+ import "../../components"
6
+
7
+
8
+ Dialog {
9
+ id: root
10
+
11
+ property bool titleBarVisible: false
12
+
13
+ anchors.centerIn: Overlay.overlay // Center in the overlay
14
+ closePolicy: Popup.NoAutoClose // 更符合fds规范
15
+
16
+ padding: 24
17
+ topPadding: 24
18
+ bottomPadding: 24
19
+ implicitWidth: Math.max(Utils.dialogMinimumWidth, Math.min(implicitContentWidth + 48, Utils.dialogMaximumWidth))
20
+
21
+ contentItem: ColumnLayout {
22
+ spacing: 12
23
+ Text {
24
+ Layout.fillWidth: true
25
+ typography: Typography.Subtitle
26
+ text: root.title
27
+ }
28
+ }
29
+
30
+
31
+ header: Item {}
32
+
33
+ // 定制footer
34
+ footer: DialogButtonBox {
35
+ id: buttonBox
36
+ standardButtons: root.standardButtons
37
+ }
38
+
39
+ background: Rectangle {
40
+ id: background
41
+ anchors.fill: parent
42
+ color: Theme.currentTheme.colors.backgroundAcrylicColor
43
+ border.color: Theme.currentTheme.colors.windowBorderColor
44
+ border.width: 1
45
+ radius: Theme.currentTheme.appearance.windowRadius
46
+
47
+ Behavior on color {
48
+ ColorAnimation {
49
+ duration: Utils.backdropEnabled ? 0 : 150
50
+ }
51
+ }
52
+
53
+ layer.enabled: true
54
+ layer.effect: Shadow {
55
+ style: "dialog"
56
+ source: background
57
+ }
58
+ }
59
+
60
+ Overlay.modal: Rectangle {
61
+ color: Theme.currentTheme.colors.backgroundSmokeColor
62
+ }
63
+
64
+ // 动画 / Animation //
65
+ enter: Transition {
66
+ ParallelAnimation {
67
+ NumberAnimation {
68
+ target: root
69
+ property: "opacity"
70
+ from: 0
71
+ to: 1
72
+ duration: Utils.appearanceSpeed
73
+ easing.type: Easing.InOutQuart
74
+ }
75
+ NumberAnimation {
76
+ target: root
77
+ property: "scale"
78
+ from: 1.1
79
+ to: 1
80
+ duration: Utils.animationSpeedMiddle
81
+ easing.type: Easing.OutQuint
82
+ }
83
+ }
84
+ }
85
+
86
+ exit: Transition {
87
+ ParallelAnimation {
88
+ NumberAnimation {
89
+ target: root
90
+ property: "opacity"
91
+ from: 1
92
+ to: 0
93
+ duration: 100
94
+ easing.type: Easing.InOutQuart
95
+ }
96
+ NumberAnimation {
97
+ target: root
98
+ property: "scale"
99
+ from: 1
100
+ to: 1.1
101
+ duration: Utils.animationSpeedMiddle
102
+ easing.type: Easing.OutQuint
103
+ }
104
+ }
105
+ }
106
+ }
@@ -1,47 +1,47 @@
1
- import QtQuick 2.15
2
- import QtQuick.Controls 2.15
3
- import QtQuick.Layouts 2.15
4
- import "../../components"
5
-
6
-
7
- DialogButtonBox {
8
- id: buttonBox
9
-
10
- implicitWidth: 320
11
-
12
- background: Rectangle {
13
- anchors.fill: parent
14
- color: Theme.currentTheme.colors.backgroundColor
15
- border.color: Theme.currentTheme.colors.windowBorderColor
16
- radius: Theme.currentTheme.appearance.windowRadius
17
-
18
- Rectangle {
19
- anchors.top: parent.top
20
- anchors.left: parent.left
21
- anchors.right: parent.right
22
- anchors.margins: 1
23
- height: parent.radius
24
- color: parent.color
25
- }
26
- }
27
-
28
- padding: 24
29
- spacing: 8
30
-
31
- alignment: undefined
32
-
33
- contentItem: RowLayout {
34
- spacing: buttonBox.spacing
35
-
36
- Repeater {
37
- model: buttonBox.contentModel
38
- }
39
- }
40
-
41
- delegate: Button {
42
- Layout.alignment: Qt.AlignRight
43
- Layout.preferredWidth: buttonBox.availableWidth / 2
44
- Layout.fillWidth: !(buttonBox.count === 1)
45
- highlighted: DialogButtonBox.buttonRole === DialogButtonBox.AcceptRole // 高亮
46
- }
47
- }
1
+ import QtQuick 2.15
2
+ import QtQuick.Controls 2.15
3
+ import QtQuick.Layouts 2.15
4
+ import "../../components"
5
+
6
+
7
+ DialogButtonBox {
8
+ id: buttonBox
9
+
10
+ implicitWidth: 320
11
+
12
+ background: Rectangle {
13
+ anchors.fill: parent
14
+ color: Theme.currentTheme.colors.backgroundColor
15
+ border.color: Theme.currentTheme.colors.windowBorderColor
16
+ radius: Theme.currentTheme.appearance.windowRadius
17
+
18
+ Rectangle {
19
+ anchors.top: parent.top
20
+ anchors.left: parent.left
21
+ anchors.right: parent.right
22
+ anchors.margins: 1
23
+ height: parent.radius
24
+ color: parent.color
25
+ }
26
+ }
27
+
28
+ padding: 24
29
+ spacing: 8
30
+
31
+ alignment: undefined
32
+
33
+ contentItem: RowLayout {
34
+ spacing: buttonBox.spacing
35
+
36
+ Repeater {
37
+ model: buttonBox.contentModel
38
+ }
39
+ }
40
+
41
+ delegate: Button {
42
+ Layout.alignment: Qt.AlignRight
43
+ Layout.preferredWidth: buttonBox.availableWidth / 2
44
+ Layout.fillWidth: !(buttonBox.count === 1)
45
+ highlighted: DialogButtonBox.buttonRole === DialogButtonBox.AcceptRole // 高亮
46
+ }
47
+ }
@@ -1,144 +1,87 @@
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
- Popup {
9
- id: flyout
10
- property string text: "Flyout"
11
- property alias buttonBox: buttonLayout.data // 按钮列表
12
- property string image: "" // 图片
13
- property real maximumWidth: 350 // 最大宽度
14
-
15
- position: Position.Top
16
-
17
- padding: 16
18
-
19
- // 坐标
20
-
21
- contentItem: ColumnLayout {
22
- spacing: 0
23
-
24
- Image {
25
- id: flyoutImg
26
- Layout.fillWidth: true
27
- Layout.maximumWidth: maximumWidth
28
- Layout.margins: -flyout.padding + 2
29
- Layout.bottomMargin: 0
30
- Layout.preferredHeight: width * (sourceSize.height / sourceSize.width)
31
- fillMode: Image.PreserveAspectCrop
32
- source: flyout.image
33
- visible: flyout.image !== ""
34
-
35
- layer.enabled: true
36
- layer.smooth: true
37
- layer.effect: OpacityMask {
38
- maskSource: Rectangle {
39
- width: flyoutImg.width
40
- height: flyoutImg.height
41
- radius: background.radius
42
- color: "black"
43
-
44
- Rectangle {
45
- anchors.bottom: parent.bottom
46
- width: parent.width
47
- height: background.radius
48
- color: "black"
49
- }
50
- }
51
- }
52
- }
53
-
54
- Item {
55
- height: 16
56
- visible: flyoutImg.visible
57
- }
58
-
59
- Text {
60
- id: flyoutText
61
- Layout.fillWidth: true
62
- Layout.maximumWidth: maximumWidth
63
- typography: Typography.Body
64
- text: flyout.text
65
- }
66
-
67
- Item {
68
- height: 16
69
- visible: buttonLayout.children.length > 0
70
- }
71
-
72
- RowLayout {
73
- Layout.fillWidth: true
74
- id: buttonLayout
75
- spacing: 8
76
- }
77
- }
78
-
79
- // background: Rectangle {
80
- // id: background
81
- // anchors.fill: parent
82
- // anchors.horizontalCenter: parent.horizontalCenter
83
- // y: -6
84
- //
85
- // radius: Theme.currentTheme.appearance.windowRadius
86
- // color: Theme.currentTheme.colors.backgroundAcrylicColor
87
- // border.color: Theme.currentTheme.colors.flyoutBorderColor
88
- //
89
- // Behavior on color {
90
- // ColorAnimation {
91
- // duration: Utils.appearanceSpeed
92
- // easing.type: Easing.OutQuart
93
- // }
94
- // }
95
- //
96
- // layer.enabled: true
97
- // layer.effect: Shadow {
98
- // style: "flyout"
99
- // source: background
100
- // }
101
- // }
102
-
103
- // 动画 / Animation //
104
- enter: Transition {
105
- ParallelAnimation {
106
- NumberAnimation {
107
- target: flyout
108
- property: "opacity"
109
- from: 0
110
- to: 1
111
- duration: Utils.appearanceSpeed
112
- easing.type: Easing.OutQuint
113
- }
114
- NumberAnimation {
115
- target: flyout
116
- property: "y"
117
- from: posY + (position === Position.Top ? 15 : position === Position.Bottom ? -15 : 0)
118
- to: posY
119
- duration: Utils.animationSpeedMiddle * 1.25
120
- easing.type: Easing.OutQuint
121
- }
122
- NumberAnimation {
123
- target: flyout
124
- property: "x"
125
- from: posX + (position === Position.Left ? 15 : position === Position.Right ? -15 : 0)
126
- to: posX
127
- duration: Utils.animationSpeedMiddle * 1.25
128
- easing.type: Easing.OutQuint
129
- }
130
- }
131
- }
132
- exit: Transition {
133
- ParallelAnimation {
134
- NumberAnimation {
135
- target: flyout
136
- property: "opacity"
137
- from: 1
138
- to: 0
139
- duration: Utils.animationSpeed
140
- easing.type: Easing.OutQuint
141
- }
142
- }
143
- }
144
- }
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
+ Popup {
9
+ id: flyout
10
+ property alias text: flyoutText.text // 弹出文本内容
11
+ property alias buttonBox: buttonLayout.data // 按钮列表
12
+ default property alias content: customContent.data // 弹出内容
13
+
14
+ position: Position.Top
15
+
16
+ padding: 16
17
+
18
+ contentItem: ColumnLayout {
19
+ spacing: 0
20
+
21
+ ColumnLayout {
22
+ id: customContent
23
+ spacing: 8
24
+ Layout.fillWidth: true
25
+
26
+ Text {
27
+ id: flyoutText
28
+ Layout.fillWidth: true
29
+ typography: Typography.Body
30
+ visible: text.length > 0
31
+ }
32
+ }
33
+
34
+ Item {
35
+ height: 16
36
+ visible: buttonLayout.children.length > 0
37
+ }
38
+
39
+ RowLayout {
40
+ Layout.fillWidth: true
41
+ id: buttonLayout
42
+ spacing: 8
43
+ }
44
+ }
45
+
46
+ // 动画 / Animation //
47
+ enter: Transition {
48
+ ParallelAnimation {
49
+ NumberAnimation {
50
+ target: flyout
51
+ property: "opacity"
52
+ from: 0
53
+ to: 1
54
+ duration: Utils.appearanceSpeed
55
+ easing.type: Easing.OutQuint
56
+ }
57
+ NumberAnimation {
58
+ target: flyout
59
+ property: "y"
60
+ from: posY + (position === Position.Top ? 15 : position === Position.Bottom ? -15 : 0)
61
+ to: posY
62
+ duration: Utils.animationSpeedMiddle * 1.25
63
+ easing.type: Easing.OutQuint
64
+ }
65
+ NumberAnimation {
66
+ target: flyout
67
+ property: "x"
68
+ from: posX + (position === Position.Left ? 15 : position === Position.Right ? -15 : 0)
69
+ to: posX
70
+ duration: Utils.animationSpeedMiddle * 1.25
71
+ easing.type: Easing.OutQuint
72
+ }
73
+ }
74
+ }
75
+ exit: Transition {
76
+ ParallelAnimation {
77
+ NumberAnimation {
78
+ target: flyout
79
+ property: "opacity"
80
+ from: 1
81
+ to: 0
82
+ duration: Utils.animationSpeed
83
+ easing.type: Easing.OutQuint
84
+ }
85
+ }
86
+ }
87
+ }