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/windows/CtrlBtn.qml
CHANGED
@@ -1,119 +1,119 @@
|
|
1
|
-
import QtQuick 2.12
|
2
|
-
import QtQuick.Controls 2.3
|
3
|
-
import QtQuick.Window 2.3
|
4
|
-
import "../themes"
|
5
|
-
import "../components"
|
6
|
-
|
7
|
-
|
8
|
-
Base {
|
9
|
-
id: root
|
10
|
-
interactive: true // 是否可以交互
|
11
|
-
property int mode: 0 //0:max 1:min 2:close
|
12
|
-
property alias icon: icon.icon
|
13
|
-
|
14
|
-
// tooltip
|
15
|
-
ToolTip {
|
16
|
-
parent: parent
|
17
|
-
delay: 500
|
18
|
-
visible: mouseArea.containsMouse
|
19
|
-
text: mode === 0 ? qsTr("Maximize") : mode === 1 ? qsTr("Minimize") : mode === 2 ? qsTr("Close") : qsTr("Unknown")
|
20
|
-
}
|
21
|
-
|
22
|
-
//关闭 最大化 最小化按钮
|
23
|
-
function toggleControl(mode) {
|
24
|
-
if (mode === 0) {
|
25
|
-
if (window.visibility === Window.Maximized) {
|
26
|
-
window.showNormal();
|
27
|
-
} else {
|
28
|
-
window.showMaximized();
|
29
|
-
}
|
30
|
-
} else if (mode===1) {
|
31
|
-
window.showMinimized();
|
32
|
-
} else if (mode===2) {
|
33
|
-
window.close();
|
34
|
-
}
|
35
|
-
}
|
36
|
-
|
37
|
-
width: 48
|
38
|
-
height: parent.height
|
39
|
-
|
40
|
-
|
41
|
-
// 背景 / Background
|
42
|
-
Rectangle {
|
43
|
-
id: background
|
44
|
-
anchors.fill: parent
|
45
|
-
color: mode === 2 ? Theme.currentTheme.colors.captionCloseColor : Theme.currentTheme.colors.subtleSecondaryColor
|
46
|
-
opacity: 0
|
47
|
-
|
48
|
-
Behavior on opacity { NumberAnimation { duration: 100; easing.type: Easing.InOutQuad } }
|
49
|
-
}
|
50
|
-
|
51
|
-
|
52
|
-
// 按钮图标
|
53
|
-
IconWidget {
|
54
|
-
id: icon
|
55
|
-
icon: mode === 0 ?
|
56
|
-
window.visibility === Window.Maximized ?
|
57
|
-
"ic_fluent_square_multiple_20_regular" :
|
58
|
-
"ic_fluent_square_20_regular" :
|
59
|
-
mode === 1 ?
|
60
|
-
"ic_fluent_subtract_20_regular" :
|
61
|
-
mode === 2 ?
|
62
|
-
"ic_fluent_dismiss_20_regular"
|
63
|
-
:
|
64
|
-
"ic_fluent_circle_20_regular" // unknown style
|
65
|
-
size: mode === 0 ? 14 : 16
|
66
|
-
anchors.centerIn: parent
|
67
|
-
}
|
68
|
-
|
69
|
-
// 鼠标区域 / MouseArea
|
70
|
-
MouseArea {
|
71
|
-
id: mouseArea
|
72
|
-
anchors.fill: parent
|
73
|
-
enabled: enabled
|
74
|
-
hoverEnabled: true
|
75
|
-
onClicked: {
|
76
|
-
toggleControl(mode)
|
77
|
-
}
|
78
|
-
}
|
79
|
-
|
80
|
-
states: [
|
81
|
-
State {
|
82
|
-
name: "disabledCtrl"
|
83
|
-
when: !enabled
|
84
|
-
PropertyChanges { // 禁用时禁止改变属性
|
85
|
-
target: icon;
|
86
|
-
opacity: 0.3614
|
87
|
-
}
|
88
|
-
PropertyChanges { // 禁用时禁止改变属性
|
89
|
-
target: root;
|
90
|
-
}
|
91
|
-
},
|
92
|
-
State {
|
93
|
-
name: "pressedCtrl"
|
94
|
-
when: mouseArea.pressed
|
95
|
-
PropertyChanges {
|
96
|
-
target: background;
|
97
|
-
opacity: 0.8
|
98
|
-
}
|
99
|
-
PropertyChanges {
|
100
|
-
target: icon;
|
101
|
-
opacity: 0.6063
|
102
|
-
color: root.mode === 2 ? Theme.currentTheme.colors.captionCloseTextColor : textColor
|
103
|
-
}
|
104
|
-
},
|
105
|
-
State {
|
106
|
-
name: "hoveredCtrl"
|
107
|
-
when: mouseArea.containsMouse
|
108
|
-
PropertyChanges {
|
109
|
-
target: background;
|
110
|
-
opacity: 1
|
111
|
-
}
|
112
|
-
PropertyChanges {
|
113
|
-
target: icon;
|
114
|
-
opacity: root.mode === 2 ? 1 : 0.6063
|
115
|
-
color: root.mode === 2 ? Theme.currentTheme.colors.captionCloseTextColor : textColor
|
116
|
-
}
|
117
|
-
}
|
118
|
-
]
|
1
|
+
import QtQuick 2.12
|
2
|
+
import QtQuick.Controls 2.3
|
3
|
+
import QtQuick.Window 2.3
|
4
|
+
import "../themes"
|
5
|
+
import "../components"
|
6
|
+
|
7
|
+
|
8
|
+
Base {
|
9
|
+
id: root
|
10
|
+
interactive: true // 是否可以交互
|
11
|
+
property int mode: 0 //0:max 1:min 2:close
|
12
|
+
property alias icon: icon.icon
|
13
|
+
|
14
|
+
// tooltip
|
15
|
+
ToolTip {
|
16
|
+
parent: parent
|
17
|
+
delay: 500
|
18
|
+
visible: mouseArea.containsMouse
|
19
|
+
text: mode === 0 ? qsTr("Maximize") : mode === 1 ? qsTr("Minimize") : mode === 2 ? qsTr("Close") : qsTr("Unknown")
|
20
|
+
}
|
21
|
+
|
22
|
+
//关闭 最大化 最小化按钮
|
23
|
+
function toggleControl(mode) {
|
24
|
+
if (mode === 0) {
|
25
|
+
if (window.visibility === Window.Maximized) {
|
26
|
+
window.showNormal();
|
27
|
+
} else {
|
28
|
+
window.showMaximized();
|
29
|
+
}
|
30
|
+
} else if (mode===1) {
|
31
|
+
window.showMinimized();
|
32
|
+
} else if (mode===2) {
|
33
|
+
window.close();
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
width: 48
|
38
|
+
height: parent.height
|
39
|
+
|
40
|
+
|
41
|
+
// 背景 / Background
|
42
|
+
Rectangle {
|
43
|
+
id: background
|
44
|
+
anchors.fill: parent
|
45
|
+
color: mode === 2 ? Theme.currentTheme.colors.captionCloseColor : Theme.currentTheme.colors.subtleSecondaryColor
|
46
|
+
opacity: 0
|
47
|
+
|
48
|
+
Behavior on opacity { NumberAnimation { duration: 100; easing.type: Easing.InOutQuad } }
|
49
|
+
}
|
50
|
+
|
51
|
+
|
52
|
+
// 按钮图标
|
53
|
+
IconWidget {
|
54
|
+
id: icon
|
55
|
+
icon: mode === 0 ?
|
56
|
+
window.visibility === Window.Maximized ?
|
57
|
+
"ic_fluent_square_multiple_20_regular" :
|
58
|
+
"ic_fluent_square_20_regular" :
|
59
|
+
mode === 1 ?
|
60
|
+
"ic_fluent_subtract_20_regular" :
|
61
|
+
mode === 2 ?
|
62
|
+
"ic_fluent_dismiss_20_regular"
|
63
|
+
:
|
64
|
+
"ic_fluent_circle_20_regular" // unknown style
|
65
|
+
size: mode === 0 ? 14 : 16
|
66
|
+
anchors.centerIn: parent
|
67
|
+
}
|
68
|
+
|
69
|
+
// 鼠标区域 / MouseArea
|
70
|
+
MouseArea {
|
71
|
+
id: mouseArea
|
72
|
+
anchors.fill: parent
|
73
|
+
enabled: enabled
|
74
|
+
hoverEnabled: true
|
75
|
+
onClicked: {
|
76
|
+
toggleControl(mode)
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
states: [
|
81
|
+
State {
|
82
|
+
name: "disabledCtrl"
|
83
|
+
when: !enabled
|
84
|
+
PropertyChanges { // 禁用时禁止改变属性
|
85
|
+
target: icon;
|
86
|
+
opacity: 0.3614
|
87
|
+
}
|
88
|
+
PropertyChanges { // 禁用时禁止改变属性
|
89
|
+
target: root;
|
90
|
+
}
|
91
|
+
},
|
92
|
+
State {
|
93
|
+
name: "pressedCtrl"
|
94
|
+
when: mouseArea.pressed
|
95
|
+
PropertyChanges {
|
96
|
+
target: background;
|
97
|
+
opacity: 0.8
|
98
|
+
}
|
99
|
+
PropertyChanges {
|
100
|
+
target: icon;
|
101
|
+
opacity: 0.6063
|
102
|
+
color: root.mode === 2 ? Theme.currentTheme.colors.captionCloseTextColor : textColor
|
103
|
+
}
|
104
|
+
},
|
105
|
+
State {
|
106
|
+
name: "hoveredCtrl"
|
107
|
+
when: mouseArea.containsMouse
|
108
|
+
PropertyChanges {
|
109
|
+
target: background;
|
110
|
+
opacity: 1
|
111
|
+
}
|
112
|
+
PropertyChanges {
|
113
|
+
target: icon;
|
114
|
+
opacity: root.mode === 2 ? 1 : 0.6063
|
115
|
+
color: root.mode === 2 ? Theme.currentTheme.colors.captionCloseTextColor : textColor
|
116
|
+
}
|
117
|
+
}
|
118
|
+
]
|
119
119
|
}
|
RinUI/windows/FluentPage.qml
CHANGED
@@ -1,92 +1,92 @@
|
|
1
|
-
import QtQuick 2.15
|
2
|
-
import QtQuick.Controls 2.15
|
3
|
-
import QtQuick.Layouts 2.15
|
4
|
-
import Qt5Compat.GraphicalEffects // 图形库
|
5
|
-
import "../themes"
|
6
|
-
import "../components"
|
7
|
-
import "../windows"
|
8
|
-
|
9
|
-
// 内容层 / Content Area
|
10
|
-
Page {
|
11
|
-
id: fluentPage
|
12
|
-
default property alias content: container.data
|
13
|
-
property alias contentHeader: headerContainer.data
|
14
|
-
property alias customHeader: headerRow.data
|
15
|
-
property alias extraHeaderItems: extraHeaderRow.data
|
16
|
-
property int radius: Theme.currentTheme.appearance.windowRadius
|
17
|
-
property int wrapperWidth: 1000
|
18
|
-
horizontalPadding: 56
|
19
|
-
// StackView.onRemoved: destroy()
|
20
|
-
spacing: 0
|
21
|
-
property alias contentSpacing: container.spacing
|
22
|
-
|
23
|
-
|
24
|
-
// 头部 / Header //
|
25
|
-
header: Item {
|
26
|
-
height: fluentPage.title !== "" ? 36 + 44 : 0
|
27
|
-
|
28
|
-
RowLayout {
|
29
|
-
id: headerRow
|
30
|
-
width: Math.min(fluentPage.width - fluentPage.horizontalPadding * 2, fluentPage.wrapperWidth) // 限制最大宽度
|
31
|
-
anchors.horizontalCenter: parent.horizontalCenter
|
32
|
-
height: parent.height
|
33
|
-
|
34
|
-
Text {
|
35
|
-
// anchors.left: parent.left
|
36
|
-
// anchors.bottom: parent.bottom
|
37
|
-
Layout.alignment: Qt.AlignLeft | Qt.AlignBottom
|
38
|
-
typography: Typography.Title
|
39
|
-
text: fluentPage.title
|
40
|
-
visible: fluentPage.title !== "" // 标题
|
41
|
-
}
|
42
|
-
|
43
|
-
Row {
|
44
|
-
id: extraHeaderRow
|
45
|
-
spacing: 4
|
46
|
-
Layout.alignment: Qt.AlignRight | Qt.AlignBottom
|
47
|
-
}
|
48
|
-
}
|
49
|
-
}
|
50
|
-
|
51
|
-
|
52
|
-
background: Item {}
|
53
|
-
|
54
|
-
Flickable {
|
55
|
-
anchors.fill: parent
|
56
|
-
clip: true
|
57
|
-
ScrollBar.vertical: ScrollBar {}
|
58
|
-
contentHeight: container.height + 18 + headerContainer.height
|
59
|
-
|
60
|
-
Row {
|
61
|
-
id: headerContainer
|
62
|
-
width: fluentPage.width
|
63
|
-
}
|
64
|
-
|
65
|
-
ColumnLayout {
|
66
|
-
id: container
|
67
|
-
anchors.top: headerContainer.bottom
|
68
|
-
anchors.topMargin: 18
|
69
|
-
anchors.horizontalCenter: parent.horizontalCenter
|
70
|
-
width: Math.min(fluentPage.width - fluentPage.horizontalPadding * 2, fluentPage.wrapperWidth) // 24 + 24 的边距
|
71
|
-
spacing: 14
|
72
|
-
}
|
73
|
-
}
|
74
|
-
|
75
|
-
layer.enabled: true
|
76
|
-
layer.effect: OpacityMask{
|
77
|
-
maskSource: Rectangle{
|
78
|
-
width: fluentPage.width
|
79
|
-
height: fluentPage.height
|
80
|
-
radius: fluentPage.radius
|
81
|
-
|
82
|
-
Rectangle {
|
83
|
-
anchors.right: parent.right
|
84
|
-
anchors.top: parent.top
|
85
|
-
width: parent.width - Theme.currentTheme.appearance.windowRadius
|
86
|
-
height: Theme.currentTheme.appearance.windowRadius
|
87
|
-
}
|
88
|
-
}
|
89
|
-
}
|
90
|
-
|
91
|
-
// anchors.fill: parent
|
92
|
-
}
|
1
|
+
import QtQuick 2.15
|
2
|
+
import QtQuick.Controls 2.15
|
3
|
+
import QtQuick.Layouts 2.15
|
4
|
+
import Qt5Compat.GraphicalEffects // 图形库
|
5
|
+
import "../themes"
|
6
|
+
import "../components"
|
7
|
+
import "../windows"
|
8
|
+
|
9
|
+
// 内容层 / Content Area
|
10
|
+
Page {
|
11
|
+
id: fluentPage
|
12
|
+
default property alias content: container.data
|
13
|
+
property alias contentHeader: headerContainer.data
|
14
|
+
property alias customHeader: headerRow.data
|
15
|
+
property alias extraHeaderItems: extraHeaderRow.data
|
16
|
+
property int radius: Theme.currentTheme.appearance.windowRadius
|
17
|
+
property int wrapperWidth: 1000
|
18
|
+
horizontalPadding: 56
|
19
|
+
// StackView.onRemoved: destroy()
|
20
|
+
spacing: 0
|
21
|
+
property alias contentSpacing: container.spacing
|
22
|
+
|
23
|
+
|
24
|
+
// 头部 / Header //
|
25
|
+
header: Item {
|
26
|
+
height: fluentPage.title !== "" ? 36 + 44 : 0
|
27
|
+
|
28
|
+
RowLayout {
|
29
|
+
id: headerRow
|
30
|
+
width: Math.min(fluentPage.width - fluentPage.horizontalPadding * 2, fluentPage.wrapperWidth) // 限制最大宽度
|
31
|
+
anchors.horizontalCenter: parent.horizontalCenter
|
32
|
+
height: parent.height
|
33
|
+
|
34
|
+
Text {
|
35
|
+
// anchors.left: parent.left
|
36
|
+
// anchors.bottom: parent.bottom
|
37
|
+
Layout.alignment: Qt.AlignLeft | Qt.AlignBottom
|
38
|
+
typography: Typography.Title
|
39
|
+
text: fluentPage.title
|
40
|
+
visible: fluentPage.title !== "" // 标题
|
41
|
+
}
|
42
|
+
|
43
|
+
Row {
|
44
|
+
id: extraHeaderRow
|
45
|
+
spacing: 4
|
46
|
+
Layout.alignment: Qt.AlignRight | Qt.AlignBottom
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
|
52
|
+
background: Item {}
|
53
|
+
|
54
|
+
Flickable {
|
55
|
+
anchors.fill: parent
|
56
|
+
clip: true
|
57
|
+
ScrollBar.vertical: ScrollBar {}
|
58
|
+
contentHeight: container.height + 18 + headerContainer.height
|
59
|
+
|
60
|
+
Row {
|
61
|
+
id: headerContainer
|
62
|
+
width: fluentPage.width
|
63
|
+
}
|
64
|
+
|
65
|
+
ColumnLayout {
|
66
|
+
id: container
|
67
|
+
anchors.top: headerContainer.bottom
|
68
|
+
anchors.topMargin: 18
|
69
|
+
anchors.horizontalCenter: parent.horizontalCenter
|
70
|
+
width: Math.min(fluentPage.width - fluentPage.horizontalPadding * 2, fluentPage.wrapperWidth) // 24 + 24 的边距
|
71
|
+
spacing: 14
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
layer.enabled: true
|
76
|
+
layer.effect: OpacityMask{
|
77
|
+
maskSource: Rectangle{
|
78
|
+
width: fluentPage.width
|
79
|
+
height: fluentPage.height
|
80
|
+
radius: fluentPage.radius
|
81
|
+
|
82
|
+
Rectangle {
|
83
|
+
anchors.right: parent.right
|
84
|
+
anchors.top: parent.top
|
85
|
+
width: parent.width - Theme.currentTheme.appearance.windowRadius
|
86
|
+
height: Theme.currentTheme.appearance.windowRadius
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|
90
|
+
|
91
|
+
// anchors.fill: parent
|
92
|
+
}
|
RinUI/windows/FluentWindow.qml
CHANGED
@@ -1,31 +1,32 @@
|
|
1
|
-
import QtQuick 2.15
|
2
|
-
import QtQuick.Controls 2.15
|
3
|
-
import QtQuick.Layouts 2.15
|
4
|
-
import "../themes"
|
5
|
-
import "../components"
|
6
|
-
import "../windows"
|
7
|
-
|
8
|
-
FluentWindowBase {
|
9
|
-
id: window
|
10
|
-
// visible: true
|
11
|
-
width: 900
|
12
|
-
height: 600
|
13
|
-
minimumWidth: 400
|
14
|
-
minimumHeight: 300
|
15
|
-
titleEnabled: false
|
16
|
-
titleBarHeight: Theme.currentTheme.appearance.windowTitleBarHeight
|
17
|
-
|
18
|
-
property alias navigationItems: navigationView.navigationItems // 导航栏item
|
19
|
-
property alias
|
20
|
-
property alias
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
1
|
+
import QtQuick 2.15
|
2
|
+
import QtQuick.Controls 2.15
|
3
|
+
import QtQuick.Layouts 2.15
|
4
|
+
import "../themes"
|
5
|
+
import "../components"
|
6
|
+
import "../windows"
|
7
|
+
|
8
|
+
FluentWindowBase {
|
9
|
+
id: window
|
10
|
+
// visible: true
|
11
|
+
width: 900
|
12
|
+
height: 600
|
13
|
+
minimumWidth: 400
|
14
|
+
minimumHeight: 300
|
15
|
+
titleEnabled: false
|
16
|
+
titleBarHeight: Theme.currentTheme.appearance.windowTitleBarHeight
|
17
|
+
|
18
|
+
property alias navigationItems: navigationView.navigationItems // 导航栏item
|
19
|
+
property alias currentPage: navigationView.currentPage // 当前索引项
|
20
|
+
property alias defaultPage: navigationView.defaultPage // 默认索引项
|
21
|
+
property alias appLayerEnabled: navigationView.appLayerEnabled // 应用层背景
|
22
|
+
default property alias content: freeContainter.data
|
23
|
+
|
24
|
+
NavigationView {
|
25
|
+
id: navigationView
|
26
|
+
window: window
|
27
|
+
}
|
28
|
+
Item {
|
29
|
+
id: freeContainter
|
30
|
+
anchors.fill: parent
|
31
|
+
}
|
31
32
|
}
|