RinUI 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. RinUI/__init__.py +4 -4
  2. RinUI/assets/fonts/FluentSystemIcons-Index.js +5255 -5255
  3. RinUI/components/Base.qml +78 -78
  4. RinUI/components/BasicInput/Button.qml +146 -146
  5. RinUI/components/BasicInput/CheckBox.qml +98 -98
  6. RinUI/components/BasicInput/ComboBox.qml +159 -159
  7. RinUI/components/BasicInput/DropDownButton.qml +20 -20
  8. RinUI/components/BasicInput/Hyperlink.qml +17 -17
  9. RinUI/components/BasicInput/PillButton.qml +10 -10
  10. RinUI/components/BasicInput/RadioButton.qml +94 -94
  11. RinUI/components/BasicInput/RoundButton.qml +26 -26
  12. RinUI/components/BasicInput/Slider.qml +212 -212
  13. RinUI/components/BasicInput/Switch.qml +101 -101
  14. RinUI/components/BasicInput/ToggleButton.qml +10 -10
  15. RinUI/components/BasicInput/ToolButton.qml +30 -30
  16. RinUI/components/ContextMenu.qml +183 -183
  17. RinUI/components/DateAndTime/DatePicker.qml +142 -140
  18. RinUI/components/DateAndTime/PickerView.qml +223 -223
  19. RinUI/components/DateAndTime/TimePicker.qml +114 -114
  20. RinUI/components/DialogsAndFlyouts/Dialog.qml +106 -106
  21. RinUI/components/DialogsAndFlyouts/DialogButtonBox.qml +47 -47
  22. RinUI/components/DialogsAndFlyouts/Flyout.qml +87 -87
  23. RinUI/components/DialogsAndFlyouts/Popup.qml +110 -106
  24. RinUI/components/FocusIndicator.qml +33 -33
  25. RinUI/components/IconWidget.qml +52 -52
  26. RinUI/components/Indicator.qml +89 -89
  27. RinUI/components/Layout/Expander.qml +159 -159
  28. RinUI/components/Layout/SettingExpander.qml +66 -66
  29. RinUI/components/Layout/SettingItem.qml +70 -70
  30. RinUI/components/ListAndCollections/Clip.qml +21 -21
  31. RinUI/components/ListAndCollections/Frame.qml +43 -43
  32. RinUI/components/ListAndCollections/ListView.qml +104 -104
  33. RinUI/components/ListAndCollections/ListViewDelegate.qml +82 -82
  34. RinUI/components/ListAndCollections/SettingCard.qml +72 -72
  35. RinUI/components/ListAndCollections/TableView.qml +81 -81
  36. RinUI/components/ListAndCollections/TableViewDelegate.qml +88 -88
  37. RinUI/components/Media/Avatar.qml +82 -82
  38. RinUI/components/MenusAndToolbars/Menu.qml +150 -150
  39. RinUI/components/MenusAndToolbars/MenuBar.qml +42 -42
  40. RinUI/components/MenusAndToolbars/MenuItem.qml +131 -131
  41. RinUI/components/MenusAndToolbars/MenuItemGroup.qml +43 -43
  42. RinUI/components/MenusAndToolbars/MenuSeparator.qml +13 -13
  43. RinUI/components/MenusAndToolbars/TextInputMenu.qml +37 -37
  44. RinUI/components/MenusAndToolbars/ToolSeparator.qml +16 -16
  45. RinUI/components/Navigation/ErrorPage.qml +48 -48
  46. RinUI/components/Navigation/NavigationBar.qml +179 -179
  47. RinUI/components/Navigation/NavigationItem.qml +193 -193
  48. RinUI/components/Navigation/NavigationSubItem.qml +103 -103
  49. RinUI/components/Navigation/NavigationView.qml +228 -227
  50. RinUI/components/Navigation/Segmented.qml +16 -16
  51. RinUI/components/Navigation/SegmentedItem.qml +107 -107
  52. RinUI/components/Navigation/SelectorBar.qml +12 -12
  53. RinUI/components/Navigation/SelectorBarItem.qml +88 -88
  54. RinUI/components/ScrollBar.qml +204 -204
  55. RinUI/components/ScrollView.qml +12 -12
  56. RinUI/components/Shadow.qml +47 -47
  57. RinUI/components/StatusAndInfo/InfoBadge.qml +77 -77
  58. RinUI/components/StatusAndInfo/InfoBar.qml +256 -251
  59. RinUI/components/StatusAndInfo/ProgressBar.qml +126 -126
  60. RinUI/components/StatusAndInfo/ProgressRing.qml +149 -0
  61. RinUI/components/StatusAndInfo/Toast.qml +236 -236
  62. RinUI/components/StatusAndInfo/ToolTip.qml +93 -93
  63. RinUI/components/Text/SpinBox.qml +150 -133
  64. RinUI/components/Text/Text.qml +44 -44
  65. RinUI/components/Text/TextArea.qml +117 -117
  66. RinUI/components/Text/TextField.qml +113 -113
  67. RinUI/components/Text/TextInput.qml +47 -47
  68. RinUI/components/qmldir +80 -80
  69. RinUI/core/__init__.py +4 -4
  70. RinUI/core/config.py +129 -129
  71. RinUI/core/launcher.py +129 -129
  72. RinUI/core/theme.py +339 -339
  73. RinUI/core/translator.py +25 -25
  74. RinUI/hooks/__init__.py +3 -3
  75. RinUI/hooks/hook-RinUI.py +3 -3
  76. RinUI/qmldir +108 -104
  77. RinUI/themes/Appearance.qml +36 -0
  78. RinUI/themes/Colors.qml +36 -0
  79. RinUI/themes/dark.qml +145 -145
  80. RinUI/themes/light.qml +145 -145
  81. RinUI/themes/qmldir +9 -6
  82. RinUI/themes/theme.qml +151 -149
  83. RinUI/themes/utils.qml +37 -37
  84. RinUI/utils/Animation.qml +12 -12
  85. RinUI/utils/FloatLayer.qml +132 -123
  86. RinUI/utils/FontIconLoader.qml +13 -13
  87. RinUI/utils/Position.qml +19 -19
  88. RinUI/utils/Severity.qml +13 -13
  89. RinUI/utils/Typography.qml +17 -17
  90. RinUI/utils/qmldir +4 -4
  91. RinUI/windows/CtrlBtn.qml +118 -118
  92. RinUI/windows/FluentPage.qml +92 -92
  93. RinUI/windows/FluentWindow.qml +31 -30
  94. RinUI/windows/FluentWindowBase.qml +158 -158
  95. RinUI/windows/TitleBar.qml +135 -135
  96. RinUI/windows/qmldir +7 -7
  97. RinUI/windows/window/ApplicationWindow.qml +8 -8
  98. RinUI/windows/window/Window.qml +118 -118
  99. {rinui-0.1.0.data → rinui-0.1.1.data}/data/LICENSE +21 -21
  100. {rinui-0.1.0.data → rinui-0.1.1.data}/data/README.md +100 -100
  101. {rinui-0.1.0.dist-info → rinui-0.1.1.dist-info}/METADATA +116 -115
  102. rinui-0.1.1.dist-info/RECORD +112 -0
  103. {rinui-0.1.0.dist-info → rinui-0.1.1.dist-info}/WHEEL +1 -1
  104. {rinui-0.1.0.dist-info → rinui-0.1.1.dist-info/licenses}/LICENSE +21 -21
  105. RinUI/__pycache__/__init__.cpython-38.pyc +0 -0
  106. RinUI/config/rin_ui.json +0 -8
  107. RinUI/core/__pycache__/__init__.cpython-38.pyc +0 -0
  108. RinUI/core/__pycache__/config.cpython-38.pyc +0 -0
  109. RinUI/core/__pycache__/launcher.cpython-38.pyc +0 -0
  110. RinUI/core/__pycache__/theme.cpython-38.pyc +0 -0
  111. RinUI/core/__pycache__/translator.cpython-38.pyc +0 -0
  112. rinui-0.1.0.dist-info/RECORD +0 -116
  113. {rinui-0.1.0.dist-info → rinui-0.1.1.dist-info}/entry_points.txt +0 -0
  114. {rinui-0.1.0.dist-info → rinui-0.1.1.dist-info}/top_level.txt +0 -0
RinUI/core/translator.py CHANGED
@@ -1,25 +1,25 @@
1
- from PySide6.QtCore import QTranslator, QLocale
2
- from .config import RINUI_PATH
3
- import os
4
-
5
-
6
- class RinUITranslator(QTranslator):
7
- """
8
- RinUI i18n translator.
9
- :param locale: QLocale, optional, default is system locale
10
- """
11
- def __init__(self, locale: QLocale = QLocale.system().name(), parent=None): # follow system
12
- super().__init__(parent)
13
- self.load(locale or QLocale())
14
-
15
- def load(self, locale: QLocale) -> bool:
16
- """
17
- Load translation file for the given locale.
18
- :param locale: QLocale, the locale to load (eg = QLocale(QLocale.Chinese, QLocale.China), QLocale("zh_CN"))
19
- :return: bool
20
- """
21
- print(f"🌏 Current locale: {locale.name()}")
22
- path = os.path.join(RINUI_PATH, "RinUI", "languages", f"{locale.name()}.qm")
23
- if not os.path.exists(path):
24
- raise FileNotFoundError(f"Cannot find translation file: {path}")
25
- return super().load(path)
1
+ from PySide6.QtCore import QTranslator, QLocale
2
+ from .config import RINUI_PATH
3
+ import os
4
+
5
+
6
+ class RinUITranslator(QTranslator):
7
+ """
8
+ RinUI i18n translator.
9
+ :param locale: QLocale, optional, default is system locale
10
+ """
11
+ def __init__(self, locale: QLocale = QLocale.system().name(), parent=None): # follow system
12
+ super().__init__(parent)
13
+ self.load(locale or QLocale())
14
+
15
+ def load(self, locale: QLocale) -> bool:
16
+ """
17
+ Load translation file for the given locale.
18
+ :param locale: QLocale, the locale to load (eg = QLocale(QLocale.Chinese, QLocale.China), QLocale("zh_CN"))
19
+ :return: bool
20
+ """
21
+ print(f"🌏 Current locale: {locale.name()}")
22
+ path = os.path.join(RINUI_PATH, "RinUI", "languages", f"{locale.name()}.qm")
23
+ if not os.path.exists(path):
24
+ raise FileNotFoundError(f"Cannot find translation file: {path}")
25
+ return super().load(path)
RinUI/hooks/__init__.py CHANGED
@@ -1,3 +1,3 @@
1
- def get_hook_dirs():
2
- import os
3
- return [os.path.dirname(__file__)]
1
+ def get_hook_dirs():
2
+ import os
3
+ return [os.path.dirname(__file__)]
RinUI/hooks/hook-RinUI.py CHANGED
@@ -1,3 +1,3 @@
1
- from PyInstaller.utils.hooks import collect_data_files
2
-
3
- datas = collect_data_files('RinUI', include_py_files=False)
1
+ from PyInstaller.utils.hooks import collect_data_files
2
+
3
+ datas = collect_data_files('RinUI', include_py_files=False)
RinUI/qmldir CHANGED
@@ -1,105 +1,109 @@
1
- module RinUI
2
-
3
- singleton Theme 1.0 themes/theme.qml
4
- singleton Utils 1.0 themes/utils.qml
5
-
6
- Shadow 1.0 components/Shadow.qml
7
- FocusIndicator 1.0 components/FocusIndicator.qml
8
-
9
- # Basic Input
10
- Button 1.0 components/BasicInput/Button.qml
11
- RoundButton 1.0 components/BasicInput/RoundButton.qml
12
- PillButton 1.0 components/BasicInput/PillButton.qml
13
- DropDownButton 1.0 components/BasicInput/DropDownButton.qml
14
- ToggleButton 1.0 components/BasicInput/ToggleButton.qml
15
- ToolButton 1.0 components/BasicInput/ToolButton.qml
16
- ComboBox 1.0 components/BasicInput/ComboBox.qml
17
- Switch 1.0 components/BasicInput/Switch.qml
18
- Hyperlink 1.0 components/BasicInput/Hyperlink.qml
19
- RadioButton 1.0 components/BasicInput/RadioButton.qml
20
- CheckBox 1.0 components/BasicInput/CheckBox.qml
21
- Slider 1.0 components/BasicInput/Slider.qml
22
-
23
- # Date & Time
24
- TimePicker 1.0 components/DateAndTime/TimePicker.qml
25
- DatePicker 1.0 components/DateAndTime/DatePicker.qml
26
- PickerView 1.0 components/DateAndTime/PickerView.qml
27
-
28
- # Dialogs & Flyouts
29
- Dialog 1.0 components/DialogsAndFlyouts/Dialog.qml
30
- Flyout 1.0 components/DialogsAndFlyouts/Flyout.qml
31
- TeachingTip 1.0 components/DialogsAndFlyouts/TeachingTip.qml
32
-
33
- # Layout
34
- Expander 1.0 components/Layout/Expander.qml
35
- SettingExpander 1.0 components/Layout/SettingExpander.qml
36
- SettingItem 1.0 components/Layout/SettingItem.qml
37
-
38
-
39
- # Text
40
- Text 1.0 components/Text/Text.qml
41
- TextField 1.0 components/Text/TextField.qml
42
- TextArea 1.0 components/Text/TextArea.qml
43
- SpinBox 1.0 components/Text/SpinBox.qml
44
- TextInput 1.0 components/Text/TextInput.qml
45
-
46
-
47
- # Status & Info
48
- InfoBadge 1.0 components/StatusAndInfo/InfoBadge.qml
49
- InfoBar 1.0 components/StatusAndInfo/InfoBar.qml
50
- ProgressBar 1.0 components/StatusAndInfo/ProgressBar.qml
51
- ToolTip 1.0 components/StatusAndInfo/ToolTip.qml
52
-
53
- # ListAndCollections
54
- Clip 1.0 components/ListAndCollections/Clip.qml
55
- Frame 1.0 components/ListAndCollections/Frame.qml
56
- SettingCard 1.0 components/ListAndCollections/SettingCard.qml
57
- ListView 1.0 components/ListAndCollections/ListView.qml
58
- ListViewDelegate 1.0 components/ListAndCollections/ListViewDelegate.qml
59
- TableView 1.0 components/ListAndCollections/TableView.qml
60
- TableViewDelegate 1.0 components/ListAndCollections/TableViewDelegate.qml
61
-
62
- # Menus & Toolbars
63
- Menu 1.0 components/MenusAndToolbars/Menu.qml
64
- TextInputMenu 1.0 components/MenusAndToolbars/TextInputMenu.qml
65
- MenuItem 1.0 components/MenusAndToolbars/MenuItem.qml
66
- MenuItemGroup 1.0 components/MenusAndToolbars/MenuItemGroup.qml
67
- MenuSeparator 1.0 components/MenusAndToolbars/MenuSeparator.qml
68
- ToolSeparator 1.0 components/MenusAndToolbars/ToolSeparator.qml
69
- MenuBar 1.0 components/MenusAndToolbars/MenuBar.qml
70
-
71
- # Media
72
- Avatar 1.0 components/Media/Avatar.qml
73
-
74
- # Navigation
75
- NavigationView 1.0 components/Navigation/NavigationView.qml
76
- NavigationBar 1.0 components/Navigation/NavigationBar.qml
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
-
82
-
83
- # Window
84
- ApplicationWindow 1.0 windows/window/ApplicationWindow.qml
85
- Window 1.0 windows/window/Window.qml
86
-
87
-
88
- ScrollViewer 1.0 components/ScrollViewer.qml
89
- ScrollBar 1.0 components/ScrollBar.qml
90
-
91
- IconWidget 1.0 components/IconWidget.qml
92
-
93
-
94
- ContextMenu 1.0 components/ContextMenu.qml
95
-
96
- FluentWindow 1.0 windows/FluentWindow.qml
97
- FluentWindowBase 1.0 windows/FluentWindowBase.qml
98
- CtrlBtn 1.0 windows/CtrlBtn.qml
99
- FluentPage 1.0 windows/FluentPage.qml
100
-
101
- singleton Typography 1.0 utils/Typography.qml
102
- singleton Severity 1.0 utils/Severity.qml
103
- singleton Position 1.0 utils/Position.qml
104
-
1
+ module RinUI
2
+
3
+ singleton Theme 1.0 themes/theme.qml
4
+ singleton Utils 1.0 themes/utils.qml
5
+ singleton Colors 1.0 themes/Colors.qml
6
+ singleton Appearance 1.0 themes/Appearance.qml
7
+
8
+ Shadow 1.0 components/Shadow.qml
9
+ FocusIndicator 1.0 components/FocusIndicator.qml
10
+
11
+ # Basic Input
12
+ Button 1.0 components/BasicInput/Button.qml
13
+ RoundButton 1.0 components/BasicInput/RoundButton.qml
14
+ PillButton 1.0 components/BasicInput/PillButton.qml
15
+ DropDownButton 1.0 components/BasicInput/DropDownButton.qml
16
+ ToggleButton 1.0 components/BasicInput/ToggleButton.qml
17
+ ToolButton 1.0 components/BasicInput/ToolButton.qml
18
+ ComboBox 1.0 components/BasicInput/ComboBox.qml
19
+ Switch 1.0 components/BasicInput/Switch.qml
20
+ Hyperlink 1.0 components/BasicInput/Hyperlink.qml
21
+ RadioButton 1.0 components/BasicInput/RadioButton.qml
22
+ CheckBox 1.0 components/BasicInput/CheckBox.qml
23
+ Slider 1.0 components/BasicInput/Slider.qml
24
+
25
+ # Date & Time
26
+ TimePicker 1.0 components/DateAndTime/TimePicker.qml
27
+ DatePicker 1.0 components/DateAndTime/DatePicker.qml
28
+ PickerView 1.0 components/DateAndTime/PickerView.qml
29
+
30
+ # Dialogs & Flyouts
31
+ Dialog 1.0 components/DialogsAndFlyouts/Dialog.qml
32
+ Flyout 1.0 components/DialogsAndFlyouts/Flyout.qml
33
+ Popup 1.0 components/DialogsAndFlyouts/Popup.qml
34
+ TeachingTip 1.0 components/DialogsAndFlyouts/TeachingTip.qml
35
+
36
+ # Layout
37
+ Expander 1.0 components/Layout/Expander.qml
38
+ SettingExpander 1.0 components/Layout/SettingExpander.qml
39
+ SettingItem 1.0 components/Layout/SettingItem.qml
40
+
41
+
42
+ # Text
43
+ Text 1.0 components/Text/Text.qml
44
+ TextField 1.0 components/Text/TextField.qml
45
+ TextArea 1.0 components/Text/TextArea.qml
46
+ SpinBox 1.0 components/Text/SpinBox.qml
47
+ TextInput 1.0 components/Text/TextInput.qml
48
+
49
+
50
+ # Status & Info
51
+ InfoBadge 1.0 components/StatusAndInfo/InfoBadge.qml
52
+ InfoBar 1.0 components/StatusAndInfo/InfoBar.qml
53
+ ProgressBar 1.0 components/StatusAndInfo/ProgressBar.qml
54
+ ProgressRing 1.0 components/StatusAndInfo/ProgressRing.qml
55
+ ToolTip 1.0 components/StatusAndInfo/ToolTip.qml
56
+
57
+ # ListAndCollections
58
+ Clip 1.0 components/ListAndCollections/Clip.qml
59
+ Frame 1.0 components/ListAndCollections/Frame.qml
60
+ SettingCard 1.0 components/ListAndCollections/SettingCard.qml
61
+ ListView 1.0 components/ListAndCollections/ListView.qml
62
+ ListViewDelegate 1.0 components/ListAndCollections/ListViewDelegate.qml
63
+ TableView 1.0 components/ListAndCollections/TableView.qml
64
+ TableViewDelegate 1.0 components/ListAndCollections/TableViewDelegate.qml
65
+
66
+ # Menus & Toolbars
67
+ Menu 1.0 components/MenusAndToolbars/Menu.qml
68
+ TextInputMenu 1.0 components/MenusAndToolbars/TextInputMenu.qml
69
+ MenuItem 1.0 components/MenusAndToolbars/MenuItem.qml
70
+ MenuItemGroup 1.0 components/MenusAndToolbars/MenuItemGroup.qml
71
+ MenuSeparator 1.0 components/MenusAndToolbars/MenuSeparator.qml
72
+ ToolSeparator 1.0 components/MenusAndToolbars/ToolSeparator.qml
73
+ MenuBar 1.0 components/MenusAndToolbars/MenuBar.qml
74
+
75
+ # Media
76
+ Avatar 1.0 components/Media/Avatar.qml
77
+
78
+ # Navigation
79
+ NavigationView 1.0 components/Navigation/NavigationView.qml
80
+ NavigationBar 1.0 components/Navigation/NavigationBar.qml
81
+ SelectorBar 1.0 components/Navigation/SelectorBar.qml
82
+ SelectorBarItem 1.0 components/Navigation/SelectorBarItem.qml
83
+ Segmented 1.0 components/Navigation/Segmented.qml
84
+ SegmentedItem 1.0 components/Navigation/SegmentedItem.qml
85
+
86
+
87
+ # Window
88
+ ApplicationWindow 1.0 windows/window/ApplicationWindow.qml
89
+ Window 1.0 windows/window/Window.qml
90
+
91
+
92
+ ScrollViewer 1.0 components/ScrollViewer.qml
93
+ ScrollBar 1.0 components/ScrollBar.qml
94
+
95
+ IconWidget 1.0 components/IconWidget.qml
96
+
97
+
98
+ ContextMenu 1.0 components/ContextMenu.qml
99
+
100
+ FluentWindow 1.0 windows/FluentWindow.qml
101
+ FluentWindowBase 1.0 windows/FluentWindowBase.qml
102
+ CtrlBtn 1.0 windows/CtrlBtn.qml
103
+ FluentPage 1.0 windows/FluentPage.qml
104
+
105
+ singleton Typography 1.0 utils/Typography.qml
106
+ singleton Severity 1.0 utils/Severity.qml
107
+ singleton Position 1.0 utils/Position.qml
108
+
105
109
  FloatLayer 1.0 utils/FloatLayer.qml
@@ -0,0 +1,36 @@
1
+ pragma Singleton
2
+ import QtQuick 2.15
3
+ import "../themes"
4
+
5
+ QtObject {
6
+ id: root
7
+
8
+ readonly property var themeColors: Theme.currentTheme !== null && Theme.currentTheme !== undefined
9
+ ? Theme.currentTheme.appearance
10
+ : undefined
11
+
12
+ // JS Proxy 模拟动态属性访问
13
+ readonly property var proxy: (function() {
14
+ if (typeof Proxy === "undefined") {
15
+ console.warn("Proxy is not supported in this QML environment.")
16
+ return {}
17
+ }
18
+
19
+ return new Proxy({}, {
20
+ get(target, prop) {
21
+ if (root.themeColors && prop in root.themeColors) {
22
+ return root.themeColors[prop]
23
+ }
24
+ return undefined
25
+ },
26
+ has(target, prop) {
27
+ return root.themeColors && prop in root.themeColors
28
+ }
29
+ })
30
+ })()
31
+
32
+ // Sample: Appearance.get("controlColor") 或 Colors.proxy.controlColor
33
+ function get(name) {
34
+ return root.proxy[name]
35
+ }
36
+ }
@@ -0,0 +1,36 @@
1
+ pragma Singleton
2
+ import QtQuick 2.15
3
+ import "../themes"
4
+
5
+ QtObject {
6
+ id: root
7
+
8
+ readonly property var themeColors: Theme.currentTheme !== null && Theme.currentTheme !== undefined
9
+ ? Theme.currentTheme.colors
10
+ : undefined
11
+
12
+ // JS Proxy 模拟动态属性访问
13
+ readonly property var proxy: (function() {
14
+ if (typeof Proxy === "undefined") {
15
+ console.warn("Proxy is not supported in this QML environment.")
16
+ return {}
17
+ }
18
+
19
+ return new Proxy({}, {
20
+ get(target, prop) {
21
+ if (root.themeColors && prop in root.themeColors) {
22
+ return root.themeColors[prop]
23
+ }
24
+ return undefined
25
+ },
26
+ has(target, prop) {
27
+ return root.themeColors && prop in root.themeColors
28
+ }
29
+ })
30
+ })
31
+
32
+ // Sample: Appearance.get("windowRadius") 或 Appearance.proxy.windowRadius
33
+ function get(name) {
34
+ return root.proxy[name]
35
+ }
36
+ }
RinUI/themes/dark.qml CHANGED
@@ -1,146 +1,146 @@
1
-
2
- import QtQuick 2.15
3
- import "../themes"
4
-
5
- QtObject {
6
- property string name: "Dark"
7
- property bool isDark: true
8
-
9
- // Colors //
10
- property QtObject colors: QtObject {
11
- // Controls
12
- property color controlColor: Qt.alpha("#ffffff", 0.065)
13
- property color controlSecondaryColor: Qt.alpha("#ffffff", 0.1)
14
- property color controlTertiaryColor: Qt.alpha("#ffffff", 0.0419)
15
- property color controlQuaternaryColor: Qt.alpha("#ffffff", 0.0698)
16
- property color controlStrongColor: Qt.alpha("#ffffff", 0.5442)
17
- property color controlInputActiveColor: Qt.alpha("#1E1E1E", 0.7)
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
-
28
- property color controlBorderColor: Qt.alpha("#ffffff", 0.09)
29
- property color controlBottomBorderColor: Qt.alpha("#000000", 0.03)
30
- property color controlAccentBottomBorderColor: Qt.alpha("#000000", 0.14)
31
- property color controlBorderStrongColor: Qt.alpha("#ffffff", 0.6047)
32
- property color controlBorderAccentColor: Qt.alpha("#ffffff", 0.08)
33
- property color textControlBorderColor: Qt.alpha("#ffffff", 0.54)
34
- property color textControlBorderFocusedColor: Utils.primaryColor
35
- property color flyoutBorderColor: Qt.alpha("#000000", 0.2)
36
-
37
- property color controlSolidColor: "#454545"
38
- property color dividerBorderColor: Qt.alpha("#ffffff", 0.0837)
39
- // Accessibility
40
- property color focusBorderOuter: "#ffffff"
41
- property color focusBorderInner: Qt.alpha("#000000", 0.7)
42
-
43
- // Card
44
- property color cardColor: Qt.alpha("#ffffff", 0.0512)
45
- property color cardSecondaryColor: Qt.alpha("#ffffff", 0.0326)
46
- property color cardTertiaryColor: Qt.alpha("#ffffff", 0.0698)
47
- property color cardBorderColor: Qt.alpha("#000000", 0.1)
48
-
49
- // Background
50
- property color backgroundColor: "#202020"
51
- property color windowBorderColor: Qt.alpha("#757575", 0.0698)
52
- property color backgroundAcrylicColor: "#2c2c2c"
53
- property color backgroundSmokeColor: Qt.alpha("#000000", 0.3)
54
-
55
- property color subtleColor: "transparent"
56
- property color subtleSecondaryColor: Qt.alpha("#ffffff", 0.0605)
57
- property color subtleTertiaryColor: Qt.alpha("#ffffff", 0.0419)
58
- property color captionCloseColor: "#c42b1c"
59
- property color captionCloseTextColor: "#ffffff"
60
-
61
- // Layer
62
- property color layerColor: Qt.alpha("#3A3A3A", 0.3)
63
-
64
- // Text
65
- property color textColor: "#ffffff"
66
- property color textSecondaryColor: Qt.alpha("#ffffff", 0.6047)
67
- property color textAccentColor: primaryColor
68
- property color textOnAccentColor: "#000000"
69
- property color textSelectedColor: "#000000"
70
-
71
- property color primaryColor: Qt.color(Utils.primaryColor).lighter(1.6).darker(1.2)
72
- property color disabledColor: "#ffffff"
73
-
74
- // System Colors
75
- property color systemAttentionColor: primaryColor
76
- property color systemSuccessColor: "#6ccb5f"
77
- property color systemCautionColor: "#fce100"
78
- property color systemCriticalColor: "#ff99a4"
79
- property color systemNeutralColor: "#9f9f9f"
80
-
81
- property color systemAttentionBackgroundColor: "#2e2e2e"
82
- property color systemSuccessBackgroundColor: "#393d1b"
83
- property color systemCautionBackgroundColor: "#433519"
84
- property color systemCriticalBackgroundColor: "#442726"
85
- property color systemNeutralBackgroundColor: "#333333"
86
- }
87
-
88
- // Appearance //
89
- property QtObject appearance: QtObject {
90
- property int buttonRadius: 5
91
- property int borderWidth: 1
92
- property real borderFactor: 1.2
93
- property real borderOnAccentFactor: 1.08
94
- property int smallRadius: 3
95
-
96
- property int dialogTitleBarHeight: 32
97
- property int windowTitleBarHeight: 48
98
- property int windowRadius: 7
99
- property int windowButtonWidth: 46
100
-
101
- property int scrollBarMinWidth: 2
102
- property int scrollBarWidth: 6
103
- property int scrollBarPadding: 3
104
-
105
- property int sliderHandleSize: 20
106
- }
107
-
108
- // Shadows //
109
- property var shadows: {
110
- "dialog": {
111
- "color": Qt.rgba(0, 0, 0, 0.37), // 模糊颜色
112
- "blur": 64, // 模糊度
113
- "offsetY": 32
114
- },
115
- "tooltip": {
116
- "color": Qt.alpha("#000000", 0.14),
117
- "blur": 8,
118
- "offsetY": 4
119
- },
120
- "cardRest": {
121
- "color": Qt.rgba(0, 0, 0, 0.04),
122
- "blur": 4,
123
- "offsetY": 2
124
- },
125
- "flyout": {
126
- "color": Qt.alpha("#000000", 0.14),
127
- "blur": 24,
128
- "offsetY": 8
129
- },
130
- }
131
-
132
- // Typography //
133
- property QtObject typography: QtObject {
134
- // property string fontFamily: "Segoe UI"
135
- // property string fontIcon: "FluentSystemIcons-Resizeable.ttf" // 字体图标路径 / font icon (put it in the "assets/fonts" folder)
136
- // Font Sizes
137
- property int displaySize: 68
138
- property int titleLargeSize: 40
139
- property int titleSize: 28
140
- property int subtitleSize: 20
141
- property int bodyLargeSize: 18
142
- property int bodySize: 14
143
- property int bodyStrongSize: 14
144
- property int captionSize: 12
145
- }
1
+
2
+ import QtQuick 2.15
3
+ import "../themes"
4
+
5
+ QtObject {
6
+ property string name: "Dark"
7
+ property bool isDark: true
8
+
9
+ // Colors //
10
+ property QtObject colors: QtObject {
11
+ // Controls
12
+ property color controlColor: Qt.alpha("#ffffff", 0.065)
13
+ property color controlSecondaryColor: Qt.alpha("#ffffff", 0.1)
14
+ property color controlTertiaryColor: Qt.alpha("#ffffff", 0.0419)
15
+ property color controlQuaternaryColor: Qt.alpha("#ffffff", 0.0698)
16
+ property color controlStrongColor: Qt.alpha("#ffffff", 0.5442)
17
+ property color controlInputActiveColor: Qt.alpha("#1E1E1E", 0.7)
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
+
28
+ property color controlBorderColor: Qt.alpha("#ffffff", 0.09)
29
+ property color controlBottomBorderColor: Qt.alpha("#000000", 0.03)
30
+ property color controlAccentBottomBorderColor: Qt.alpha("#000000", 0.14)
31
+ property color controlBorderStrongColor: Qt.alpha("#ffffff", 0.6047)
32
+ property color controlBorderAccentColor: Qt.alpha("#ffffff", 0.08)
33
+ property color textControlBorderColor: Qt.alpha("#ffffff", 0.54)
34
+ property color textControlBorderFocusedColor: Utils.primaryColor
35
+ property color flyoutBorderColor: Qt.alpha("#000000", 0.2)
36
+
37
+ property color controlSolidColor: "#454545"
38
+ property color dividerBorderColor: Qt.alpha("#ffffff", 0.0837)
39
+ // Accessibility
40
+ property color focusBorderOuter: "#ffffff"
41
+ property color focusBorderInner: Qt.alpha("#000000", 0.7)
42
+
43
+ // Card
44
+ property color cardColor: Qt.alpha("#ffffff", 0.0512)
45
+ property color cardSecondaryColor: Qt.alpha("#ffffff", 0.0326)
46
+ property color cardTertiaryColor: Qt.alpha("#ffffff", 0.0698)
47
+ property color cardBorderColor: Qt.alpha("#000000", 0.1)
48
+
49
+ // Background
50
+ property color backgroundColor: "#202020"
51
+ property color windowBorderColor: Qt.alpha("#757575", 0.0698)
52
+ property color backgroundAcrylicColor: "#2c2c2c"
53
+ property color backgroundSmokeColor: Qt.alpha("#000000", 0.3)
54
+
55
+ property color subtleColor: "transparent"
56
+ property color subtleSecondaryColor: Qt.alpha("#ffffff", 0.0605)
57
+ property color subtleTertiaryColor: Qt.alpha("#ffffff", 0.0419)
58
+ property color captionCloseColor: "#c42b1c"
59
+ property color captionCloseTextColor: "#ffffff"
60
+
61
+ // Layer
62
+ property color layerColor: Qt.alpha("#3A3A3A", 0.3)
63
+
64
+ // Text
65
+ property color textColor: "#ffffff"
66
+ property color textSecondaryColor: Qt.alpha("#ffffff", 0.6047)
67
+ property color textAccentColor: primaryColor
68
+ property color textOnAccentColor: "#000000"
69
+ property color textSelectedColor: "#000000"
70
+
71
+ property color primaryColor: Qt.color(Utils.primaryColor).lighter(1.6).darker(1.2)
72
+ property color disabledColor: "#ffffff"
73
+
74
+ // System Colors
75
+ property color systemAttentionColor: primaryColor
76
+ property color systemSuccessColor: "#6ccb5f"
77
+ property color systemCautionColor: "#fce100"
78
+ property color systemCriticalColor: "#ff99a4"
79
+ property color systemNeutralColor: "#9f9f9f"
80
+
81
+ property color systemAttentionBackgroundColor: "#2e2e2e"
82
+ property color systemSuccessBackgroundColor: "#393d1b"
83
+ property color systemCautionBackgroundColor: "#433519"
84
+ property color systemCriticalBackgroundColor: "#442726"
85
+ property color systemNeutralBackgroundColor: "#333333"
86
+ }
87
+
88
+ // Appearance //
89
+ property QtObject appearance: QtObject {
90
+ property int buttonRadius: 5
91
+ property int borderWidth: 1
92
+ property real borderFactor: 1.2
93
+ property real borderOnAccentFactor: 1.08
94
+ property int smallRadius: 3
95
+
96
+ property int dialogTitleBarHeight: 32
97
+ property int windowTitleBarHeight: 48
98
+ property int windowRadius: 7
99
+ property int windowButtonWidth: 46
100
+
101
+ property int scrollBarMinWidth: 2
102
+ property int scrollBarWidth: 6
103
+ property int scrollBarPadding: 3
104
+
105
+ property int sliderHandleSize: 20
106
+ }
107
+
108
+ // Shadows //
109
+ property var shadows: {
110
+ "dialog": {
111
+ "color": Qt.rgba(0, 0, 0, 0.37), // 模糊颜色
112
+ "blur": 64, // 模糊度
113
+ "offsetY": 32
114
+ },
115
+ "tooltip": {
116
+ "color": Qt.alpha("#000000", 0.14),
117
+ "blur": 8,
118
+ "offsetY": 4
119
+ },
120
+ "cardRest": {
121
+ "color": Qt.rgba(0, 0, 0, 0.04),
122
+ "blur": 4,
123
+ "offsetY": 2
124
+ },
125
+ "flyout": {
126
+ "color": Qt.alpha("#000000", 0.14),
127
+ "blur": 24,
128
+ "offsetY": 8
129
+ },
130
+ }
131
+
132
+ // Typography //
133
+ property QtObject typography: QtObject {
134
+ // property string fontFamily: "Segoe UI"
135
+ // property string fontIcon: "FluentSystemIcons-Resizeable.ttf" // 字体图标路径 / font icon (put it in the "assets/fonts" folder)
136
+ // Font Sizes
137
+ property int displaySize: 68
138
+ property int titleLargeSize: 40
139
+ property int titleSize: 28
140
+ property int subtitleSize: 20
141
+ property int bodyLargeSize: 18
142
+ property int bodySize: 14
143
+ property int bodyStrongSize: 14
144
+ property int captionSize: 12
145
+ }
146
146
  }