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
RinUI/core/translator.py
CHANGED
@@ -1,25 +1,26 @@
|
|
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
|
-
|
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
|
+
print(f"Language file \"{path}\" not found. Fallback to default (en_US)")
|
25
|
+
path = os.path.join(RINUI_PATH, "RinUI", "languages", "en_US.qm")
|
26
|
+
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
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
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
|
+
}
|
RinUI/themes/Colors.qml
ADDED
@@ -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
|
}
|