RinUI 0.0.9__tar.gz → 0.0.9.1__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.
- {rinui-0.0.9/RinUI.egg-info → rinui-0.0.9.1}/PKG-INFO +14 -8
- {rinui-0.0.9 → rinui-0.0.9.1}/README.md +12 -6
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/__init__.py +1 -1
- rinui-0.0.9.1/RinUI/components/DateAndTime/TimePicker.qml +115 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/Navigation/NavigationView.qml +15 -1
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/ScrollBar.qml +41 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/core/__pycache__/__init__.cpython-38.pyc +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/core/__pycache__/launcher.cpython-38.pyc +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/core/launcher.py +0 -2
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/themes/utils.qml +3 -2
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/windows/FluentWindowBase.qml +3 -1
- {rinui-0.0.9 → rinui-0.0.9.1/RinUI.egg-info}/PKG-INFO +14 -8
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI.egg-info/SOURCES.txt +1 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI.egg-info/requires.txt +1 -1
- {rinui-0.0.9 → rinui-0.0.9.1}/pyproject.toml +2 -2
- {rinui-0.0.9 → rinui-0.0.9.1}/LICENSE +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/MANIFEST.in +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/__pycache__/__init__.cpython-38.pyc +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/assets/fonts/FluentSystemIcons-Index.js +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/assets/fonts/FluentSystemIcons-Resizable.ttf +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/assets/img/default_app_icon.png +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/Base.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/BasicInput/Button.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/BasicInput/CheckBox.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/BasicInput/ComboBox.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/BasicInput/DropDownButton.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/BasicInput/Hyperlink.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/BasicInput/RadioButton.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/BasicInput/Slider.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/BasicInput/Switch.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/BasicInput/ToggleButton.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/BasicInput/ToolButton.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/ContextMenu.qml +0 -0
- /rinui-0.0.9/RinUI/components/DateAndTime/TimePicker.qml → /rinui-0.0.9.1/RinUI/components/DateAndTime/DatePicker.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/DateAndTime/PickerView.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/DialogsAndFlyouts/Dialog.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/DialogsAndFlyouts/DialogButtonBox.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/DialogsAndFlyouts/Flyout.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/DialogsAndFlyouts/Popup.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/FocusIndicator.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/IconWidget.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/Indicator.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/Layout/Expander.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/Layout/SettingExpander.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/Layout/SettingItem.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/ListAndCollections/Clip.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/ListAndCollections/Frame.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/ListAndCollections/ListView.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/ListAndCollections/ListViewDelegate.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/ListAndCollections/SettingCard.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/ListAndCollections/TableView.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/ListAndCollections/TableViewDelegate.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/MenusAndToolbars/Menu.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/MenusAndToolbars/MenuBar.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/MenusAndToolbars/MenuItem.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/MenusAndToolbars/MenuItemGroup.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/MenusAndToolbars/MenuSeparator.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/MenusAndToolbars/ToolSeparator.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/Navigation/ErrorPage.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/Navigation/NavigationBar.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/Navigation/NavigationItem.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/Navigation/NavigationSubItem.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/Navigation/SelectorBar.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/ScrollView.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/Shadow.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/StatusAndInfo/InfoBadge.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/StatusAndInfo/InfoBar.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/StatusAndInfo/ProgressBar.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/StatusAndInfo/Toast.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/StatusAndInfo/ToolTip.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/Text/SpinBox.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/Text/Text.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/Text/TextField.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/Text/TextInput.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/Utils/Blur.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/components/qmldir +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/config/rin_ui.json +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/core/__init__.py +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/core/__pycache__/config.cpython-38.pyc +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/core/__pycache__/theme.cpython-38.pyc +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/core/config.py +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/core/theme.py +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/hooks/__init__.py +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/hooks/hook-RinUI.py +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/qmldir +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/themes/dark.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/themes/light.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/themes/qmldir +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/themes/theme.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/utils/Animation.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/utils/FloatLayer.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/utils/FontIconLoader.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/utils/Position.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/utils/Severity.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/utils/Typography.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/utils/qmldir +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/windows/CtrlBtn.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/windows/FluentPage.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/windows/FluentWindow.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/windows/TitleBar.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/windows/qmldir +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/windows/window/ApplicationWindow.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI/windows/window/Window.qml +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI.egg-info/dependency_links.txt +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI.egg-info/entry_points.txt +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/RinUI.egg-info/top_level.txt +0 -0
- {rinui-0.0.9 → rinui-0.0.9.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: RinUI
|
3
|
-
Version: 0.0.9
|
3
|
+
Version: 0.0.9.1
|
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
|
@@ -11,7 +11,7 @@ Description-Content-Type: text/markdown
|
|
11
11
|
License-File: LICENSE
|
12
12
|
Requires-Dist: PySide6~=6.6.3.1
|
13
13
|
Requires-Dist: darkdetect~=0.8.0
|
14
|
-
Requires-Dist: pywin32
|
14
|
+
Requires-Dist: pywin32>=306; sys_platform == "win32"
|
15
15
|
|
16
16
|
<div align="center">
|
17
17
|
<h1>RinUI</h1>
|
@@ -55,18 +55,24 @@ With simple configuration, you can quickly develop elegant UI interfaces in the
|
|
55
55
|
|
56
56
|
You can install RinUI via pip: (coming soon, but now you can install via test-pypi)
|
57
57
|
```bash
|
58
|
-
pip install RinUI
|
59
|
-
|
60
|
-
# ↓ Test PyPI
|
61
|
-
pip install PySide6 darkdetect
|
62
|
-
# There is no Release for these two packages in TestPypi. When RinUI is released to PyPi, this step can be omitted.
|
63
|
-
pip install -i https://test.pypi.org/simple/ RinUI --no-deps
|
58
|
+
pip install RinUI
|
64
59
|
```
|
65
60
|
|
66
61
|
Import RinUI in your QML file:
|
67
62
|
```qmllang
|
68
63
|
import RinUI
|
69
64
|
```
|
65
|
+
Then you can run the QML file in your project.
|
66
|
+
```python
|
67
|
+
import sys
|
68
|
+
from RinUI import *
|
69
|
+
from PySide6.QtWidgets import QApplication
|
70
|
+
|
71
|
+
if __name__ == '__main__':
|
72
|
+
app = QApplication(sys.argv)
|
73
|
+
your_app = RinUIWindow("/path/to/your/file.qml")
|
74
|
+
sys.exit(app.exec_())
|
75
|
+
```
|
70
76
|
|
71
77
|
You also can view the demo in the source code, like this:
|
72
78
|
```bash
|
@@ -40,18 +40,24 @@ With simple configuration, you can quickly develop elegant UI interfaces in the
|
|
40
40
|
|
41
41
|
You can install RinUI via pip: (coming soon, but now you can install via test-pypi)
|
42
42
|
```bash
|
43
|
-
pip install RinUI
|
44
|
-
|
45
|
-
# ↓ Test PyPI
|
46
|
-
pip install PySide6 darkdetect
|
47
|
-
# There is no Release for these two packages in TestPypi. When RinUI is released to PyPi, this step can be omitted.
|
48
|
-
pip install -i https://test.pypi.org/simple/ RinUI --no-deps
|
43
|
+
pip install RinUI
|
49
44
|
```
|
50
45
|
|
51
46
|
Import RinUI in your QML file:
|
52
47
|
```qmllang
|
53
48
|
import RinUI
|
54
49
|
```
|
50
|
+
Then you can run the QML file in your project.
|
51
|
+
```python
|
52
|
+
import sys
|
53
|
+
from RinUI import *
|
54
|
+
from PySide6.QtWidgets import QApplication
|
55
|
+
|
56
|
+
if __name__ == '__main__':
|
57
|
+
app = QApplication(sys.argv)
|
58
|
+
your_app = RinUIWindow("/path/to/your/file.qml")
|
59
|
+
sys.exit(app.exec_())
|
60
|
+
```
|
55
61
|
|
56
62
|
You also can view the demo in the source code, like this:
|
57
63
|
```bash
|
@@ -0,0 +1,115 @@
|
|
1
|
+
import QtQuick 2.15
|
2
|
+
import QtQuick.Controls.Basic 2.15
|
3
|
+
import QtQuick.Layouts 2.15
|
4
|
+
import "../../themes"
|
5
|
+
import "../../components"
|
6
|
+
|
7
|
+
Button {
|
8
|
+
id: timePickerButton
|
9
|
+
|
10
|
+
property string amText: qsTr("AM")
|
11
|
+
property string pmText: qsTr("PM")
|
12
|
+
property string hourText: qsTr("hour")
|
13
|
+
property string minuteText: qsTr("minute")
|
14
|
+
|
15
|
+
// 是否使用24小时制
|
16
|
+
property bool use24Hour: false
|
17
|
+
|
18
|
+
property alias hour: pickerView.value1
|
19
|
+
property alias minute: pickerView.value2
|
20
|
+
property alias hourSystem: pickerView.value3
|
21
|
+
|
22
|
+
implicitWidth: 250
|
23
|
+
padding: 0
|
24
|
+
|
25
|
+
// 获取 / 设置时间 // Get / Set time (hh:mm)
|
26
|
+
// 获取 / 设置时间 (hh:mm)
|
27
|
+
property string time: {
|
28
|
+
if (!pickerView.gotData) return ""
|
29
|
+
let h = parseInt(hour)
|
30
|
+
if (!use24Hour) {
|
31
|
+
if (hourSystem === pmText && h < 12) h += 12
|
32
|
+
if (hourSystem === amText && h === 12) h = 0
|
33
|
+
}
|
34
|
+
let hh = h < 10 ? "0" + h : "" + h
|
35
|
+
let mm = parseInt(minute)
|
36
|
+
let mmStr = mm < 10 ? "0" + mm : "" + mm
|
37
|
+
return hh + ":" + mmStr
|
38
|
+
}
|
39
|
+
|
40
|
+
function setTime(hhmm) {
|
41
|
+
if (!hhmm || typeof hhmm !== "string" || !hhmm.match(/^\d{2}:\d{2}$/)) return
|
42
|
+
|
43
|
+
let parts = hhmm.split(":")
|
44
|
+
let h = parseInt(parts[0])
|
45
|
+
let m = parseInt(parts[1])
|
46
|
+
|
47
|
+
if (h >= 0 && h < 24 && m >= 0 && m < 60) {
|
48
|
+
if (use24Hour) {
|
49
|
+
pickerView.value1 = h.toString()
|
50
|
+
pickerView.value2 = m.toString()
|
51
|
+
pickerView.value3 = undefined
|
52
|
+
} else {
|
53
|
+
pickerView.value1 = ((h % 12 === 0) ? 12 : h % 12).toString()
|
54
|
+
pickerView.value2 = m.toString()
|
55
|
+
pickerView.value3 = h >= 12 ? pmText : amText
|
56
|
+
}
|
57
|
+
pickerView.gotData = true
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
// 重写按钮结果
|
62
|
+
contentItem: RowLayout {
|
63
|
+
anchors.fill: parent
|
64
|
+
spacing: 0
|
65
|
+
|
66
|
+
Text {
|
67
|
+
Layout.fillWidth: true
|
68
|
+
Layout.maximumWidth: use24Hour ? timePickerButton.implicitWidth / 2 : timePickerButton.implicitWidth / 3
|
69
|
+
color: pickerView.gotData ? Theme.currentTheme.colors.textColor
|
70
|
+
: Theme.currentTheme.colors.textSecondaryColor
|
71
|
+
horizontalAlignment: Text.AlignHCenter
|
72
|
+
verticalAlignment: Text.AlignVCenter
|
73
|
+
|
74
|
+
text: pickerView.gotData ? pickerView.value1 : hourText
|
75
|
+
}
|
76
|
+
ToolSeparator {
|
77
|
+
implicitHeight: 32
|
78
|
+
}
|
79
|
+
Text {
|
80
|
+
Layout.fillWidth: true
|
81
|
+
Layout.maximumWidth: use24Hour ? timePickerButton.implicitWidth / 2 : timePickerButton.implicitWidth / 3
|
82
|
+
color: pickerView.gotData ? Theme.currentTheme.colors.textColor
|
83
|
+
: Theme.currentTheme.colors.textSecondaryColor
|
84
|
+
horizontalAlignment: Text.AlignHCenter
|
85
|
+
verticalAlignment: Text.AlignVCenter
|
86
|
+
|
87
|
+
text: pickerView.gotData ? pickerView.value2 : minuteText
|
88
|
+
}
|
89
|
+
ToolSeparator {
|
90
|
+
implicitHeight: 32
|
91
|
+
visible: !use24Hour
|
92
|
+
}
|
93
|
+
Text {
|
94
|
+
Layout.fillWidth: true
|
95
|
+
Layout.maximumWidth: timePickerButton.implicitWidth / 3
|
96
|
+
color: pickerView.gotData ? Theme.currentTheme.colors.textColor
|
97
|
+
: Theme.currentTheme.colors.textSecondaryColor
|
98
|
+
horizontalAlignment: Text.AlignHCenter
|
99
|
+
verticalAlignment: Text.AlignVCenter
|
100
|
+
|
101
|
+
text: pickerView.gotData ? pickerView.value3 : amText
|
102
|
+
visible: !use24Hour
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
onClicked: pickerView.open()
|
107
|
+
|
108
|
+
PickerView {
|
109
|
+
id: pickerView
|
110
|
+
width: parent.width
|
111
|
+
|
112
|
+
model1: use24Hour ? 24 : 12
|
113
|
+
model3: use24Hour ? undefined : [amText, pmText]
|
114
|
+
}
|
115
|
+
}
|
@@ -42,7 +42,21 @@ RowLayout {
|
|
42
42
|
Item {
|
43
43
|
Layout.fillWidth: true
|
44
44
|
Layout.fillHeight: true
|
45
|
-
|
45
|
+
|
46
|
+
// 导航栏展开自动收起
|
47
|
+
MouseArea {
|
48
|
+
id: collapseCatcher
|
49
|
+
anchors.fill: parent
|
50
|
+
z: 1
|
51
|
+
hoverEnabled: true
|
52
|
+
acceptedButtons: Qt.AllButtons
|
53
|
+
|
54
|
+
visible: !navigationBar.collapsed && navigationBar.isNotOverMinimumWidth()
|
55
|
+
|
56
|
+
onClicked: {
|
57
|
+
navigationBar.collapsed = true
|
58
|
+
}
|
59
|
+
}
|
46
60
|
|
47
61
|
Rectangle {
|
48
62
|
id: appLayer
|
@@ -25,6 +25,47 @@ ScrollBar {
|
|
25
25
|
horizontalPadding : horizontal ? 15 : 3
|
26
26
|
enabled: size < 1.0
|
27
27
|
|
28
|
+
// 控制按钮 / Control Button //
|
29
|
+
ToolButton {
|
30
|
+
background: Item {} // 无背景
|
31
|
+
|
32
|
+
width: 15
|
33
|
+
height: 15
|
34
|
+
size: 8
|
35
|
+
color: Theme.currentTheme.colors.textSecondaryColor
|
36
|
+
icon.name: vertical ? "ic_fluent_triangle_up_20_filled" : "ic_fluent_triangle_left_20_filled"
|
37
|
+
anchors {
|
38
|
+
top: vertical ? parent.top : undefined
|
39
|
+
left: horizontal ? parent.left : undefined
|
40
|
+
horizontalCenter: vertical ? parent.horizontalCenter : undefined
|
41
|
+
verticalCenter: horizontal ? parent.verticalCenter : undefined
|
42
|
+
}
|
43
|
+
onClicked: scrollBar.decrease()
|
44
|
+
|
45
|
+
visible: scrollBar.size < 1.0
|
46
|
+
opacity: background.opacity
|
47
|
+
}
|
48
|
+
|
49
|
+
ToolButton {
|
50
|
+
background: Item {} // 无背景
|
51
|
+
|
52
|
+
width: 15
|
53
|
+
height: 15
|
54
|
+
size: 8
|
55
|
+
color: Theme.currentTheme.colors.textSecondaryColor
|
56
|
+
icon.name: vertical ? "ic_fluent_triangle_down_20_filled" : "ic_fluent_triangle_right_20_filled"
|
57
|
+
anchors {
|
58
|
+
bottom: vertical ? parent.bottom : undefined
|
59
|
+
right: horizontal ? parent.right : undefined
|
60
|
+
horizontalCenter: vertical ? parent.horizontalCenter : undefined
|
61
|
+
verticalCenter: horizontal ? parent.verticalCenter : undefined
|
62
|
+
}
|
63
|
+
onClicked: scrollBar.increase()
|
64
|
+
|
65
|
+
visible: scrollBar.size < 1.0
|
66
|
+
opacity: background.opacity
|
67
|
+
}
|
68
|
+
|
28
69
|
|
29
70
|
// 内容 / Content //
|
30
71
|
contentItem: Item {
|
Binary file
|
Binary file
|
@@ -73,7 +73,6 @@ class RinUIWindow:
|
|
73
73
|
raise FileNotFoundError(f"Cannot find RinUI module: {rinui_import_path}")
|
74
74
|
|
75
75
|
# 主题管理器
|
76
|
-
|
77
76
|
self.engine.rootContext().setContextProperty("ThemeManager", self.theme_manager)
|
78
77
|
try:
|
79
78
|
self.engine.load(self.qml_path)
|
@@ -84,7 +83,6 @@ class RinUIWindow:
|
|
84
83
|
raise RuntimeError(f"Error loading QML file: {self.qml_path}")
|
85
84
|
|
86
85
|
# 窗口设置
|
87
|
-
|
88
86
|
self.root_window = self.engine.rootObjects()[0]
|
89
87
|
|
90
88
|
self.theme_manager.set_window(self.root_window)
|
@@ -5,9 +5,10 @@ import "../themes"
|
|
5
5
|
import "../utils"
|
6
6
|
|
7
7
|
QtObject {
|
8
|
-
property string fontFamily:
|
8
|
+
property string fontFamily: Qt.application.font.family // 默认字体
|
9
9
|
property string iconFontFamily: FontIconLoader.name
|
10
10
|
property string fontIconSource: Qt.resolvedUrl("../assets/fonts/FluentSystemIcons-Resizable.ttf") // 字体图标路径
|
11
|
+
property string fontIconIndexSource: Qt.resolvedUrl("../assets/fonts/FluentSystemIcons-Index.js") // 字体图标索引路径
|
11
12
|
property var fontIconIndex: Icons.FluentIcons // 字体图标索引
|
12
13
|
|
13
14
|
property color primaryColor: "#605ed2" // 默认主题色
|
@@ -23,6 +24,6 @@ QtObject {
|
|
23
24
|
property int progressBarAnimationSpeed: 1550 // 进度条动画速度 (ms)
|
24
25
|
|
25
26
|
function loadFontIconIndex() {
|
26
|
-
Qt.include(
|
27
|
+
Qt.include(fontIconIndexSource);
|
27
28
|
}
|
28
29
|
}
|
@@ -151,7 +151,9 @@ ApplicationWindow {
|
|
151
151
|
if (p.x >= width - b) e |= Qt.RightEdge
|
152
152
|
if (p.y < b) e |= Qt.TopEdge
|
153
153
|
if (p.y >= height - b) e |= Qt.BottomEdge
|
154
|
-
|
154
|
+
if (e !== 0) {
|
155
|
+
baseWindow.startSystemResize(e)
|
156
|
+
}
|
155
157
|
}
|
156
158
|
}
|
157
159
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: RinUI
|
3
|
-
Version: 0.0.9
|
3
|
+
Version: 0.0.9.1
|
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
|
@@ -11,7 +11,7 @@ Description-Content-Type: text/markdown
|
|
11
11
|
License-File: LICENSE
|
12
12
|
Requires-Dist: PySide6~=6.6.3.1
|
13
13
|
Requires-Dist: darkdetect~=0.8.0
|
14
|
-
Requires-Dist: pywin32
|
14
|
+
Requires-Dist: pywin32>=306; sys_platform == "win32"
|
15
15
|
|
16
16
|
<div align="center">
|
17
17
|
<h1>RinUI</h1>
|
@@ -55,18 +55,24 @@ With simple configuration, you can quickly develop elegant UI interfaces in the
|
|
55
55
|
|
56
56
|
You can install RinUI via pip: (coming soon, but now you can install via test-pypi)
|
57
57
|
```bash
|
58
|
-
pip install RinUI
|
59
|
-
|
60
|
-
# ↓ Test PyPI
|
61
|
-
pip install PySide6 darkdetect
|
62
|
-
# There is no Release for these two packages in TestPypi. When RinUI is released to PyPi, this step can be omitted.
|
63
|
-
pip install -i https://test.pypi.org/simple/ RinUI --no-deps
|
58
|
+
pip install RinUI
|
64
59
|
```
|
65
60
|
|
66
61
|
Import RinUI in your QML file:
|
67
62
|
```qmllang
|
68
63
|
import RinUI
|
69
64
|
```
|
65
|
+
Then you can run the QML file in your project.
|
66
|
+
```python
|
67
|
+
import sys
|
68
|
+
from RinUI import *
|
69
|
+
from PySide6.QtWidgets import QApplication
|
70
|
+
|
71
|
+
if __name__ == '__main__':
|
72
|
+
app = QApplication(sys.argv)
|
73
|
+
your_app = RinUIWindow("/path/to/your/file.qml")
|
74
|
+
sys.exit(app.exec_())
|
75
|
+
```
|
70
76
|
|
71
77
|
You also can view the demo in the source code, like this:
|
72
78
|
```bash
|
@@ -33,6 +33,7 @@ RinUI/components/BasicInput/Slider.qml
|
|
33
33
|
RinUI/components/BasicInput/Switch.qml
|
34
34
|
RinUI/components/BasicInput/ToggleButton.qml
|
35
35
|
RinUI/components/BasicInput/ToolButton.qml
|
36
|
+
RinUI/components/DateAndTime/DatePicker.qml
|
36
37
|
RinUI/components/DateAndTime/PickerView.qml
|
37
38
|
RinUI/components/DateAndTime/TimePicker.qml
|
38
39
|
RinUI/components/DialogsAndFlyouts/Dialog.qml
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "RinUI"
|
7
|
-
version = "0.0.9"
|
7
|
+
version = "0.0.9.1"
|
8
8
|
authors = [
|
9
9
|
{ name = "RinLit", email = "lintu233_qwq@icloud.com" }
|
10
10
|
]
|
@@ -14,7 +14,7 @@ requires-python = ">=3.8"
|
|
14
14
|
dependencies = [
|
15
15
|
"PySide6~=6.6.3.1",
|
16
16
|
"darkdetect~=0.8.0",
|
17
|
-
|
17
|
+
"pywin32>=306 ; sys_platform == 'win32'"
|
18
18
|
]
|
19
19
|
classifiers = [
|
20
20
|
"Programming Language :: Python :: 3",
|
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
|
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
|
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
|
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
|