RinUI 0.1.4__py3-none-any.whl → 0.1.4.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.
- RinUI/__init__.py +1 -1
- RinUI/core/config.py +9 -8
- RinUI/core/launcher.py +2 -2
- {rinui-0.1.4.dist-info → rinui-0.1.4.1.dist-info}/METADATA +1 -1
- {rinui-0.1.4.dist-info → rinui-0.1.4.1.dist-info}/RECORD +11 -11
- {rinui-0.1.4.data → rinui-0.1.4.1.data}/data/LICENSE +0 -0
- {rinui-0.1.4.data → rinui-0.1.4.1.data}/data/README.md +0 -0
- {rinui-0.1.4.dist-info → rinui-0.1.4.1.dist-info}/WHEEL +0 -0
- {rinui-0.1.4.dist-info → rinui-0.1.4.1.dist-info}/entry_points.txt +0 -0
- {rinui-0.1.4.dist-info → rinui-0.1.4.1.dist-info}/licenses/LICENSE +0 -0
- {rinui-0.1.4.dist-info → rinui-0.1.4.1.dist-info}/top_level.txt +0 -0
RinUI/__init__.py
CHANGED
RinUI/core/config.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
import os
|
2
1
|
import json
|
3
2
|
import platform
|
4
3
|
import sys
|
5
|
-
from PySide6.QtCore import QLocale
|
6
4
|
from enum import Enum
|
5
|
+
from pathlib import Path
|
6
|
+
import os
|
7
7
|
|
8
8
|
|
9
9
|
def is_win11():
|
@@ -27,15 +27,16 @@ def is_windows():
|
|
27
27
|
def resource_path(relative_path):
|
28
28
|
"""兼容 PyInstaller 打包和开发环境的路径"""
|
29
29
|
if hasattr(sys, '_MEIPASS'):
|
30
|
-
return
|
31
|
-
return
|
30
|
+
return Path(sys._MEIPASS) / relative_path
|
31
|
+
return Path(relative_path).resolve()
|
32
|
+
|
32
33
|
|
34
|
+
rinui_core_path = Path(__file__).resolve().parent # RinUI/core 目录
|
33
35
|
|
34
|
-
|
36
|
+
BASE_DIR = Path.cwd().resolve()
|
37
|
+
PATH = BASE_DIR / "RinUI" / "config"
|
38
|
+
RINUI_PATH = resource_path(rinui_core_path.parent.parent) # 使用 resource_path 处理路径,等同 ../../
|
35
39
|
|
36
|
-
BASE_DIR = os.path.abspath(os.getcwd())
|
37
|
-
PATH = os.path.join(BASE_DIR, "RinUI/config")
|
38
|
-
RINUI_PATH = resource_path(os.path.join(rinui_core_path, "../../")) # 使用 resource_path 处理路径
|
39
40
|
DEFAULT_CONFIG = {
|
40
41
|
"theme": {
|
41
42
|
"current_theme": "Auto",
|
RinUI/core/launcher.py
CHANGED
@@ -99,10 +99,10 @@ class RinUIWindow:
|
|
99
99
|
self.engine.rootContext().setContextProperty("WinEventManager", self.win_event_manager)
|
100
100
|
self._apply_windows_effects()
|
101
101
|
|
102
|
-
def setIcon(self, path: str) -> None:
|
102
|
+
def setIcon(self, path: Union[str, Path] = None) -> None:
|
103
103
|
"""
|
104
104
|
Sets the icon for the application.
|
105
|
-
:param path: str, icon file path (eg = "path/to/icon.png")
|
105
|
+
:param path: str or Path, icon file path (eg = "path/to/icon.png")
|
106
106
|
:return:
|
107
107
|
"""
|
108
108
|
app_instance = QApplication.instance()
|
@@ -1,4 +1,4 @@
|
|
1
|
-
RinUI/__init__.py,sha256=
|
1
|
+
RinUI/__init__.py,sha256=d9IqpbSfnP6x6uXkS5V5liug1uHaNhct-nbJQXNhEAA,67
|
2
2
|
RinUI/qmldir,sha256=M0TVfvNm_nrx1s6rxXvUIP-8m3Oc9UhqHDxQfEIdQTA,3959
|
3
3
|
RinUI/assets/fonts/FluentSystemIcons-Index.js,sha256=M2fUmCiOI7A1rxLWMFaekrB4KmasTSwbociYOzHJegE,253422
|
4
4
|
RinUI/assets/fonts/FluentSystemIcons-Resizable.ttf,sha256=-IfF3NT1eODD0vOLVLC0Z2U5bsR6woSQAziX3qD1TqU,1447252
|
@@ -71,8 +71,8 @@ RinUI/components/Text/TextArea.qml,sha256=guhwcFBSEyZkTRT2V0ER3S03xW9WOkH_4U2Oor
|
|
71
71
|
RinUI/components/Text/TextField.qml,sha256=BXuJ16AUQaSh-Og7jaYSNEu9r1PcyG7FQ95DaGciJZs,3556
|
72
72
|
RinUI/components/Text/TextInput.qml,sha256=gyTJmrYi5yuc-j5dDRSbu5PCxiuQo2xNBm6jWL9ezYk,1611
|
73
73
|
RinUI/core/__init__.py,sha256=xNbsFDXuObMebyn0Xsxieenh0fsAEjULqBd9qd8suTY,283
|
74
|
-
RinUI/core/config.py,sha256=
|
75
|
-
RinUI/core/launcher.py,sha256=
|
74
|
+
RinUI/core/config.py,sha256=h5tbQurVtpnfB10OMTWEZstzsF93zDOPDmbP9NRgvJk,3683
|
75
|
+
RinUI/core/launcher.py,sha256=ZWBGQP0DT2oWZXvqRK9cW7eRmImZe8L1B1-0ONgaGnc,5812
|
76
76
|
RinUI/core/theme.py,sha256=r47QltFKy_s-B1neVAjYIx_jOxxtsdJEMP-u-YJ8mpA,9832
|
77
77
|
RinUI/core/translator.py,sha256=5GK7Iy7-2iMicF8hQr79CwU9UWvCwE-8vGd8QkhJ1h8,1037
|
78
78
|
RinUI/core/window.py,sha256=KIu3qpN_RKcMc-8o6qxYAWecDVNBtjxCjqUN04RaI6I,7161
|
@@ -105,11 +105,11 @@ RinUI/windows/WindowManager.qml,sha256=f-Il6FCPf3_o6edj5BbscK2XxQd3mmUVnZPZuOO88
|
|
105
105
|
RinUI/windows/qmldir,sha256=oxyWR7Q8dWCrwwCwGNyf3l60qe6s4-beiZWWMAEkKcM,252
|
106
106
|
RinUI/windows/window/ApplicationWindow.qml,sha256=qRaM8IY0TJxfq1j1DogTMyrPjyoXkuWVzxtZQLzRtOQ,167
|
107
107
|
RinUI/windows/window/Window.qml,sha256=90YjjRoaul9qK4FxNy73zTaPuUmLvk_RjcPlBEa7DNI,3189
|
108
|
-
rinui-0.1.4.data/data/LICENSE,sha256=vgoqqpny5vKYu34VDBUWYQKzT7Nn-Xy9y8USmcOCyZQ,1063
|
109
|
-
rinui-0.1.4.data/data/README.md,sha256=8ZcR55RYV2slRAQbhoYhqDTPOLXmewkFSvuA_cE6zD0,3044
|
110
|
-
rinui-0.1.4.dist-info/licenses/LICENSE,sha256=vgoqqpny5vKYu34VDBUWYQKzT7Nn-Xy9y8USmcOCyZQ,1063
|
111
|
-
rinui-0.1.4.dist-info/METADATA,sha256=
|
112
|
-
rinui-0.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
113
|
-
rinui-0.1.4.dist-info/entry_points.txt,sha256=taxuZYCggoQa2LPubwcurQYRjBRC4cNYOjWaqOYZVxw,54
|
114
|
-
rinui-0.1.4.dist-info/top_level.txt,sha256=vKKjXBXEw5OFRIzTxZWUC5ZOj0CK5e3atbymBB4eJ6w,6
|
115
|
-
rinui-0.1.4.dist-info/RECORD,,
|
108
|
+
rinui-0.1.4.1.data/data/LICENSE,sha256=vgoqqpny5vKYu34VDBUWYQKzT7Nn-Xy9y8USmcOCyZQ,1063
|
109
|
+
rinui-0.1.4.1.data/data/README.md,sha256=8ZcR55RYV2slRAQbhoYhqDTPOLXmewkFSvuA_cE6zD0,3044
|
110
|
+
rinui-0.1.4.1.dist-info/licenses/LICENSE,sha256=vgoqqpny5vKYu34VDBUWYQKzT7Nn-Xy9y8USmcOCyZQ,1063
|
111
|
+
rinui-0.1.4.1.dist-info/METADATA,sha256=YmwxS5tHeWcDsCsZxZlH2vYgo3vyXCZSw3-9yvbpBx0,3577
|
112
|
+
rinui-0.1.4.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
113
|
+
rinui-0.1.4.1.dist-info/entry_points.txt,sha256=taxuZYCggoQa2LPubwcurQYRjBRC4cNYOjWaqOYZVxw,54
|
114
|
+
rinui-0.1.4.1.dist-info/top_level.txt,sha256=vKKjXBXEw5OFRIzTxZWUC5ZOj0CK5e3atbymBB4eJ6w,6
|
115
|
+
rinui-0.1.4.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|