RinUI 0.0.11__tar.gz → 0.1.0__tar.gz

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 (124) hide show
  1. {rinui-0.0.11/RinUI.egg-info → rinui-0.1.0}/PKG-INFO +4 -1
  2. {rinui-0.0.11 → rinui-0.1.0}/README.md +3 -0
  3. {rinui-0.0.11 → rinui-0.1.0}/RinUI/__init__.py +1 -1
  4. rinui-0.1.0/RinUI/__pycache__/__init__.cpython-38.pyc +0 -0
  5. rinui-0.1.0/RinUI/assets/img/default_app_icon.png +0 -0
  6. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/BasicInput/Button.qml +1 -2
  7. rinui-0.1.0/RinUI/components/DialogsAndFlyouts/Flyout.qml +87 -0
  8. rinui-0.1.0/RinUI/components/Media/Avatar.qml +83 -0
  9. rinui-0.1.0/RinUI/components/Navigation/Segmented.qml +17 -0
  10. rinui-0.1.0/RinUI/components/Navigation/SegmentedItem.qml +108 -0
  11. rinui-0.1.0/RinUI/components/Navigation/SelectorBar.qml +13 -0
  12. rinui-0.1.0/RinUI/components/Navigation/SelectorBarItem.qml +89 -0
  13. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/qmldir +3 -0
  14. {rinui-0.0.11 → rinui-0.1.0}/RinUI/qmldir +7 -0
  15. {rinui-0.0.11 → rinui-0.1.0}/RinUI/themes/dark.qml +9 -0
  16. {rinui-0.0.11 → rinui-0.1.0}/RinUI/themes/light.qml +10 -1
  17. {rinui-0.0.11 → rinui-0.1.0}/RinUI/windows/TitleBar.qml +2 -2
  18. {rinui-0.0.11 → rinui-0.1.0/RinUI.egg-info}/PKG-INFO +4 -1
  19. {rinui-0.0.11 → rinui-0.1.0}/RinUI.egg-info/SOURCES.txt +5 -0
  20. {rinui-0.0.11 → rinui-0.1.0}/pyproject.toml +2 -2
  21. rinui-0.0.11/RinUI/__pycache__/__init__.cpython-38.pyc +0 -0
  22. rinui-0.0.11/RinUI/assets/img/default_app_icon.png +0 -0
  23. rinui-0.0.11/RinUI/components/DialogsAndFlyouts/Flyout.qml +0 -144
  24. rinui-0.0.11/RinUI/components/Navigation/SelectorBar.qml +0 -58
  25. {rinui-0.0.11 → rinui-0.1.0}/LICENSE +0 -0
  26. {rinui-0.0.11 → rinui-0.1.0}/MANIFEST.in +0 -0
  27. {rinui-0.0.11 → rinui-0.1.0}/RinUI/assets/fonts/FluentSystemIcons-Index.js +0 -0
  28. {rinui-0.0.11 → rinui-0.1.0}/RinUI/assets/fonts/FluentSystemIcons-Resizable.ttf +0 -0
  29. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/Base.qml +0 -0
  30. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/BasicInput/CheckBox.qml +0 -0
  31. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/BasicInput/ComboBox.qml +0 -0
  32. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/BasicInput/DropDownButton.qml +0 -0
  33. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/BasicInput/Hyperlink.qml +0 -0
  34. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/BasicInput/PillButton.qml +0 -0
  35. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/BasicInput/RadioButton.qml +0 -0
  36. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/BasicInput/RoundButton.qml +0 -0
  37. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/BasicInput/Slider.qml +0 -0
  38. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/BasicInput/Switch.qml +0 -0
  39. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/BasicInput/ToggleButton.qml +0 -0
  40. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/BasicInput/ToolButton.qml +0 -0
  41. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/ContextMenu.qml +0 -0
  42. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/DateAndTime/DatePicker.qml +0 -0
  43. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/DateAndTime/PickerView.qml +0 -0
  44. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/DateAndTime/TimePicker.qml +0 -0
  45. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/DialogsAndFlyouts/Dialog.qml +0 -0
  46. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/DialogsAndFlyouts/DialogButtonBox.qml +0 -0
  47. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/DialogsAndFlyouts/Popup.qml +0 -0
  48. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/FocusIndicator.qml +0 -0
  49. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/IconWidget.qml +0 -0
  50. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/Indicator.qml +0 -0
  51. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/Layout/Expander.qml +0 -0
  52. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/Layout/SettingExpander.qml +0 -0
  53. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/Layout/SettingItem.qml +0 -0
  54. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/ListAndCollections/Clip.qml +0 -0
  55. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/ListAndCollections/Frame.qml +0 -0
  56. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/ListAndCollections/ListView.qml +0 -0
  57. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/ListAndCollections/ListViewDelegate.qml +0 -0
  58. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/ListAndCollections/SettingCard.qml +0 -0
  59. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/ListAndCollections/TableView.qml +0 -0
  60. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/ListAndCollections/TableViewDelegate.qml +0 -0
  61. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/MenusAndToolbars/Menu.qml +0 -0
  62. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/MenusAndToolbars/MenuBar.qml +0 -0
  63. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/MenusAndToolbars/MenuItem.qml +0 -0
  64. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/MenusAndToolbars/MenuItemGroup.qml +0 -0
  65. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/MenusAndToolbars/MenuSeparator.qml +0 -0
  66. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/MenusAndToolbars/TextInputMenu.qml +0 -0
  67. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/MenusAndToolbars/ToolSeparator.qml +0 -0
  68. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/Navigation/ErrorPage.qml +0 -0
  69. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/Navigation/NavigationBar.qml +0 -0
  70. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/Navigation/NavigationItem.qml +0 -0
  71. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/Navigation/NavigationSubItem.qml +0 -0
  72. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/Navigation/NavigationView.qml +0 -0
  73. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/ScrollBar.qml +0 -0
  74. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/ScrollView.qml +0 -0
  75. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/Shadow.qml +0 -0
  76. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/StatusAndInfo/InfoBadge.qml +0 -0
  77. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/StatusAndInfo/InfoBar.qml +0 -0
  78. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/StatusAndInfo/ProgressBar.qml +0 -0
  79. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/StatusAndInfo/Toast.qml +0 -0
  80. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/StatusAndInfo/ToolTip.qml +0 -0
  81. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/Text/SpinBox.qml +0 -0
  82. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/Text/Text.qml +0 -0
  83. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/Text/TextArea.qml +0 -0
  84. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/Text/TextField.qml +0 -0
  85. {rinui-0.0.11 → rinui-0.1.0}/RinUI/components/Text/TextInput.qml +0 -0
  86. {rinui-0.0.11 → rinui-0.1.0}/RinUI/config/rin_ui.json +0 -0
  87. {rinui-0.0.11 → rinui-0.1.0}/RinUI/core/__init__.py +0 -0
  88. {rinui-0.0.11 → rinui-0.1.0}/RinUI/core/__pycache__/__init__.cpython-38.pyc +0 -0
  89. {rinui-0.0.11 → rinui-0.1.0}/RinUI/core/__pycache__/config.cpython-38.pyc +0 -0
  90. {rinui-0.0.11 → rinui-0.1.0}/RinUI/core/__pycache__/launcher.cpython-38.pyc +0 -0
  91. {rinui-0.0.11 → rinui-0.1.0}/RinUI/core/__pycache__/theme.cpython-38.pyc +0 -0
  92. {rinui-0.0.11 → rinui-0.1.0}/RinUI/core/__pycache__/translator.cpython-38.pyc +0 -0
  93. {rinui-0.0.11 → rinui-0.1.0}/RinUI/core/config.py +0 -0
  94. {rinui-0.0.11 → rinui-0.1.0}/RinUI/core/launcher.py +0 -0
  95. {rinui-0.0.11 → rinui-0.1.0}/RinUI/core/theme.py +0 -0
  96. {rinui-0.0.11 → rinui-0.1.0}/RinUI/core/translator.py +0 -0
  97. {rinui-0.0.11 → rinui-0.1.0}/RinUI/hooks/__init__.py +0 -0
  98. {rinui-0.0.11 → rinui-0.1.0}/RinUI/hooks/hook-RinUI.py +0 -0
  99. {rinui-0.0.11 → rinui-0.1.0}/RinUI/languages/en_US.qm +0 -0
  100. {rinui-0.0.11 → rinui-0.1.0}/RinUI/languages/en_US.ts +0 -0
  101. {rinui-0.0.11 → rinui-0.1.0}/RinUI/languages/zh_CN.qm +0 -0
  102. {rinui-0.0.11 → rinui-0.1.0}/RinUI/languages/zh_CN.ts +0 -0
  103. {rinui-0.0.11 → rinui-0.1.0}/RinUI/themes/qmldir +0 -0
  104. {rinui-0.0.11 → rinui-0.1.0}/RinUI/themes/theme.qml +0 -0
  105. {rinui-0.0.11 → rinui-0.1.0}/RinUI/themes/utils.qml +0 -0
  106. {rinui-0.0.11 → rinui-0.1.0}/RinUI/utils/Animation.qml +0 -0
  107. {rinui-0.0.11 → rinui-0.1.0}/RinUI/utils/FloatLayer.qml +0 -0
  108. {rinui-0.0.11 → rinui-0.1.0}/RinUI/utils/FontIconLoader.qml +0 -0
  109. {rinui-0.0.11 → rinui-0.1.0}/RinUI/utils/Position.qml +0 -0
  110. {rinui-0.0.11 → rinui-0.1.0}/RinUI/utils/Severity.qml +0 -0
  111. {rinui-0.0.11 → rinui-0.1.0}/RinUI/utils/Typography.qml +0 -0
  112. {rinui-0.0.11 → rinui-0.1.0}/RinUI/utils/qmldir +0 -0
  113. {rinui-0.0.11 → rinui-0.1.0}/RinUI/windows/CtrlBtn.qml +0 -0
  114. {rinui-0.0.11 → rinui-0.1.0}/RinUI/windows/FluentPage.qml +0 -0
  115. {rinui-0.0.11 → rinui-0.1.0}/RinUI/windows/FluentWindow.qml +0 -0
  116. {rinui-0.0.11 → rinui-0.1.0}/RinUI/windows/FluentWindowBase.qml +0 -0
  117. {rinui-0.0.11 → rinui-0.1.0}/RinUI/windows/qmldir +0 -0
  118. {rinui-0.0.11 → rinui-0.1.0}/RinUI/windows/window/ApplicationWindow.qml +0 -0
  119. {rinui-0.0.11 → rinui-0.1.0}/RinUI/windows/window/Window.qml +0 -0
  120. {rinui-0.0.11 → rinui-0.1.0}/RinUI.egg-info/dependency_links.txt +0 -0
  121. {rinui-0.0.11 → rinui-0.1.0}/RinUI.egg-info/entry_points.txt +0 -0
  122. {rinui-0.0.11 → rinui-0.1.0}/RinUI.egg-info/requires.txt +0 -0
  123. {rinui-0.0.11 → rinui-0.1.0}/RinUI.egg-info/top_level.txt +0 -0
  124. {rinui-0.0.11 → rinui-0.1.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: RinUI
3
- Version: 0.0.11
3
+ Version: 0.1.0
4
4
  Summary: A Fluent Design-like UI library for Qt Quick (QML) based on PySide6
5
5
  Author-email: RinLit <lintu233_qwq@icloud.com>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -14,6 +14,7 @@ Requires-Dist: darkdetect~=0.8.0
14
14
  Requires-Dist: pywin32>=306; sys_platform == "win32"
15
15
 
16
16
  <div align="center">
17
+ <img src="docs/img/logo.png" alt="RinUI Logo" width="18%">
17
18
  <h1>RinUI</h1>
18
19
  <p>A Fluent Design-like UI library for Qt Quick (QML)</p>
19
20
 
@@ -52,6 +53,8 @@ With simple configuration, you can quickly develop elegant UI interfaces in the
52
53
  ![img_3.png](/docs/img/img_3.png)
53
54
  </details>
54
55
 
56
+ > The image in the banner comes from Pixiv, PID: [125975786](https://www.pixiv.net/artworks/125975786)
57
+
55
58
  ## 🪄 Usage
56
59
 
57
60
  You can install RinUI via pip:
@@ -1,4 +1,5 @@
1
1
  <div align="center">
2
+ <img src="docs/img/logo.png" alt="RinUI Logo" width="18%">
2
3
  <h1>RinUI</h1>
3
4
  <p>A Fluent Design-like UI library for Qt Quick (QML)</p>
4
5
 
@@ -37,6 +38,8 @@ With simple configuration, you can quickly develop elegant UI interfaces in the
37
38
  ![img_3.png](/docs/img/img_3.png)
38
39
  </details>
39
40
 
41
+ > The image in the banner comes from Pixiv, PID: [125975786](https://www.pixiv.net/artworks/125975786)
42
+
40
43
  ## 🪄 Usage
41
44
 
42
45
  You can install RinUI via pip:
@@ -1,4 +1,4 @@
1
1
  from .core import *
2
2
 
3
- __version__ = "0.0.11"
3
+ __version__ = "0.1.0"
4
4
  __author__ = "RinLit"
@@ -82,10 +82,9 @@ Button {
82
82
  anchors.centerIn: parent
83
83
  IconWidget {
84
84
  id: iconWidget
85
- size: icon || source ? text.font.pixelSize * 1.25 : 0 // 图标大小 / Icon Size
85
+ size: icon || source ? text.font.pixelSize * 1.3 : 0 // 图标大小 / Icon Size
86
86
  icon: root.icon.name
87
87
  source: root.icon.source
88
- height: parent.height
89
88
  y: 0.25
90
89
  color: icon.color ? icon.color : highlighted ? flat ?
91
90
  enabled ? Theme.currentTheme.colors.textAccentColor : Theme.currentTheme.colors.textColor :
@@ -0,0 +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 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
+ }
@@ -0,0 +1,83 @@
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
+ Item {
9
+ id: root
10
+ property int size: 96
11
+ property string source: ""
12
+ property string text
13
+ property alias icon: icon.icon
14
+
15
+ implicitWidth: size
16
+ implicitHeight: size
17
+ opacity: enabled ? 1 : 0.4
18
+
19
+ Rectangle {
20
+ id: background
21
+ anchors.fill: parent
22
+ color: Theme.currentTheme.colors.controlQuaternaryColor
23
+ border.color: Theme.currentTheme.colors.cardBorderColor
24
+ radius: size / 2
25
+
26
+ // 图标
27
+ IconWidget {
28
+ id: icon
29
+ anchors.centerIn: parent
30
+ icon: "ic_fluent_person_20_regular"
31
+ size: root.size * 0.5
32
+ source: root.source
33
+
34
+ visible: root.source === "" && root.text === ""
35
+ }
36
+
37
+ // 文本
38
+ Text {
39
+ id: textLabel
40
+ anchors.centerIn: parent
41
+ font.pixelSize: size * 0.41
42
+ font.bold: true
43
+ text: {
44
+ let text_list = root.text.split(" ")
45
+ let result = ""
46
+ for (let i = 0; i < text_list.length; i++) {
47
+ if (text_list[i] !== "" && (i === 0 || i === text_list.length - 1)) {
48
+ result += text_list[i][0]
49
+ }
50
+ }
51
+ return result
52
+ }
53
+ visible: root.source === "" && root.text !== ""
54
+ }
55
+ }
56
+
57
+ Image {
58
+ id: image
59
+ source: root.source
60
+ anchors.fill: parent
61
+ fillMode: Image.PreserveAspectCrop
62
+ smooth: true
63
+ clip: true
64
+ }
65
+
66
+ // 遮罩
67
+ layer.enabled: true
68
+ layer.effect: OpacityMask {
69
+ maskSource: Rectangle {
70
+ width: root.width
71
+ height: root.height
72
+ radius: background.radius
73
+ }
74
+ }
75
+
76
+ // 动画
77
+ Behavior on opacity {
78
+ NumberAnimation {
79
+ duration: Utils.appearanceSpeed
80
+ easing.type: Easing.InOutQuint
81
+ }
82
+ }
83
+ }
@@ -0,0 +1,17 @@
1
+ import QtQuick 2.15
2
+ import QtQuick.Controls 2.15
3
+ import QtQuick.Layouts 2.15
4
+ import "../../components"
5
+ import "../../themes"
6
+
7
+ TabBar {
8
+ id: root
9
+ implicitWidth: contentWidth
10
+
11
+ background: Rectangle {
12
+ border.width: Theme.currentTheme.appearance.borderWidth // 边框宽度 / Border Width
13
+ border.color: Theme.currentTheme.colors.controlBorderColor
14
+ radius: Theme.currentTheme.appearance.buttonRadius
15
+ color: Theme.currentTheme.colors.controlAltSecondaryColor
16
+ }
17
+ }
@@ -0,0 +1,108 @@
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: Rectangle {
15
+ id: background
16
+ anchors.centerIn: parent
17
+ width: checked ? parent.width : parent.width - 4*2
18
+ height: checked ? parent.height : parent.height - 3*2
19
+
20
+ color: checked ? Theme.currentTheme.colors.controlFillColor :
21
+ hovered ? Theme.currentTheme.colors.subtleSecondaryColor : Theme.currentTheme.colors.subtleColor
22
+ radius: Theme.currentTheme.appearance.smallRadius
23
+
24
+ border.width: Theme.currentTheme.appearance.borderWidth // 边框宽度 / Border Width
25
+ border.color: checked ? Theme.currentTheme.colors.controlBorderColor : "transparent"
26
+
27
+ Behavior on scale {
28
+ NumberAnimation {
29
+ duration: Utils.animationSpeed
30
+ easing.type: Easing.OutQuart
31
+ }
32
+ }
33
+ }
34
+
35
+ Behavior on opacity {
36
+ NumberAnimation {
37
+ duration: Utils.animationSpeed
38
+ easing.type: Easing.InOutQuint
39
+ }
40
+ }
41
+
42
+ contentItem: Item {
43
+ clip: true
44
+ anchors.fill: parent
45
+
46
+ Row {
47
+ id: row
48
+ spacing: 8
49
+ anchors.centerIn: parent
50
+ IconWidget {
51
+ id: iconWidget
52
+ size: icon || source ? text.font.pixelSize * 1.3 : 0 // 图标大小 / Icon Size
53
+ icon: root.icon.name
54
+ source: root.icon.source
55
+ y: 0.25
56
+ }
57
+
58
+ Text {
59
+ id: text
60
+ typography: Typography.Body
61
+ text: root.text
62
+ color: Theme.currentTheme.colors.textColor
63
+ }
64
+ }
65
+
66
+ Indicator {
67
+ anchors {
68
+ bottom: parent.bottom
69
+ bottomMargin: Theme.currentTheme.appearance.borderWidth
70
+ horizontalCenter: parent.horizontalCenter
71
+ }
72
+ visible: root.checked
73
+ orientation: Qt.Horizontal
74
+ }
75
+ }
76
+
77
+ // 状态变化
78
+ states: [
79
+ State {
80
+ name: "disabled"
81
+ when: !enabled
82
+ PropertyChanges {
83
+ target: root
84
+ opacity: 0.65
85
+ }
86
+ },
87
+ State {
88
+ name: "pressed"
89
+ when: pressed
90
+ PropertyChanges {
91
+ target: root;
92
+ opacity: 0.67
93
+ }
94
+ PropertyChanges {
95
+ target: background;
96
+ scale: 0.95
97
+ }
98
+ },
99
+ State {
100
+ name: "hovered"
101
+ when: hovered
102
+ PropertyChanges {
103
+ target: root;
104
+ opacity: 0.875
105
+ }
106
+ }
107
+ ]
108
+ }
@@ -0,0 +1,13 @@
1
+ import QtQuick 2.15
2
+ import QtQuick.Controls 2.15
3
+ import QtQuick.Layouts 2.15
4
+ import "../../components"
5
+ import "../../themes"
6
+
7
+
8
+ TabBar {
9
+ id: root
10
+ implicitWidth: contentWidth
11
+
12
+ background: Item {}
13
+ }
@@ -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
+ }
@@ -22,6 +22,9 @@ ToolButton 1.0 BasicInput/ToolButton.qml
22
22
  Switch 1.0 BasicInput/Switch.qml
23
23
  RadioButton 1.0 BasicInput/RadioButton.qml
24
24
 
25
+ # Media
26
+ Avatar 1.0 Media/Avatar.qml
27
+
25
28
  # Date & Time
26
29
  PickerView 1.0 DateAndTime/PickerView.qml
27
30
  # TimePicker 1.0 DateAndTime/TimePicker.qml
@@ -68,10 +68,17 @@ MenuSeparator 1.0 components/MenusAndToolbars/MenuSeparator.qml
68
68
  ToolSeparator 1.0 components/MenusAndToolbars/ToolSeparator.qml
69
69
  MenuBar 1.0 components/MenusAndToolbars/MenuBar.qml
70
70
 
71
+ # Media
72
+ Avatar 1.0 components/Media/Avatar.qml
73
+
71
74
  # Navigation
72
75
  NavigationView 1.0 components/Navigation/NavigationView.qml
73
76
  NavigationBar 1.0 components/Navigation/NavigationBar.qml
74
77
  SelectorBar 1.0 components/Navigation/SelectorBar.qml
78
+ SelectorBarItem 1.0 components/Navigation/SelectorBarItem.qml
79
+ Segmented 1.0 components/Navigation/Segmented.qml
80
+ SegmentedItem 1.0 components/Navigation/SegmentedItem.qml
81
+
75
82
 
76
83
  # Window
77
84
  ApplicationWindow 1.0 windows/window/ApplicationWindow.qml
@@ -16,6 +16,15 @@ QtObject {
16
16
  property color controlStrongColor: Qt.alpha("#ffffff", 0.5442)
17
17
  property color controlInputActiveColor: Qt.alpha("#1E1E1E", 0.7)
18
18
 
19
+ property color controlAltSecondaryColor: Qt.alpha("#000000", 0.1)
20
+ property color controlAltTertiaryColor: Qt.alpha("#ffffff", 0.0419)
21
+ property color controlAltQuaternaryColor: Qt.alpha("#ffffff", 0.0698)
22
+
23
+ property color controlFillColor: Qt.alpha("#ffffff", 0.0605)
24
+ property color controlFillSecondaryColor: Qt.alpha("#ffffff", 0.0837)
25
+ property color controlFillTertiaryColor: Qt.alpha("#ffffff", 0.0326)
26
+ property color controlFillQuaternaryColor: Qt.alpha("#ffffff", 0.0605)
27
+
19
28
  property color controlBorderColor: Qt.alpha("#ffffff", 0.09)
20
29
  property color controlBottomBorderColor: Qt.alpha("#000000", 0.03)
21
30
  property color controlAccentBottomBorderColor: Qt.alpha("#000000", 0.14)
@@ -16,6 +16,15 @@ QtObject {
16
16
  property color controlStrongColor: Qt.alpha("#000000", 0.4458)
17
17
  property color controlInputActiveColor: "#ffffff"
18
18
 
19
+ property color controlAltSecondaryColor: Qt.alpha("#000000", 0.0241)
20
+ property color controlAltTertiaryColor: Qt.alpha("#000000", 0.0578)
21
+ property color controlAltQuaternaryColor: Qt.alpha("#000000", 0.0924)
22
+
23
+ property color controlFillColor: Qt.alpha("#ffffff", 0.7)
24
+ property color controlFillSecondaryColor: Qt.alpha("#F9F9F9", 0.5)
25
+ property color controlFillTertiaryColor: Qt.alpha("#F9F9F9", 0.3)
26
+ property color controlFillQuaternaryColor: Qt.alpha("#F3F3F3", 0.76)
27
+
19
28
  property color controlBorderColor: Qt.alpha("#000000", 0.06)
20
29
  property color controlBottomBorderColor: Qt.alpha("#000000", 0.16)
21
30
  property color controlAccentBottomBorderColor: Qt.alpha("#000000", 0.4)
@@ -43,7 +52,7 @@ QtObject {
43
52
  property color backgroundAcrylicColor: "#F9F9F9"
44
53
  property color backgroundSmokeColor: Qt.alpha("#000000", 0.3)
45
54
 
46
- property color subtleColor: "transparent"
55
+ property color subtleColor: Qt.alpha("#ffffff", 0)
47
56
  property color subtleSecondaryColor: Qt.alpha("#000000", 0.0373)
48
57
  property color subtleTertiaryColor: Qt.alpha("#000000", 0.0241)
49
58
  property color captionCloseColor: "#c42b1c"
@@ -58,7 +58,7 @@ Item {
58
58
  onPressed: {
59
59
  clickPos = Qt.point(mouseX, mouseY)
60
60
 
61
- if (!(Qt.platform.os !== "windows" || Qt.platform.os !== "winrt") && !Theme.isThemeMgrInitialized()) {
61
+ if (!(Qt.platform.os !== "windows" || Qt.platform.os !== "winrt") && !Theme._isThemeMgrInitialized()) {
62
62
  return // 在win环境使用原生方法拖拽
63
63
  }
64
64
  Theme.sendDragWindowEvent(window)
@@ -69,7 +69,7 @@ Item {
69
69
  return
70
70
  }
71
71
 
72
- if ((Qt.platform.os !== "windows" || Qt.platform.os !== "winrt") && Theme.isThemeMgrInitialized()) {
72
+ if ((Qt.platform.os !== "windows" || Qt.platform.os !== "winrt") && Theme._isThemeMgrInitialized()) {
73
73
  return // 在win环境使用原生方法拖拽
74
74
  }
75
75
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: RinUI
3
- Version: 0.0.11
3
+ Version: 0.1.0
4
4
  Summary: A Fluent Design-like UI library for Qt Quick (QML) based on PySide6
5
5
  Author-email: RinLit <lintu233_qwq@icloud.com>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -14,6 +14,7 @@ Requires-Dist: darkdetect~=0.8.0
14
14
  Requires-Dist: pywin32>=306; sys_platform == "win32"
15
15
 
16
16
  <div align="center">
17
+ <img src="docs/img/logo.png" alt="RinUI Logo" width="18%">
17
18
  <h1>RinUI</h1>
18
19
  <p>A Fluent Design-like UI library for Qt Quick (QML)</p>
19
20
 
@@ -52,6 +53,8 @@ With simple configuration, you can quickly develop elegant UI interfaces in the
52
53
  ![img_3.png](/docs/img/img_3.png)
53
54
  </details>
54
55
 
56
+ > The image in the banner comes from Pixiv, PID: [125975786](https://www.pixiv.net/artworks/125975786)
57
+
55
58
  ## 🪄 Usage
56
59
 
57
60
  You can install RinUI via pip:
@@ -1,5 +1,6 @@
1
1
  LICENSE
2
2
  MANIFEST.in
3
+ README.MD
3
4
  README.md
4
5
  pyproject.toml
5
6
  RinUI/__init__.py
@@ -52,6 +53,7 @@ RinUI/components/ListAndCollections/ListViewDelegate.qml
52
53
  RinUI/components/ListAndCollections/SettingCard.qml
53
54
  RinUI/components/ListAndCollections/TableView.qml
54
55
  RinUI/components/ListAndCollections/TableViewDelegate.qml
56
+ RinUI/components/Media/Avatar.qml
55
57
  RinUI/components/MenusAndToolbars/Menu.qml
56
58
  RinUI/components/MenusAndToolbars/MenuBar.qml
57
59
  RinUI/components/MenusAndToolbars/MenuItem.qml
@@ -64,7 +66,10 @@ RinUI/components/Navigation/NavigationBar.qml
64
66
  RinUI/components/Navigation/NavigationItem.qml
65
67
  RinUI/components/Navigation/NavigationSubItem.qml
66
68
  RinUI/components/Navigation/NavigationView.qml
69
+ RinUI/components/Navigation/Segmented.qml
70
+ RinUI/components/Navigation/SegmentedItem.qml
67
71
  RinUI/components/Navigation/SelectorBar.qml
72
+ RinUI/components/Navigation/SelectorBarItem.qml
68
73
  RinUI/components/StatusAndInfo/InfoBadge.qml
69
74
  RinUI/components/StatusAndInfo/InfoBar.qml
70
75
  RinUI/components/StatusAndInfo/ProgressBar.qml
@@ -4,12 +4,12 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "RinUI"
7
- version = "0.0.11"
7
+ version = "0.1.0"
8
8
  authors = [
9
9
  { name = "RinLit", email = "lintu233_qwq@icloud.com" }
10
10
  ]
11
11
  description = "A Fluent Design-like UI library for Qt Quick (QML) based on PySide6"
12
- readme = "README.md"
12
+ readme = "README.MD"
13
13
  requires-python = ">=3.8"
14
14
  dependencies = [
15
15
  "PySide6>=6.6.3.1",
@@ -1,144 +0,0 @@
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,58 +0,0 @@
1
- import QtQuick 2.15
2
- import QtQuick.Controls 2.15
3
- import QtQuick.Layouts 2.15
4
- import "../../components"
5
- import "../../themes"
6
-
7
-
8
- RowLayout {
9
- id: root
10
- property var model: []
11
- property int currentIndex: -1
12
- property bool enabled: true
13
- // 自动检测模型类型
14
- readonly property string modelType: {
15
- if (!model) return "null";
16
- if (Array.isArray(model) && typeof model[0] === "object") return "array-with-role";
17
- if (Array.isArray(model)) return "array";
18
- if (model instanceof ListModel) return "listmodel";
19
- if (typeof model === "object" && "count" in model) return "listmodel-like";
20
- return "unknown";
21
- }
22
-
23
- implicitHeight: 40
24
- spacing: 0
25
-
26
- Repeater {
27
- model: root.model
28
- delegate: Button {
29
- Layout.fillWidth: true
30
- Layout.fillHeight: true
31
- Layout.preferredHeight: 40
32
- flat: true
33
-
34
- background: Item {}
35
-
36
- text: {
37
- switch (root.modelType) {
38
- case "array": return modelData;
39
- case "array-with-role": return modelData["text"] || modelData || "";
40
- case "listmodel":
41
- case "listmodel-like":
42
- return model["text"] || modelData || "";
43
- default: return "";
44
- }
45
- }
46
- icon.name: root.modelType === "array-with-role" ? modelData["icon"] : ""
47
- icon.source: root.modelType === "array-with-role" ? modelData["source"] : ""
48
-
49
- onClicked: root.currentIndex = index
50
- enabled: root.enabled
51
-
52
- Indicator {
53
- orientation: Qt.Horizontal
54
- visible: index === root.currentIndex
55
- }
56
- }
57
- }
58
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes