RinUI 0.0.9.1.post1__py3-none-any.whl → 0.0.10__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 (33) hide show
  1. RinUI/__init__.py +1 -1
  2. RinUI/__pycache__/__init__.cpython-38.pyc +0 -0
  3. RinUI/components/BasicInput/PillButton.qml +11 -0
  4. RinUI/components/BasicInput/RoundButton.qml +27 -0
  5. RinUI/components/DateAndTime/DatePicker.qml +105 -80
  6. RinUI/components/DateAndTime/PickerView.qml +11 -4
  7. RinUI/components/MenusAndToolbars/Menu.qml +5 -3
  8. RinUI/components/MenusAndToolbars/MenuItem.qml +13 -0
  9. RinUI/components/Navigation/NavigationView.qml +3 -0
  10. RinUI/components/StatusAndInfo/InfoBar.qml +7 -1
  11. RinUI/components/Text/TextArea.qml +146 -0
  12. RinUI/components/Text/TextField.qml +48 -0
  13. RinUI/components/qmldir +1 -0
  14. RinUI/core/__pycache__/__init__.cpython-38.pyc +0 -0
  15. RinUI/core/__pycache__/config.cpython-38.pyc +0 -0
  16. RinUI/core/__pycache__/launcher.cpython-38.pyc +0 -0
  17. RinUI/core/config.py +11 -0
  18. RinUI/core/launcher.py +18 -18
  19. RinUI/qmldir +5 -0
  20. RinUI/themes/utils.qml +5 -1
  21. RinUI/windows/FluentWindowBase.qml +6 -6
  22. RinUI/windows/TitleBar.qml +4 -0
  23. RinUI/windows/window/ApplicationWindow.qml +1 -1
  24. RinUI/windows/window/Window.qml +7 -0
  25. {rinui-0.0.9.1.post1.data → rinui-0.0.10.data}/data/README.md +1 -1
  26. {rinui-0.0.9.1.post1.dist-info → rinui-0.0.10.dist-info}/METADATA +2 -2
  27. {rinui-0.0.9.1.post1.dist-info → rinui-0.0.10.dist-info}/RECORD +32 -30
  28. RinUI/components/Utils/Blur.qml +0 -42
  29. {rinui-0.0.9.1.post1.data → rinui-0.0.10.data}/data/LICENSE +0 -0
  30. {rinui-0.0.9.1.post1.dist-info → rinui-0.0.10.dist-info}/LICENSE +0 -0
  31. {rinui-0.0.9.1.post1.dist-info → rinui-0.0.10.dist-info}/WHEEL +0 -0
  32. {rinui-0.0.9.1.post1.dist-info → rinui-0.0.10.dist-info}/entry_points.txt +0 -0
  33. {rinui-0.0.9.1.post1.dist-info → rinui-0.0.10.dist-info}/top_level.txt +0 -0
RinUI/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  from .core import *
2
2
 
3
- __version__ = "0.0.9.1"
3
+ __version__ = "0.0.10"
4
4
  __author__ = "RinLit"
Binary file
@@ -0,0 +1,11 @@
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
+ RoundButton {
8
+ id: root
9
+ highlighted: checked
10
+ checkable: true
11
+ }
@@ -0,0 +1,27 @@
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
+ Button {
9
+ id: root
10
+ property alias radius: background.radius
11
+ backgroundColor: highlighted ? primaryColor : Theme.currentTheme.colors.controlQuaternaryColor
12
+
13
+ background: Rectangle {
14
+ id: background
15
+ anchors.fill: parent
16
+ color: hovered ? hoverColor : backgroundColor
17
+ radius: height / 2
18
+
19
+ border.width: Theme.currentTheme.appearance.borderWidth // 边框宽度 / Border Width
20
+ border.color: flat ? "transparent" :
21
+ enabled ? highlighted ? primaryColor : Theme.currentTheme.colors.controlBorderColor :
22
+ highlighted ? Theme.currentTheme.colors.disabledColor : Theme.currentTheme.colors.controlBorderColor
23
+
24
+ Behavior on color { ColorAnimation { duration: Utils.appearanceSpeed; easing.type: Easing.OutQuart } }
25
+ opacity: flat && !hovered || !hoverable ? 0 : 1
26
+ }
27
+ }
@@ -5,111 +5,136 @@ import "../../themes"
5
5
  import "../../components"
6
6
 
7
7
  Button {
8
- id: timePickerButton
8
+ id: datePickerButton
9
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")
10
+ property bool yearVisible: true
14
11
 
15
- // 是否使用24小时制
16
- property bool use24Hour: false
12
+ property alias year: pickerView.value3
13
+ property alias month: pickerView.value1
14
+ property alias monthIndex: pickerView.index1
15
+ property alias day: pickerView.value2
17
16
 
18
- property alias hour: pickerView.value1
19
- property alias minute: pickerView.value2
20
- property alias hourSystem: pickerView.value3
17
+ property int startYear: 1925
18
+ property int endYear: 2125
19
+
20
+ readonly property var monthModel: (new Array(12)).fill(0).map((_, i) => i + 1).map(getMonthName)
21
+ readonly property int maxDays: new Date(pickerView.value3 || new Date().getFullYear(), pickerView.index1 + 1, 0).getDate()
21
22
 
22
23
  implicitWidth: 250
23
24
  padding: 0
24
25
 
25
- // 获取 / 设置时间 // Get / Set time (hh:mm)
26
- // 获取 / 设置时间 (hh:mm)
27
- property string time: {
26
+ property string date: {
28
27
  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
28
+ let y = typeof year === "number"? parseInt(year) : new Date().getFullYear()
29
+ let m = parseInt(monthModel.indexOf(month) + 1)
30
+ let d = parseInt(day)
31
+ return y + "-" + m + "-" + d
38
32
  }
39
33
 
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])
34
+ function setDate(yyyymmdd) {
35
+ // format
36
+ if (!yyyymmdd || typeof yyyymmdd !== "string"
37
+ || !yyyymmdd.match(/^\d{4}[-\/]\d{1,2}[-\/]\d{1,2}$/))
38
+ return false
39
+ let parts = yyyymmdd.split(/[-\/]/) // 使用正则分割符号 '-' 或 '/'
40
+ let y = parseInt(parts[0])
45
41
  let m = parseInt(parts[1])
42
+ let d = parseInt(parts[2])
46
43
 
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
- }
44
+ if (m >= 1 && m <= 12 && d >= 1 && d <= 31) {
45
+ pickerView.value3 = y.toString()
46
+ pickerView.value1 = getMonthName(m)
47
+ pickerView.value2 = d.toString()
57
48
  pickerView.gotData = true
49
+ return true
50
+ }
51
+ return -1
52
+ }
53
+
54
+ // 根据 locale 决定顺序
55
+ property var dateOrder: {
56
+ let fmt = Qt.locale().dateFormat(Locale.ShortFormat)
57
+ let order = []
58
+ if (fmt.indexOf("y") < fmt.indexOf("M") && fmt.indexOf("M") < fmt.indexOf("d"))
59
+ order = ["year", "month", "day"]
60
+ else if (fmt.indexOf("M") < fmt.indexOf("d") && fmt.indexOf("d") < fmt.indexOf("y"))
61
+ order = ["month", "day", "year"]
62
+ else if (fmt.indexOf("d") < fmt.indexOf("M") && fmt.indexOf("M") < fmt.indexOf("y"))
63
+ order = ["day", "month", "year"]
64
+
65
+ if (!yearVisible) {
66
+ order = order.filter(item => item !== "year")
58
67
  }
68
+ return order
59
69
  }
60
70
 
61
- // 重写按钮结果
71
+ // locale获取月份名称
72
+ function getMonthName(num) {
73
+ return datePicker.locale.monthName(num - 1)
74
+ }
75
+
76
+ onClicked: pickerView.open()
77
+
62
78
  contentItem: RowLayout {
63
79
  anchors.fill: parent
64
80
  spacing: 0
65
81
 
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
82
+ Repeater {
83
+ model: dateOrder
84
+
85
+ delegate: Item {
86
+ Layout.fillWidth: true
87
+ Layout.maximumWidth: datePickerButton.implicitWidth / model.length
88
+ implicitHeight: 32
89
+
90
+ Text {
91
+ anchors.centerIn: parent
92
+ color: pickerView.gotData ? Theme.currentTheme.colors.textColor
93
+ : Theme.currentTheme.colors.textSecondaryColor
94
+
95
+ text: {
96
+ const type = modelData
97
+ if (!pickerView.gotData) {
98
+ if (type === "year") return qsTr("year")
99
+ if (type === "month") return qsTr("month")
100
+ if (type === "day") return qsTr("day")
101
+ }
102
+ if (type === "year") return year
103
+ if (type === "month") return month
104
+ if (type === "day") return day
105
+ return ""
106
+ }
107
+ }
108
+ ToolSeparator {
109
+ anchors.right: parent.right
110
+ anchors.verticalCenter: parent.verticalCenter
111
+ implicitHeight: parent.implicitHeight
112
+ visible: index !== dateOrder.length - 1
113
+ }
114
+ }
103
115
  }
104
116
  }
105
117
 
106
- onClicked: pickerView.open()
107
-
108
118
  PickerView {
109
119
  id: pickerView
110
120
  width: parent.width
111
121
 
112
- model1: use24Hour ? 24 : 12
113
- model3: use24Hour ? undefined : [amText, pmText]
122
+ model3: yearVisible
123
+ ? (
124
+ startYear <= endYear
125
+ ? Array.apply(null, {length: endYear - startYear + 1}).map((_, i) => startYear + i)
126
+ : []
127
+ )
128
+ : undefined
129
+ model1: monthModel
130
+ model2: Array.from({ length: maxDays }, (_, i) => i + 1) // 天
131
+
132
+ // 初始值
133
+ value3: yearVisible ? (new Date().getFullYear()) : undefined
134
+ value1: getMonthName(new Date().getMonth() + 1)
135
+ value2: new Date().getDate()
136
+ gotData: false
137
+
138
+ onValueChanged: gotData = true
114
139
  }
115
- }
140
+ }
@@ -17,15 +17,21 @@ Popup {
17
17
  property var value2: undefined
18
18
  property var value3: undefined
19
19
 
20
+ property alias index1: hours.currentIndex
21
+ property alias index2: minutes.currentIndex
22
+ property alias index3: added.currentIndex
23
+
20
24
  property var model1: 12
21
25
  property var model2: 60
22
26
  property var model3: [qsTr("AM"), qsTr("PM")]
23
27
 
24
- readonly property bool gotData: typeof value1!== "undefined" && typeof value2!== "undefined"
28
+ property bool gotData: typeof value1!== "undefined" && typeof value2!== "undefined"
29
+
30
+ signal valueChanged(var value1, var value2, var value3)
25
31
 
26
32
  function formatText(count, modelData) {
27
- let data = count === 60 ? modelData : modelData;
28
- return data.toString().length < 2 && count !== 12 ? "0" + data
33
+ let data = modelData;
34
+ return data.toString().length < 2 && count === 60 ? "0" + data
29
35
  : data === 0 && count === 12 ? 12 : data
30
36
  }
31
37
 
@@ -136,6 +142,7 @@ Popup {
136
142
  value1 = hours.currentItem.text
137
143
  value2 = minutes.currentItem.text
138
144
  typeof model3 !== "undefined" ? value3 = added.currentItem.text : undefined
145
+ valueChanged(value1, value2, value3)
139
146
  root.close()
140
147
  }
141
148
  }
@@ -184,7 +191,7 @@ Popup {
184
191
  )
185
192
  added.positionViewAtIndex(
186
193
  typeof value3 === "undefined" ? 0
187
- : typeof model3 === "number" ? value3 : model3.indexOf(value3), Tumbler.Center
194
+ : typeof model3 === "number" ? value3 : model3.indexOf(parseInt(value3)), Tumbler.Center
188
195
  )
189
196
  }
190
197
  }
@@ -19,7 +19,8 @@ Menu {
19
19
  case Position.Right:
20
20
  return parent.width + 5
21
21
  default:
22
- return (parent.width - root.width) / 2
22
+ // return (parent.width - root.width) / 2
23
+ return root.x
23
24
  }
24
25
  }
25
26
 
@@ -33,7 +34,8 @@ Menu {
33
34
  case Position.Right:
34
35
  return (parent.height - root.height) / 2
35
36
  default:
36
- return -root.height + 5 // 默认顶部
37
+ // return -root.height + 5 // 默认顶部
38
+ return root.y
37
39
  }
38
40
  }
39
41
 
@@ -49,7 +51,7 @@ Menu {
49
51
  property: "opacity"
50
52
  from: 0
51
53
  to: 1
52
- duration: 70
54
+ duration: Utils.animationSpeed
53
55
  easing.type: Easing.InOutQuart
54
56
  }
55
57
  NumberAnimation {
@@ -116,4 +116,17 @@ MenuItem {
116
116
 
117
117
  Behavior on color { ColorAnimation { duration: Utils.animationSpeed; easing.type: Easing.OutQuart } }
118
118
  }
119
+
120
+ // States //
121
+ // 状态变化
122
+ states: [
123
+ State {
124
+ name: "disabled"
125
+ when: !enabled
126
+ PropertyChanges {
127
+ target: root
128
+ opacity: 0.3628
129
+ }
130
+ }
131
+ ]
119
132
  }
@@ -18,6 +18,8 @@ RowLayout {
18
18
  property int pushEnterFromY: height
19
19
  property var window: parent // 窗口对象
20
20
 
21
+ signal pageChanged() // 页面切换信号
22
+
21
23
  id: navigationView
22
24
  anchors.fill: parent
23
25
 
@@ -195,6 +197,7 @@ RowLayout {
195
197
  navigationBar.lastPages.push(navigationBar.currentPage) // 记录当前页面
196
198
  navigationBar.lastPages = navigationBar.lastPages // refresh
197
199
  navigationBar.currentPage = page.toString()
200
+ pageChanged()
198
201
 
199
202
  if (page instanceof Component) {
200
203
  // let obj = page.createObject(stackView)
@@ -118,7 +118,13 @@ Frame {
118
118
  }
119
119
  Text {
120
120
  id: bodyText
121
- property bool wrap: (parent.width - titleText.width - custom.width - 24) < implicitWidth
121
+ property bool wrap: (
122
+ (
123
+ infoBar.width - iconWidget.width - rights.width - main.spacing * 2 - infoBar.padding * 2
124
+ - (titleText.width + custom.width + 24)
125
+ )
126
+ < implicitWidth
127
+ )
122
128
  width: wrap ?
123
129
  parent.width : implicitWidth
124
130
  typography: Typography.Body
@@ -0,0 +1,146 @@
1
+ import QtQuick 2.15
2
+ import Qt5Compat.GraphicalEffects
3
+ import QtQuick.Controls.Basic 2.15
4
+ import "../../themes"
5
+ import "../../components"
6
+
7
+ TextArea {
8
+ id: root
9
+
10
+ property bool frameless: false
11
+ property bool editable: true
12
+ property color primaryColor: Theme.currentTheme.colors.primaryColor
13
+
14
+ selectByMouse: true
15
+ enabled: editable
16
+
17
+ // Menu
18
+ Menu {
19
+ id: contextMenu
20
+ position: -1
21
+ Action {
22
+ icon.name: "ic_fluent_cut_20_regular"
23
+ text: qsTr("Cut")
24
+ enabled: root.selectedText.length > 0 && root.editable // 选中&可编辑
25
+ shortcut: "Ctrl+X"
26
+ onTriggered: root.cut()
27
+ }
28
+ Action {
29
+ icon.name: "ic_fluent_copy_20_regular"
30
+ text: qsTr("Copy")
31
+ enabled: root.selectedText.length > 0 // 选中内容
32
+ shortcut: "Ctrl+C"
33
+ onTriggered: root.copy()
34
+ }
35
+ Action {
36
+ icon.name: "ic_fluent_clipboard_paste_20_regular"
37
+ text: qsTr("Paste")
38
+ enabled: root.editable
39
+ shortcut: "Ctrl+V"
40
+ onTriggered: root.paste()
41
+ }
42
+ Action {
43
+ icon.name: " "
44
+ text: qsTr("Select All")
45
+ shortcut: "Ctrl+A"
46
+ onTriggered: root.selectAll()
47
+ }
48
+ }
49
+
50
+ MouseArea {
51
+ anchors.fill: parent
52
+ acceptedButtons: Qt.RightButton
53
+ propagateComposedEvents: true
54
+ onPressed: (mouse) => {
55
+ if (mouse.button === Qt.RightButton)
56
+ contextMenu.popup(mouse.scenePosition)
57
+ mouse.accepted = false
58
+ }
59
+
60
+ // 鼠标
61
+ cursorShape: Qt.IBeamCursor
62
+ }
63
+
64
+ // 背景 / Background //
65
+ background: Rectangle {
66
+ id: background
67
+ anchors.fill: parent
68
+ radius: Theme.currentTheme.appearance.buttonRadius
69
+ color: frameless ? "transparent" : Theme.currentTheme.colors.controlColor
70
+ clip: true
71
+ border.width: Theme.currentTheme.appearance.borderWidth
72
+ border.color: frameless ? root.activeFocus ? Theme.currentTheme.colors.controlBorderColor : "transparent" :
73
+ Theme.currentTheme.colors.controlBorderColor
74
+
75
+ layer.enabled: true
76
+ layer.smooth: true
77
+ layer.effect: OpacityMask {
78
+ maskSource: Rectangle {
79
+ width: background.width
80
+ height: background.height
81
+ radius: background.radius
82
+ }
83
+ }
84
+
85
+ // 底部指示器 / indicator //
86
+ Rectangle {
87
+ id: indicator
88
+ width: parent.width
89
+ anchors.horizontalCenter: parent.horizontalCenter
90
+ anchors.bottom: parent.bottom
91
+ radius: 999
92
+ height: root.activeFocus ? Theme.currentTheme.appearance.borderWidth * 2 : Theme.currentTheme.appearance.borderWidth
93
+ color: root.activeFocus ? primaryColor : frameless ? "transparent" : Theme.currentTheme.colors.textControlBorderColor
94
+
95
+ Behavior on color { ColorAnimation { duration: Utils.animationSpeed; easing.type: Easing.OutQuint } }
96
+ Behavior on height { NumberAnimation { duration: Utils.animationSpeed; easing.type: Easing.OutQuint } }
97
+ }
98
+ }
99
+
100
+ Behavior on opacity { NumberAnimation { duration: Utils.animationSpeed; easing.type: Easing.OutQuint } }
101
+
102
+
103
+ // 字体 / Font //
104
+ font.pixelSize: Theme.currentTheme.typography.bodySize
105
+
106
+ wrapMode: Text.WordWrap // 自动换行
107
+ selectionColor: Theme.currentTheme.colors.primaryColor
108
+ color: Theme.currentTheme.colors.textColor
109
+ placeholderTextColor: Theme.currentTheme.colors.textSecondaryColor
110
+
111
+ leftPadding: 12
112
+ rightPadding: 12
113
+ topPadding: 5
114
+ bottomPadding: 7
115
+
116
+ // 动画 / Animation //
117
+ Behavior on implicitHeight { NumberAnimation { duration: Utils.animationSpeed; easing.type: Easing.OutQuint } }
118
+
119
+ // 状态
120
+ states: [
121
+ State {
122
+ name: "disabled"
123
+ when: !enabled
124
+ PropertyChanges { // 禁用时禁止改变属性
125
+ target: root;
126
+ opacity: !editable ? 1 : 0.4
127
+ }
128
+ },
129
+ State {
130
+ name: "pressed&focused"
131
+ when: activeFocus
132
+ PropertyChanges {
133
+ target: background;
134
+ color: Theme.currentTheme.colors.controlInputActiveColor
135
+ }
136
+ },
137
+ State {
138
+ name: "hovered"
139
+ when: hovered
140
+ PropertyChanges {
141
+ target: background;
142
+ color: Theme.currentTheme.colors.controlSecondaryColor
143
+ }
144
+ }
145
+ ]
146
+ }
@@ -2,6 +2,7 @@ import QtQuick 2.15
2
2
  import Qt5Compat.GraphicalEffects
3
3
  import QtQuick.Controls.Basic 2.15
4
4
  import "../../themes"
5
+ import "../../components"
5
6
 
6
7
  TextField {
7
8
  id: root
@@ -13,6 +14,53 @@ TextField {
13
14
  selectByMouse: true
14
15
  enabled: editable
15
16
 
17
+ // Menu
18
+ Menu {
19
+ id: contextMenu
20
+ position: -1
21
+ Action {
22
+ icon.name: "ic_fluent_cut_20_regular"
23
+ text: qsTr("Cut")
24
+ enabled: root.selectedText.length > 0 && root.editable // 选中&可编辑
25
+ shortcut: "Ctrl+X"
26
+ onTriggered: root.cut()
27
+ }
28
+ Action {
29
+ icon.name: "ic_fluent_copy_20_regular"
30
+ text: qsTr("Copy")
31
+ enabled: root.selectedText.length > 0 // 选中内容
32
+ shortcut: "Ctrl+C"
33
+ onTriggered: root.copy()
34
+ }
35
+ Action {
36
+ icon.name: "ic_fluent_clipboard_paste_20_regular"
37
+ text: qsTr("Paste")
38
+ enabled: root.editable
39
+ shortcut: "Ctrl+V"
40
+ onTriggered: root.paste()
41
+ }
42
+ Action {
43
+ icon.name: " "
44
+ text: qsTr("Select All")
45
+ shortcut: "Ctrl+A"
46
+ onTriggered: root.selectAll()
47
+ }
48
+ }
49
+
50
+ MouseArea {
51
+ anchors.fill: parent
52
+ acceptedButtons: Qt.RightButton
53
+ propagateComposedEvents: true
54
+ onPressed: (mouse) => {
55
+ if (mouse.button === Qt.RightButton)
56
+ contextMenu.popup(mouse.scenePosition)
57
+ mouse.accepted = false
58
+ }
59
+
60
+ // 鼠标
61
+ cursorShape: Qt.IBeamCursor
62
+ }
63
+
16
64
  // 背景 / Background //
17
65
  background: Rectangle {
18
66
  id: background
RinUI/components/qmldir CHANGED
@@ -14,6 +14,7 @@ ScrollView 1.0 ScrollView.qml
14
14
 
15
15
  # Basic Input
16
16
  Button 1.0 BasicInput/Button.qml
17
+ RoundButton 1.0 BasicInput/RoundButton.qml
17
18
  HyperlinkButton 1.0 BasicInput/HyperlinkButton.qml
18
19
  Slider 1.0 BasicInput/Slider.qml
19
20
  Hyperlink 1.0 BasicInput/Hyperlink.qml
RinUI/core/config.py CHANGED
@@ -1,6 +1,7 @@
1
1
  import os
2
2
  import json
3
3
  import platform
4
+ import sys
4
5
  from enum import Enum
5
6
 
6
7
 
@@ -22,8 +23,18 @@ def is_windows():
22
23
  return platform.system() == 'Windows'
23
24
 
24
25
 
26
+ def resource_path(relative_path):
27
+ """兼容 PyInstaller 打包和开发环境的路径"""
28
+ if hasattr(sys, '_MEIPASS'):
29
+ return os.path.join(sys._MEIPASS, relative_path)
30
+ return os.path.abspath(relative_path)
31
+
32
+
33
+ rinui_core_path = os.path.abspath(os.path.dirname(__file__)) # RinUI/core 目录
34
+
25
35
  BASE_DIR = os.path.abspath(os.getcwd())
26
36
  PATH = os.path.join(BASE_DIR, "RinUI/config")
37
+ RINUI_PATH = resource_path(os.path.join(rinui_core_path, "../../")) # 使用 resource_path 处理路径
27
38
  DEFAULT_CONFIG = {
28
39
  "language": "zh_CN",
29
40
  "theme": {
RinUI/core/launcher.py CHANGED
@@ -1,18 +1,12 @@
1
1
  import os
2
2
  import sys
3
3
 
4
- from PySide6.QtCore import QCoreApplication
4
+ from PySide6.QtCore import QCoreApplication, QUrl
5
+ from PySide6.QtGui import QIcon
5
6
  from PySide6.QtWidgets import QApplication, QWidget, QPushButton, QVBoxLayout
6
7
  from PySide6.QtQml import QQmlApplicationEngine
7
8
  from .theme import ThemeManager
8
- from .config import BackdropEffect, is_windows, Theme
9
-
10
-
11
- def resource_path(relative_path):
12
- """兼容 PyInstaller 打包和开发环境的路径"""
13
- if hasattr(sys, '_MEIPASS'):
14
- return os.path.join(sys._MEIPASS, relative_path)
15
- return os.path.abspath(relative_path)
9
+ from .config import BackdropEffect, is_windows, Theme, RINUI_PATH
16
10
 
17
11
 
18
12
  class TestWindow(QWidget):
@@ -30,18 +24,12 @@ class TestWindow(QWidget):
30
24
 
31
25
 
32
26
  class RinUIWindow:
33
- # _instance = None
34
- #
35
- # def __new__(cls, *args, **kwargs): # 单例模式管理
36
- # if cls._instance is None:
37
- # cls._instance = super().__new__(cls)
38
- # return cls._instance
39
-
40
27
  def __init__(self, qml_path: str):
41
28
  """
42
29
  创建基于 RinUI 的 QML 应用程序。
43
30
  :param qml_path: str, QML 文件路径
44
31
  """
32
+ super().__init__()
45
33
  if hasattr(self, "_initialized") and self._initialized:
46
34
  return
47
35
  self._initialized = True
@@ -63,8 +51,7 @@ class RinUIWindow:
63
51
  def _setup_application(self):
64
52
  """Setup"""
65
53
  # RInUI 模块
66
- rinui_path = os.path.abspath(os.path.dirname(__file__)) # RinUI/core 目录
67
- rinui_import_path = resource_path(os.path.join(rinui_path, "../../")) # 使用 resource_path 处理路径
54
+ rinui_import_path = RINUI_PATH
68
55
  print(f"UI Module Path: {rinui_import_path}")
69
56
 
70
57
  if os.path.exists(rinui_import_path):
@@ -88,6 +75,19 @@ class RinUIWindow:
88
75
  self.theme_manager.set_window(self.root_window)
89
76
  self._apply_windows_effects() if self.autoSetWindowsEffect else None
90
77
 
78
+ def setIcon(self, path: str) -> None:
79
+ """
80
+ 设置应用程序图标。
81
+ :param path: str, 图标路径
82
+ :return:
83
+ """
84
+ app_instance = QApplication.instance()
85
+ if app_instance:
86
+ app_instance.setWindowIcon(QIcon(path)) # 设置应用程序图标
87
+ self.root_window.setProperty('icon', QUrl.fromLocalFile(path))
88
+ else:
89
+ raise RuntimeError("Cannot set icon before QApplication is created.")
90
+
91
91
  def _apply_windows_effects(self):
92
92
  """
93
93
  Apply Windows effects to the window.
RinUI/qmldir CHANGED
@@ -8,6 +8,8 @@ FocusIndicator 1.0 components/FocusIndicator.qml
8
8
 
9
9
  # Basic Input
10
10
  Button 1.0 components/BasicInput/Button.qml
11
+ RoundButton 1.0 components/BasicInput/RoundButton.qml
12
+ PillButton 1.0 components/BasicInput/PillButton.qml
11
13
  DropDownButton 1.0 components/BasicInput/DropDownButton.qml
12
14
  ToggleButton 1.0 components/BasicInput/ToggleButton.qml
13
15
  ToolButton 1.0 components/BasicInput/ToolButton.qml
@@ -20,11 +22,13 @@ Slider 1.0 components/BasicInput/Slider.qml
20
22
 
21
23
  # Date & Time
22
24
  TimePicker 1.0 components/DateAndTime/TimePicker.qml
25
+ DatePicker 1.0 components/DateAndTime/DatePicker.qml
23
26
  PickerView 1.0 components/DateAndTime/PickerView.qml
24
27
 
25
28
  # Dialogs & Flyouts
26
29
  Dialog 1.0 components/DialogsAndFlyouts/Dialog.qml
27
30
  Flyout 1.0 components/DialogsAndFlyouts/Flyout.qml
31
+ TeachingTip 1.0 components/DialogsAndFlyouts/TeachingTip.qml
28
32
 
29
33
  # Layout
30
34
  Expander 1.0 components/Layout/Expander.qml
@@ -35,6 +39,7 @@ SettingItem 1.0 components/Layout/SettingItem.qml
35
39
  # Text
36
40
  Text 1.0 components/Text/Text.qml
37
41
  TextField 1.0 components/Text/TextField.qml
42
+ TextArea 1.0 components/Text/TextArea.qml
38
43
  SpinBox 1.0 components/Text/SpinBox.qml
39
44
  TextInput 1.0 components/Text/TextInput.qml
40
45
 
RinUI/themes/utils.qml CHANGED
@@ -5,7 +5,7 @@ import "../themes"
5
5
  import "../utils"
6
6
 
7
7
  QtObject {
8
- property string fontFamily: Qt.application.font.family // 默认字体
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
11
  property string fontIconIndexSource: Qt.resolvedUrl("../assets/fonts/FluentSystemIcons-Index.js") // 字体图标索引路径
@@ -26,4 +26,8 @@ QtObject {
26
26
  function loadFontIconIndex() {
27
27
  Qt.include(fontIconIndexSource);
28
28
  }
29
+
30
+ Component.onCompleted: {
31
+ console.log("Font Family: " + fontFamily)
32
+ }
29
33
  }
@@ -42,12 +42,6 @@ ApplicationWindow {
42
42
  }
43
43
  }
44
44
 
45
- FloatLayer {
46
- id: floatLayer
47
- anchors.topMargin: titleBarHeight
48
- z: 998
49
- }
50
-
51
45
  // 布局
52
46
  ColumnLayout {
53
47
  anchors.fill: parent
@@ -117,6 +111,12 @@ ApplicationWindow {
117
111
  }
118
112
  }
119
113
 
114
+ FloatLayer {
115
+ id: floatLayer
116
+ anchors.topMargin: titleBarHeight
117
+ z: 998
118
+ }
119
+
120
120
 
121
121
  //改变鼠标形状
122
122
  MouseArea {
@@ -57,6 +57,10 @@ Item {
57
57
 
58
58
  onPressed: {
59
59
  clickPos = Qt.point(mouseX, mouseY)
60
+
61
+ if (!(Qt.platform.os !== "windows" || Qt.platform.os !== "winrt") && !Theme.isThemeMgrInitialized()) {
62
+ return // 在win环境使用原生方法拖拽
63
+ }
60
64
  Theme.sendDragWindowEvent(window)
61
65
  }
62
66
  onDoubleClicked: toggleMaximized()
@@ -5,5 +5,5 @@ import "../../windows"
5
5
  FluentWindowBase {
6
6
  id: baseWindow
7
7
  frameless: false
8
- default property alias content: baseWindow.data
8
+ default property alias content: baseWindow.content
9
9
  }
@@ -3,6 +3,7 @@ import QtQuick.Controls 2.15
3
3
  import QtQuick.Layouts 2.15
4
4
  import "../../windows"
5
5
  import "../../themes"
6
+ import "../../utils"
6
7
 
7
8
  Window {
8
9
  id: baseWindow
@@ -37,6 +38,12 @@ Window {
37
38
  }
38
39
  }
39
40
 
41
+ FloatLayer {
42
+ id: floatLayer
43
+ anchors.topMargin: titleBarHeight
44
+ z: 998
45
+ }
46
+
40
47
  // 标题栏
41
48
  TitleBar {
42
49
  id: titleBar
@@ -38,7 +38,7 @@ With simple configuration, you can quickly develop elegant UI interfaces in the
38
38
 
39
39
  ## 🪄 Usage
40
40
 
41
- You can install RinUI via pip: (coming soon, but now you can install via test-pypi)
41
+ You can install RinUI via pip:
42
42
  ```bash
43
43
  pip install RinUI
44
44
  ```
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: RinUI
3
- Version: 0.0.9.1.post1
3
+ Version: 0.0.10
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
@@ -53,7 +53,7 @@ With simple configuration, you can quickly develop elegant UI interfaces in the
53
53
 
54
54
  ## 🪄 Usage
55
55
 
56
- You can install RinUI via pip: (coming soon, but now you can install via test-pypi)
56
+ You can install RinUI via pip:
57
57
  ```bash
58
58
  pip install RinUI
59
59
  ```
@@ -1,6 +1,6 @@
1
- RinUI/__init__.py,sha256=NfnWWrObwBEIy8xDAMVeUIGDaYj87hjcKAiuEHwDys0,71
2
- RinUI/qmldir,sha256=m2jK729cnWNe-Kn9ppOcSWy0KH1Y2_Poym2RxI1OPdI,3181
3
- RinUI/__pycache__/__init__.cpython-38.pyc,sha256=BD69Qj3x4AzO9vVspY2mwz62BRUzS1px8JgieZLSJ3I,220
1
+ RinUI/__init__.py,sha256=P1Pu8kQzTikIsIIJmukwaSMmpUG_r5fxnqgjAux3l0s,70
2
+ RinUI/qmldir,sha256=Wml5zu7-V4EYjyDzCpJaEJxTDQOhigwnFQm7ab2k4lo,3448
3
+ RinUI/__pycache__/__init__.cpython-38.pyc,sha256=Q-pcVUmh-8iobgHu0oaBXsCfhJCw7rvRiaQFjLI6H6M,221
4
4
  RinUI/assets/fonts/FluentSystemIcons-Index.js,sha256=XCgcjUnuZjdsjXUu37llGDpQW8sSJbxwmh-hG6UTB2A,258677
5
5
  RinUI/assets/fonts/FluentSystemIcons-Resizable.ttf,sha256=-IfF3NT1eODD0vOLVLC0Z2U5bsR6woSQAziX3qD1TqU,1447252
6
6
  RinUI/assets/img/default_app_icon.png,sha256=hegCgNlRFhVCTBhrY3ESzPeMWlkZOe5IgXsHWeTArPQ,93928
@@ -12,19 +12,21 @@ RinUI/components/Indicator.qml,sha256=yIC96KZo6vhXE1aEX7wz2m2iwb8KXBWCqgxKrsLomT
12
12
  RinUI/components/ScrollBar.qml,sha256=01Qo9eAYRzEQhIU4oD2E7lCLdFGCmekhO32z-DCqo4o,7118
13
13
  RinUI/components/ScrollView.qml,sha256=S6GuZm9lptsZduH-xVDGKkS3BqGqi8EmyiBFvbVFAgM,275
14
14
  RinUI/components/Shadow.qml,sha256=YmVgAPAIY69ur57EDMDKMihx6ucI973SWyff01L8r0s,1638
15
- RinUI/components/qmldir,sha256=EBA8y0QoGI9-ed0DAl-q8AY_m3CAMH76OVob0Xx2rug,2197
15
+ RinUI/components/qmldir,sha256=TfQyDUQZFpKilIHajbrHCU4UQBOH3IW1AVpDUVLKekk,2241
16
16
  RinUI/components/BasicInput/Button.qml,sha256=vyi214-iYvp82u5pg2xHWJwjKifZKSt2NXTuvYlRFHg,5430
17
17
  RinUI/components/BasicInput/CheckBox.qml,sha256=hFSaKw5LLqSVZXTASQ5csCkTHUOBRZ700v4hm6uEfFM,3183
18
18
  RinUI/components/BasicInput/ComboBox.qml,sha256=OOJSoLGBnNJ8O--htkZfT8VDu7jAwHYbS-B_NB9J-SA,4748
19
19
  RinUI/components/BasicInput/DropDownButton.qml,sha256=loDUw_k9GeBUFSgb3McRIdCuLxptoj5Vc8jxinJMoCE,410
20
20
  RinUI/components/BasicInput/Hyperlink.qml,sha256=WGFuTNCD8xfvdKDMgohKT4bvU8_qK1iv5SJYeqJk4Kg,346
21
+ RinUI/components/BasicInput/PillButton.qml,sha256=D5P4HKd99OVwKMYerm1omo6obleCur_HO_Y-WF13b28,215
21
22
  RinUI/components/BasicInput/RadioButton.qml,sha256=lck3xdKO778ukm5jjHflGNXnDsxdBPMHTisD9GnQYS0,3129
23
+ RinUI/components/BasicInput/RoundButton.qml,sha256=Ex-NnD3qcYQqdreL-Gv8NOYkv0u7b67fPCu4soZGCEM,1048
22
24
  RinUI/components/BasicInput/Slider.qml,sha256=XJ0gXqHrBffF0PNDpx7TWxFTyZ7NAOxLU8Hg4c3XV9Y,7157
23
25
  RinUI/components/BasicInput/Switch.qml,sha256=6CMQKKAs7tdIT_bdTplUk50bS7ywunYtqfT2v2sOhrI,3359
24
26
  RinUI/components/BasicInput/ToggleButton.qml,sha256=y3bm0agSYT1v4Jzs_-JgAFNf5b_oBzliUyL6QChM6rA,210
25
27
  RinUI/components/BasicInput/ToolButton.qml,sha256=jz2-ddMGdFQIoPHCwOIVbYsp6mRwZgAGrowNHs8P3QU,953
26
- RinUI/components/DateAndTime/DatePicker.qml,sha256=KKOVLvKPm5moYIZaRxesRzi9v2pAK5xypCIfDda7N_Q,3844
27
- RinUI/components/DateAndTime/PickerView.qml,sha256=rE7XbDhWKsERYFIgFGk5hsWz-5nR8pH3siotoyjS7Jg,7040
28
+ RinUI/components/DateAndTime/DatePicker.qml,sha256=vP3SPpJ21ObxYUqEc7hzbJUsFTaiM_D3aSZgIQGM8ys,4776
29
+ RinUI/components/DateAndTime/PickerView.qml,sha256=Av2ybHDQ-Hc00cxi3g97y0wyXZ_aCgq27LQkq9c9dBA,7280
28
30
  RinUI/components/DateAndTime/TimePicker.qml,sha256=KKOVLvKPm5moYIZaRxesRzi9v2pAK5xypCIfDda7N_Q,3844
29
31
  RinUI/components/DialogsAndFlyouts/Dialog.qml,sha256=KIIswm78ly6BK37wfb5mg26CjpGr-ehp0YdTpo902io,2759
30
32
  RinUI/components/DialogsAndFlyouts/DialogButtonBox.qml,sha256=60vE_o-3IgF8Ol0OkobJTeWYE4xaxiD1jFoKN1ZARXg,1174
@@ -40,9 +42,9 @@ RinUI/components/ListAndCollections/ListViewDelegate.qml,sha256=AQAsrtleMO5t3601
40
42
  RinUI/components/ListAndCollections/SettingCard.qml,sha256=CaR-MQnMIFjwnVM0VhI2IqSenBNtz_kGA4ExzxAjmLE,2208
41
43
  RinUI/components/ListAndCollections/TableView.qml,sha256=RJZQPb4yIdcE1jUJ4iQOHDSB5l4O3s7g3oKSuRaubI0,2232
42
44
  RinUI/components/ListAndCollections/TableViewDelegate.qml,sha256=lH19q3Vx9X6TYhgnRlwi7RGnAtb_k3dBbgJZlnQnEmE,2371
43
- RinUI/components/MenusAndToolbars/Menu.qml,sha256=otaZk53Yv-A9lcWsBLz8KASXYb1nd3_JPpPBy5xs4DM,4567
45
+ RinUI/components/MenusAndToolbars/Menu.qml,sha256=AbnOkFR6nweWIBe1A4dsnZmb3eHHjqfokMVRNed-PPU,4653
44
46
  RinUI/components/MenusAndToolbars/MenuBar.qml,sha256=HR1pSTqklkLFiGkOTGxgRO9WFtsKRlxAT1sSzqYVP7Q,1097
45
- RinUI/components/MenusAndToolbars/MenuItem.qml,sha256=bxQqzotp3DhBS7MiWjqGFinF8UD1v0-yB8qWrRp-pmI,3661
47
+ RinUI/components/MenusAndToolbars/MenuItem.qml,sha256=XghKdgYVksNKS1zufNtE96c0pnTQg6Dig_8ZNGqip84,3915
46
48
  RinUI/components/MenusAndToolbars/MenuItemGroup.qml,sha256=ywDv4KypNoTQbiDTeIedBj7Dfvcy9jdFtwwK7hSaozE,1057
47
49
  RinUI/components/MenusAndToolbars/MenuSeparator.qml,sha256=Z2G339bFrwOzRpWSqqahjmgJL5u-k-sw3g1uAHXerxQ,270
48
50
  RinUI/components/MenusAndToolbars/ToolSeparator.qml,sha256=rZXXNnvKw3yZVptj1bOronPDkiYCId1ffAt-a3t-ea4,430
@@ -50,26 +52,26 @@ RinUI/components/Navigation/ErrorPage.qml,sha256=uQ3UBby1vP6-SBjw1_7aU6hRNXmcqNd
50
52
  RinUI/components/Navigation/NavigationBar.qml,sha256=RR8PjDNl0lqfwcvnx0EvooAnVx4db6Q8o1L03ghzdlE,5075
51
53
  RinUI/components/Navigation/NavigationItem.qml,sha256=YzveFBTT4I-NVF40NSVD3GCOgP0qdK3aWMA_3IGxuP0,5947
52
54
  RinUI/components/Navigation/NavigationSubItem.qml,sha256=Xap5EX41SWPOIzvd9FmTR4-zJIwHTe2OvestK_j_jso,3041
53
- RinUI/components/Navigation/NavigationView.qml,sha256=IQCan4K2NaU6lSH0RmgCZNv1JT2StciJAxsoSXNH9ck,7422
55
+ RinUI/components/Navigation/NavigationView.qml,sha256=8RQh88UbCBvxL9FQDnnMznCy0PR2kAE6-ppudzZQj_k,7496
54
56
  RinUI/components/Navigation/SelectorBar.qml,sha256=ivxG2N0vHKRQ0anRRF9HFlvHlODH34ZOh_hVWuieG2E,1835
55
57
  RinUI/components/StatusAndInfo/InfoBadge.qml,sha256=AmyrUwPLP62x83mFlZu6aio7DFOtVK6mKhPVMVBjpQw,2457
56
- RinUI/components/StatusAndInfo/InfoBar.qml,sha256=Z18svV2ktCeB5xyUF0ZwgQBQ4yYYftX790DhOmFaC4Y,7557
58
+ RinUI/components/StatusAndInfo/InfoBar.qml,sha256=wkage6PWUn2S-J_3T8IaIg7MrsMcGukZ9zqiE-L00WI,7771
57
59
  RinUI/components/StatusAndInfo/ProgressBar.qml,sha256=RAivKVM8C3JcQFjR6VZPz0H7XqWpSPq5G9qfnh2ABmQ,3515
58
60
  RinUI/components/StatusAndInfo/Toast.qml,sha256=9T8i9JswzGEXZM8CeZbwWsILEbzymy2ZaPwJEUBXXTw,7051
59
61
  RinUI/components/StatusAndInfo/ToolTip.qml,sha256=js0t8IJ6bnYt8JHHMQwS49MQOhaBjLNYP_libFbZROk,2757
60
62
  RinUI/components/Text/SpinBox.qml,sha256=YC1CjlHauP081qtseFQuSDNCUsCnCgtjh8nfgPqCZfU,4229
61
63
  RinUI/components/Text/Text.qml,sha256=-VaPy0W4d8mE6C1crSA0ADReKdA_NlghxaS5iV_8RYg,1758
62
- RinUI/components/Text/TextField.qml,sha256=yZeXX4TNbUEixB43uZ6X4vcpLnMplmIO1bqsFAJei1c,3160
64
+ RinUI/components/Text/TextArea.qml,sha256=BQmJIUHyWuTgTr4FP1XvFfGDFwt5bTT8rZ-v_eam-O8,4758
65
+ RinUI/components/Text/TextField.qml,sha256=2S6x5iUWyemwm5vlywpK6YHy_QAezfZnznVVHDignH8,4570
63
66
  RinUI/components/Text/TextInput.qml,sha256=dShTgTHPgZcwy4qI-fCxXtBBcR4ebkl94hipq5Nadn4,1210
64
- RinUI/components/Utils/Blur.qml,sha256=HXChzMeBTrNUl-ZZkKN1d2s3L0Yq6b14WsvUjUpPnbY,1146
65
67
  RinUI/config/rin_ui.json,sha256=rDCS0TVFt1VowGlcW_jqOM81DWwkV7S8Z5rae2p4TSk,149
66
68
  RinUI/core/__init__.py,sha256=lm9MTtS7ZrvwpRDXatPehvJSnLPKnet4MY3R5T69kxM,147
67
- RinUI/core/config.py,sha256=n8PLI_t7vpM5kbywmcNgw7tixGgIgf4p8C2eaQk2KDs,3116
68
- RinUI/core/launcher.py,sha256=qHpjzaBI8ZfIItmYU6XiJfd_vWv1f9YSAD_FDvzBwK0,5160
69
+ RinUI/core/config.py,sha256=l4LZZ54XsP6r7ZmhslgxonrTFX16qOojtKejILwJsv8,3554
70
+ RinUI/core/launcher.py,sha256=qRKdBqLYmM4_ZqMeFl-6tBkpkqKEjSvgtqDf5zfiJE0,5119
69
71
  RinUI/core/theme.py,sha256=q8vqq5LP1zlGCLMmOfNQv47qcMtoDYqm0J7HwIC74g4,11203
70
- RinUI/core/__pycache__/__init__.cpython-38.pyc,sha256=vaddDk6APcPCgXCXDFxYhxCjErIB9R1Lo_DKZ5WEPL4,362
71
- RinUI/core/__pycache__/config.cpython-38.pyc,sha256=CfTGNkyEFqGAKwrMboLd29BUk8Ddu6wbSF13dyoXbnE,3752
72
- RinUI/core/__pycache__/launcher.cpython-38.pyc,sha256=_1iW7iOs3m9HOMFkkP5OwBzJDVsBDZbf539e7-jtWp4,5117
72
+ RinUI/core/__pycache__/__init__.cpython-38.pyc,sha256=UVtd9E2Qhoc6XOdcEVXncZHsI4yETMhwEaWxB6kw8Qg,362
73
+ RinUI/core/__pycache__/config.cpython-38.pyc,sha256=Zh8NQ7EoG4Y_fMfu3UJLOUJP2E-sitgYbfbZ_2x-Js0,4122
74
+ RinUI/core/__pycache__/launcher.cpython-38.pyc,sha256=VY7h9U7tS1HuHm2J2oZCt2mHExeJAa5O0yGxwoADXJA,5336
73
75
  RinUI/core/__pycache__/theme.cpython-38.pyc,sha256=CqxoFJO4dwpFfdqWnD5FlCqMEj_xWMvayoFaQCpvf7I,10041
74
76
  RinUI/hooks/__init__.py,sha256=zer67JRQ-h9uvQmutYU2Us5oBjSJnBVzgR1Sl_5aPF0,77
75
77
  RinUI/hooks/hook-RinUI.py,sha256=9DW9x8zgpEsZpaAAUW-0LE_B69od1wBcUviVRnrAfMI,119
@@ -77,7 +79,7 @@ RinUI/themes/dark.qml,sha256=2SV9KS2Wj-kILefm2qHg4rcNbo99gice88MiEJcNM3I,5396
77
79
  RinUI/themes/light.qml,sha256=4zcR9Xye6iSq6pSywEaOryhTRgAlHeJoEnp9YsaG5gQ,5343
78
80
  RinUI/themes/qmldir,sha256=cpBqpZ_vfZyOwWzAT9MEEVruyJkSWi3RVV6Qj0RVrGI,125
79
81
  RinUI/themes/theme.qml,sha256=AAviilBJ6aXBjjmc1dpSxvzAnlmYWGUTBXbMW2ee6cs,3693
80
- RinUI/themes/utils.qml,sha256=-bpCXAA4slNStBjfhN07PM4OQUPLpPnanQn-p31gFU0,1390
82
+ RinUI/themes/utils.qml,sha256=iXrUTUcMQZpS1kaq3oUwXivswv18FGImVVL2hXtr_B0,1481
81
83
  RinUI/utils/Animation.qml,sha256=Z--MRYr-bZqKX_QyZ4c0Z74g72i0k7aPzTBEUhTfiGo,146
82
84
  RinUI/utils/FloatLayer.qml,sha256=W-TaM8gCt6YWU46V_pDonyxNMlR-iEcg27FMl-FYV58,3323
83
85
  RinUI/utils/FontIconLoader.qml,sha256=DEUH-GlcI5q0PbCsvsvq1t-uPzEZo0-A-Gqt5t1eoFg,307
@@ -88,16 +90,16 @@ RinUI/utils/qmldir,sha256=0tTlmbIgNtRRNgqAJ2IAloJIAtwO6lXITV3ciaWLpCs,193
88
90
  RinUI/windows/CtrlBtn.qml,sha256=R4c_ZQxv2SFNnuOsCnq0_dH3THEQkZVl41ZFkVG8IR0,3390
89
91
  RinUI/windows/FluentPage.qml,sha256=UBhBZcQbO5hJNmXlOLlDVWSVYBlu73wa1CAKlxgjows,2840
90
92
  RinUI/windows/FluentWindow.qml,sha256=3GkWomOiS1sGPcQ7SQZxl65v-nIIbgig_M2tjy-WQq0,890
91
- RinUI/windows/FluentWindowBase.qml,sha256=hOyVe8oNIEC2T02BgbP65iADM4QF4HN8_MZIK9lGs2g,4822
92
- RinUI/windows/TitleBar.qml,sha256=nDMgvN9JDdywZX81dCwH3f90VQofhQNxVdQWEKSGZrg,3665
93
+ RinUI/windows/FluentWindowBase.qml,sha256=vsVnvkO_RshTEPQ_bKFEjIzJFJnAR11vDi0m9akF_PI,4822
94
+ RinUI/windows/TitleBar.qml,sha256=Vs0LR1ZW5kTVbkJpIFvH5uUGVWj2Gjtjq25XmF8TJK8,3875
93
95
  RinUI/windows/qmldir,sha256=8zVLwFf2mHV3QKp13YnR6OkayRpZl7bHpxSdRdBthK4,212
94
- RinUI/windows/window/ApplicationWindow.qml,sha256=qG3nnUQ5oOZPMg-1WCmJuZOuk5ZXomqMvWKnQcVA9Jg,193
95
- RinUI/windows/window/Window.qml,sha256=d88Y0C3-IZfWQkVxAw-9BylrDWLO7Q3VFarLPqHE_Po,3471
96
- rinui-0.0.9.1.post1.data/data/LICENSE,sha256=5tTvyBFn2yeDG5EfIkn4FRJKHXNKRomDVGxssfzXtqg,1084
97
- rinui-0.0.9.1.post1.data/data/README.md,sha256=K5MCB6OK0WZUZJTH8WczXltwpVX6P451kejSe4eoKeE,3033
98
- rinui-0.0.9.1.post1.dist-info/LICENSE,sha256=5tTvyBFn2yeDG5EfIkn4FRJKHXNKRomDVGxssfzXtqg,1084
99
- rinui-0.0.9.1.post1.dist-info/METADATA,sha256=cd3DGF4usEKExJFLgcKP9Trr-S9C6CoauRPe7WnOY5g,3579
100
- rinui-0.0.9.1.post1.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
101
- rinui-0.0.9.1.post1.dist-info/entry_points.txt,sha256=taxuZYCggoQa2LPubwcurQYRjBRC4cNYOjWaqOYZVxw,54
102
- rinui-0.0.9.1.post1.dist-info/top_level.txt,sha256=vKKjXBXEw5OFRIzTxZWUC5ZOj0CK5e3atbymBB4eJ6w,6
103
- rinui-0.0.9.1.post1.dist-info/RECORD,,
96
+ RinUI/windows/window/ApplicationWindow.qml,sha256=sVgqmUEk0bh0QfmF5trs7-W3FaEdYUIYDx7Tv5Pdeww,196
97
+ RinUI/windows/window/Window.qml,sha256=hQ6aPNv37my-A1cB3EwrxKr8HeYzQqv2LFlS8XCdqto,3603
98
+ rinui-0.0.10.data/data/LICENSE,sha256=5tTvyBFn2yeDG5EfIkn4FRJKHXNKRomDVGxssfzXtqg,1084
99
+ rinui-0.0.10.data/data/README.md,sha256=gx8GTGDQ3Kw1HJVjgYd0k77CLdLxAdEQL9vZZJde08o,2980
100
+ rinui-0.0.10.dist-info/LICENSE,sha256=5tTvyBFn2yeDG5EfIkn4FRJKHXNKRomDVGxssfzXtqg,1084
101
+ rinui-0.0.10.dist-info/METADATA,sha256=KHX0zuyIX8e_dKVM2qJTYnmjD009ZrRq_faKgQuaYbk,3519
102
+ rinui-0.0.10.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
103
+ rinui-0.0.10.dist-info/entry_points.txt,sha256=taxuZYCggoQa2LPubwcurQYRjBRC4cNYOjWaqOYZVxw,54
104
+ rinui-0.0.10.dist-info/top_level.txt,sha256=vKKjXBXEw5OFRIzTxZWUC5ZOj0CK5e3atbymBB4eJ6w,6
105
+ rinui-0.0.10.dist-info/RECORD,,
@@ -1,42 +0,0 @@
1
- import QtQuick
2
- import Qt5Compat.GraphicalEffects
3
- import FluentUI
4
-
5
- Item {
6
- id: control
7
- property color tintColor: Qt.rgba(1, 1, 1, 1)
8
- property real tintOpacity: 0.65
9
- property real luminosity: 0.01
10
- property real noiseOpacity: 0.02
11
- property var target
12
- property int blurRadius: 32
13
- property rect targetRect: Qt.rect(control.x, control.y, control.width,control.height)
14
-
15
- ShaderEffectSource {
16
- id: effect_source
17
- anchors.fill: parent
18
- visible: false
19
- sourceRect: control.targetRect
20
- sourceItem: control.target
21
- }
22
- FastBlur {
23
- id: fast_blur
24
- anchors.fill: parent
25
- source: effect_source
26
- radius: control.blurRadius
27
- }
28
- Rectangle {
29
- anchors.fill: parent
30
- color: Qt.rgba(1, 1, 1, luminosity)
31
- }
32
- Rectangle {
33
- anchors.fill: parent
34
- color: Qt.rgba(tintColor.r, tintColor.g, tintColor.b, tintOpacity)
35
- }
36
- Image {
37
- anchors.fill: parent
38
- source: "qrc:/qt/qml/FluentUI/Image/noise.png"
39
- fillMode: Image.Tile
40
- opacity: control.noiseOpacity
41
- }
42
- }