From 97b9a789b0529a51cf999168716fc2624f01d9ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Sat, 9 Mar 2024 18:26:54 +0800 Subject: [PATCH] update --- example/example_en.ts | 184 ++++++++++++++++++ example/example_zh.ts | 183 +++++++++++++++++ example/qml-Qt6/chart/T_BarChart.qml | 2 +- example/qml-Qt6/chart/T_BubbleChart.qml | 2 +- example/qml-Qt6/chart/T_LineChart.qml | 2 +- example/qml-Qt6/chart/T_PieChart.qml | 2 +- example/qml-Qt6/chart/T_PolarAreaChart.qml | 2 +- example/qml-Qt6/chart/T_RadarChart.qml | 2 +- example/qml-Qt6/chart/T_ScatterChart.qml | 2 +- example/qml-Qt6/page/T_ColorPicker.qml | 12 +- example/qml-Qt6/page/T_Network.qml | 2 +- example/qml-Qt6/page/T_ShortcutPicker.qml | 5 + example/qml-Qt6/page/T_TableView.qml | 4 +- example/qml-Qt6/page/T_Tour.qml | 2 +- .../qml-Qt6/window/FluentInitalizrWindow.qml | 16 +- example/qml/chart/T_BarChart.qml | 2 +- example/qml/chart/T_BubbleChart.qml | 2 +- example/qml/chart/T_LineChart.qml | 2 +- example/qml/chart/T_PieChart.qml | 2 +- example/qml/chart/T_PolarAreaChart.qml | 2 +- example/qml/chart/T_RadarChart.qml | 2 +- example/qml/chart/T_ScatterChart.qml | 2 +- example/qml/page/T_ColorPicker.qml | 13 +- example/qml/page/T_Network.qml | 2 +- example/qml/page/T_ShortcutPicker.qml | 6 + example/qml/page/T_TableView.qml | 4 +- example/qml/page/T_Tour.qml | 2 +- src/CMakeLists.txt | 2 +- src/FluFramelessHelper.cpp | 2 +- .../FluentUI/Controls/FluColorPicker.qml | 34 ++-- .../FluentUI/Controls/FluColorPicker.qml | 34 ++-- src/version_fluentuiplugin.rc | 32 --- 32 files changed, 470 insertions(+), 97 deletions(-) delete mode 100644 src/version_fluentuiplugin.rc diff --git a/example/example_en.ts b/example/example_en.ts index 98733847..3dc816f4 100644 --- a/example/example_en.ts +++ b/example/example_en.ts @@ -48,31 +48,38 @@ + + FluentUI Initalizr + Name + Create In + Browse + Cancel + Create @@ -935,6 +942,15 @@ Updated content: + + T_BarChart + + + + Bar Chart + + + T_BreadcrumbBar @@ -950,6 +966,15 @@ Updated content: + + T_BubbleChart + + + + Bubble Chart + + + T_Buttons @@ -1274,6 +1299,61 @@ Updated content: ColorPicker + + + + Click to Select a Color - > + + + + + + Cancel + + + + + + OK + + + + + + Color Picker + + + + + + Edit Color + + + + + + Red + + + + + + Green + Greeb + + + + + + Blue + + + + + + Opacity + + T_ComboBox @@ -1626,6 +1706,15 @@ My only desire is to be permitted to drive out the traitors and restore the Han. + + T_LineChart + + + + Line Chart + + + T_Menu @@ -1830,6 +1919,15 @@ My only desire is to be permitted to drive out the traitors and restore the Han. + + T_Network + + + + Network + + + T_Pagination @@ -1859,6 +1957,16 @@ My only desire is to be permitted to drive out the traitors and restore the Han. + + T_PieChart + + + + Pie Chart + Doughnut and Pie Chart + + + T_Pivot @@ -1916,6 +2024,16 @@ My only desire is to be permitted to drive out the traitors and restore the Han. + + T_PolarAreaChart + + + + Polar Area Chart + PolarArea Chart + + + T_Progress @@ -1934,6 +2052,15 @@ My only desire is to be permitted to drive out the traitors and restore the Han. + + T_RadarChart + + + + Radar Chart + + + T_RadioButton @@ -1999,6 +2126,15 @@ My only desire is to be permitted to drive out the traitors and restore the Han. + + T_ScatterChart + + + + Scatter Chart + + + T_Settings @@ -2124,6 +2260,36 @@ My only desire is to be permitted to drive out the traitors and restore the Han. ShortcutPicker + + + + Activate the Shortcut + + + + + + Press the key combination to change the shortcut + + + + + + Save + + + + + + Cancel + + + + + + Reset + + T_Slider @@ -2312,6 +2478,18 @@ My only desire is to be permitted to drive out the traitors and restore the Han. Next> + + + + Delete Selection + + + + + + Add a row of Data + + T_Text @@ -2658,6 +2836,12 @@ My only desire is to be permitted to drive out the traitors and restore the Han. More + + + + Tour + + T_TreeView diff --git a/example/example_zh.ts b/example/example_zh.ts index 3f395ca8..f5f64a70 100644 --- a/example/example_zh.ts +++ b/example/example_zh.ts @@ -48,31 +48,38 @@ + + FluentUI Initalizr FluentUI脚手架 + Name 名称 + Create In 创建路径 + Browse 浏览 + Cancel 取消 + Create 创建 @@ -936,6 +943,15 @@ Updated content: 一般出现在通知图标或头像的右上角,用于显示需要处理的消息条数 + + T_BarChart + + + + Bar Chart + 条形图 + + T_BreadcrumbBar @@ -951,6 +967,15 @@ Updated content: 重置 + + T_BubbleChart + + + + Bubble Chart + 气泡图 + + T_Buttons @@ -1275,6 +1300,60 @@ Updated content: ColorPicker 颜色选择器 + + + + Click to Select a Color - > + 点击选中颜色 - > + + + + + Cancel + 取消 + + + + + OK + 确定 + + + + + Color Picker + 颜色选择器 + + + + + Edit Color + 编辑颜色 + + + + + Red + 红色 + + + + + Green + 绿色 + + + + + Blue + 蓝色 + + + + + Opacity + 透明度 + T_ComboBox @@ -1635,6 +1714,15 @@ My only desire is to be permitted to drive out the traitors and restore the Han. 加载中... + + T_LineChart + + + + Line Chart + 线型图 + + T_Menu @@ -1839,6 +1927,15 @@ My only desire is to be permitted to drive out the traitors and restore the Han. 登录窗口返回过来的密码 - > + + T_Network + + + + Network + 网络 + + T_Pagination @@ -1868,6 +1965,16 @@ My only desire is to be permitted to drive out the traitors and restore the Han. 下一页> + + T_PieChart + + + + Pie Chart + Doughnut and Pie Chart + 饼图 + + T_Pivot @@ -1925,6 +2032,16 @@ My only desire is to be permitted to drive out the traitors and restore the Han. 紧急电子邮件都在这里 + + T_PolarAreaChart + + + + Polar Area Chart + PolarArea Chart + 极坐标区域图 + + T_Progress @@ -1943,6 +2060,15 @@ My only desire is to be permitted to drive out the traitors and restore the Han. 二维码 + + T_RadarChart + + + + Radar Chart + 雷达图 + + T_RadioButton @@ -2008,6 +2134,15 @@ My only desire is to be permitted to drive out the traitors and restore the Han. 矩形 + + T_ScatterChart + + + + Scatter Chart + 散点图 + + T_Settings @@ -2133,6 +2268,36 @@ My only desire is to be permitted to drive out the traitors and restore the Han. ShortcutPicker 快捷键选择器 + + + + Activate the Shortcut + 激活快捷键 + + + + + Press the key combination to change the shortcut + 按下组合键以更改此快捷键 + + + + + Save + 保存 + + + + + Cancel + 取消 + + + + + Reset + 重置 + T_Slider @@ -2321,6 +2486,18 @@ My only desire is to be permitted to drive out the traitors and restore the Han. Next> 下一页> + + + + Delete Selection + 删除选中 + + + + + Add a row of Data + 添加一行数据 + T_Text @@ -2667,6 +2844,12 @@ My only desire is to be permitted to drive out the traitors and restore the Han. More 更多 + + + + Tour + 游览 + T_TreeView diff --git a/example/qml-Qt6/chart/T_BarChart.qml b/example/qml-Qt6/chart/T_BarChart.qml index d094e6f3..859724c0 100644 --- a/example/qml-Qt6/chart/T_BarChart.qml +++ b/example/qml-Qt6/chart/T_BarChart.qml @@ -7,7 +7,7 @@ import "../component" FluScrollablePage{ - title:"Bar Chart" + title: qsTr("Bar Chart") FluArea{ width: 500 diff --git a/example/qml-Qt6/chart/T_BubbleChart.qml b/example/qml-Qt6/chart/T_BubbleChart.qml index f6a992b4..c5500f40 100644 --- a/example/qml-Qt6/chart/T_BubbleChart.qml +++ b/example/qml-Qt6/chart/T_BubbleChart.qml @@ -7,7 +7,7 @@ import "../component" FluScrollablePage{ - title:"Bubble Chart" + title: qsTr("Bubble Chart") function randomScalingFactor() { return Math.random().toFixed(1); diff --git a/example/qml-Qt6/chart/T_LineChart.qml b/example/qml-Qt6/chart/T_LineChart.qml index 33da1516..cf9e0340 100644 --- a/example/qml-Qt6/chart/T_LineChart.qml +++ b/example/qml-Qt6/chart/T_LineChart.qml @@ -7,7 +7,7 @@ import "../component" FluScrollablePage{ - title:"Line Chart" + title: qsTr("Line Chart") FluArea{ width: 500 diff --git a/example/qml-Qt6/chart/T_PieChart.qml b/example/qml-Qt6/chart/T_PieChart.qml index 1f19cab6..5d6b6345 100644 --- a/example/qml-Qt6/chart/T_PieChart.qml +++ b/example/qml-Qt6/chart/T_PieChart.qml @@ -7,7 +7,7 @@ import "../component" FluScrollablePage{ - title:"Doughnut and Pie Chart" + title: qsTr("Pie Chart") FluArea{ width: 500 diff --git a/example/qml-Qt6/chart/T_PolarAreaChart.qml b/example/qml-Qt6/chart/T_PolarAreaChart.qml index bd816c8b..6e86529d 100644 --- a/example/qml-Qt6/chart/T_PolarAreaChart.qml +++ b/example/qml-Qt6/chart/T_PolarAreaChart.qml @@ -7,7 +7,7 @@ import "../component" FluScrollablePage{ - title:"PolarArea Chart" + title: qsTr("Polar Area Chart") FluArea{ width: 500 diff --git a/example/qml-Qt6/chart/T_RadarChart.qml b/example/qml-Qt6/chart/T_RadarChart.qml index 4b69b045..76b49925 100644 --- a/example/qml-Qt6/chart/T_RadarChart.qml +++ b/example/qml-Qt6/chart/T_RadarChart.qml @@ -7,7 +7,7 @@ import "../component" FluScrollablePage{ - title:"Radar Chart" + title: qsTr("Radar Chart") FluArea{ width: 500 diff --git a/example/qml-Qt6/chart/T_ScatterChart.qml b/example/qml-Qt6/chart/T_ScatterChart.qml index 9fc39be6..2e0778c6 100644 --- a/example/qml-Qt6/chart/T_ScatterChart.qml +++ b/example/qml-Qt6/chart/T_ScatterChart.qml @@ -7,7 +7,7 @@ import "../component" FluScrollablePage{ - title:"Scatter Chart" + title: qsTr("Scatter Chart") function randomScalingFactor() { return Math.random().toFixed(1); diff --git a/example/qml-Qt6/page/T_ColorPicker.qml b/example/qml-Qt6/page/T_ColorPicker.qml index 50a1390a..ac8571b0 100644 --- a/example/qml-Qt6/page/T_ColorPicker.qml +++ b/example/qml-Qt6/page/T_ColorPicker.qml @@ -14,14 +14,20 @@ FluScrollablePage{ Layout.topMargin: 20 height: 60 paddings: 10 - RowLayout{ FluText{ - text:"点击选择颜色->" + text: qsTr("Click to Select a Color - >") Layout.alignment: Qt.AlignVCenter } FluColorPicker{ - + cancelText: qsTr("Cancel") + okText: qsTr("OK") + titleText: qsTr("Color Picker") + editText: qsTr("Edit Color") + redText: qsTr("Red") + greenText: qsTr("Green") + blueText: qsTr("Blue") + opacityText: qsTr("Opacity") } } } diff --git a/example/qml-Qt6/page/T_Network.qml b/example/qml-Qt6/page/T_Network.qml index 3c7049bb..e0d90d8b 100644 --- a/example/qml-Qt6/page/T_Network.qml +++ b/example/qml-Qt6/page/T_Network.qml @@ -9,7 +9,7 @@ import "../component" FluContentPage{ id:root - title:"Network" + title: qsTr("Network") FluNetworkCallable{ id:callable diff --git a/example/qml-Qt6/page/T_ShortcutPicker.qml b/example/qml-Qt6/page/T_ShortcutPicker.qml index b2f51448..bb3fee2e 100644 --- a/example/qml-Qt6/page/T_ShortcutPicker.qml +++ b/example/qml-Qt6/page/T_ShortcutPicker.qml @@ -16,6 +16,11 @@ FluScrollablePage{ paddings: 10 FluShortcutPicker{ anchors.verticalCenter: parent.verticalCenter + title: qsTr("Activate the Shortcut") + message: qsTr("Press the key combination to change the shortcut") + positiveText: qsTr("Save") + neutralText: qsTr("Cancel") + negativeText: qsTr("Reset") } } CodeExpander{ diff --git a/example/qml-Qt6/page/T_TableView.qml b/example/qml-Qt6/page/T_TableView.qml index 271e2d85..00b1c4d3 100644 --- a/example/qml-Qt6/page/T_TableView.qml +++ b/example/qml-Qt6/page/T_TableView.qml @@ -416,7 +416,7 @@ FluContentPage{ } FluButton{ - text:"Delete Selection" + text: qsTr("Delete Selection") onClicked: { var data = [] var rows = [] @@ -440,7 +440,7 @@ FluContentPage{ } FluButton{ - text:"Add a row of Data" + text: qsTr("Add a row of Data") onClicked: { table_view.appendRow(genTestObject()) } diff --git a/example/qml-Qt6/page/T_Tour.qml b/example/qml-Qt6/page/T_Tour.qml index 157607e1..e4c0e202 100644 --- a/example/qml-Qt6/page/T_Tour.qml +++ b/example/qml-Qt6/page/T_Tour.qml @@ -7,7 +7,7 @@ import "../component" FluScrollablePage{ - title:"Tour" + title: qsTr("Tour") FluTour{ id:tour diff --git a/example/qml-Qt6/window/FluentInitalizrWindow.qml b/example/qml-Qt6/window/FluentInitalizrWindow.qml index 3dee14df..eb6e624c 100644 --- a/example/qml-Qt6/window/FluentInitalizrWindow.qml +++ b/example/qml-Qt6/window/FluentInitalizrWindow.qml @@ -8,11 +8,11 @@ import "../component" FluWindow { id:window - title:"FluentUI Initalizr" + title:qsTr("FluentUI Initalizr") width: 600 height: 400 fixSize: true - modality: Qt.ApplicationModal + // modality: Qt.ApplicationModal launchMode: FluWindowType.SingleTask showStayTop: false @@ -28,7 +28,7 @@ FluWindow { FluText{ id:text_title - text:"FluentUI脚手架" + text:qsTr("FluentUI Initalizr") font: FluTextStyle.Title anchors{ left: parent.left @@ -49,7 +49,7 @@ FluWindow { FluTextBox{ id:text_box_name width: 180 - placeholderText: "名称" + placeholderText: qsTr("Name") focus: true } Row{ @@ -57,14 +57,14 @@ FluWindow { FluTextBox{ id:text_box_path width: 300 - placeholderText: "创建路径" + placeholderText: qsTr("Create In") anchors.verticalCenter: parent.verticalCenter Component.onCompleted: { text = FluTools.toLocalPath(StandardPaths.standardLocations(StandardPaths.DocumentsLocation)[0]) } } FluButton{ - text:"浏览" + text:qsTr("Browse") anchors.verticalCenter: parent.verticalCenter onClicked: { folder_dialog.open() @@ -95,7 +95,7 @@ FluWindow { rightMargin: 20 } FluButton{ - text:"取消" + text:qsTr("Cancel") width: 120 anchors.verticalCenter: parent.verticalCenter onClicked: { @@ -103,7 +103,7 @@ FluWindow { } } FluFilledButton{ - text:"创建" + text:qsTr("Create") width: 120 anchors.verticalCenter: parent.verticalCenter onClicked: { diff --git a/example/qml/chart/T_BarChart.qml b/example/qml/chart/T_BarChart.qml index 4a85c778..95e70464 100644 --- a/example/qml/chart/T_BarChart.qml +++ b/example/qml/chart/T_BarChart.qml @@ -7,7 +7,7 @@ import "../component" FluScrollablePage{ - title:"Bar Chart" + title: qsTr("Bar Chart") FluArea{ width: 500 diff --git a/example/qml/chart/T_BubbleChart.qml b/example/qml/chart/T_BubbleChart.qml index c7e33c65..9574042e 100644 --- a/example/qml/chart/T_BubbleChart.qml +++ b/example/qml/chart/T_BubbleChart.qml @@ -7,7 +7,7 @@ import "../component" FluScrollablePage{ - title:"Bubble Chart" + title: qsTr("Bubble Chart") function randomScalingFactor() { return Math.random().toFixed(1); diff --git a/example/qml/chart/T_LineChart.qml b/example/qml/chart/T_LineChart.qml index 3c58a5ab..59e47f55 100644 --- a/example/qml/chart/T_LineChart.qml +++ b/example/qml/chart/T_LineChart.qml @@ -7,7 +7,7 @@ import "../component" FluScrollablePage{ - title:"Line Chart" + title: qsTr("Line Chart") FluArea{ width: 500 diff --git a/example/qml/chart/T_PieChart.qml b/example/qml/chart/T_PieChart.qml index 2df303e0..a51e7475 100644 --- a/example/qml/chart/T_PieChart.qml +++ b/example/qml/chart/T_PieChart.qml @@ -7,7 +7,7 @@ import "../component" FluScrollablePage{ - title:"Doughnut and Pie Chart" + title: qsTr("Pie Chart") FluArea{ width: 500 diff --git a/example/qml/chart/T_PolarAreaChart.qml b/example/qml/chart/T_PolarAreaChart.qml index 1572b69b..080237e1 100644 --- a/example/qml/chart/T_PolarAreaChart.qml +++ b/example/qml/chart/T_PolarAreaChart.qml @@ -7,7 +7,7 @@ import "../component" FluScrollablePage{ - title:"PolarArea Chart" + title: qsTr("Polar Area Chart") FluArea{ width: 500 diff --git a/example/qml/chart/T_RadarChart.qml b/example/qml/chart/T_RadarChart.qml index 065e2b80..041f2554 100644 --- a/example/qml/chart/T_RadarChart.qml +++ b/example/qml/chart/T_RadarChart.qml @@ -7,7 +7,7 @@ import "../component" FluScrollablePage{ - title:"Radar Chart" + title: qsTr("Radar Chart") FluArea{ width: 500 diff --git a/example/qml/chart/T_ScatterChart.qml b/example/qml/chart/T_ScatterChart.qml index f1b22b92..eea50219 100644 --- a/example/qml/chart/T_ScatterChart.qml +++ b/example/qml/chart/T_ScatterChart.qml @@ -7,7 +7,7 @@ import "../component" FluScrollablePage{ - title:"Scatter Chart" + title: qsTr("Scatter Chart") function randomScalingFactor() { return Math.random().toFixed(1); diff --git a/example/qml/page/T_ColorPicker.qml b/example/qml/page/T_ColorPicker.qml index 8833a005..7cce39c4 100644 --- a/example/qml/page/T_ColorPicker.qml +++ b/example/qml/page/T_ColorPicker.qml @@ -14,14 +14,20 @@ FluScrollablePage{ Layout.topMargin: 20 height: 60 paddings: 10 - RowLayout{ FluText{ - text:"点击选择颜色->" + text: qsTr("Click to Select a Color - >") Layout.alignment: Qt.AlignVCenter } FluColorPicker{ - + cancelText: qsTr("Cancel") + okText: qsTr("OK") + titleText: qsTr("Color Picker") + editText: qsTr("Edit Color") + redText: qsTr("Red") + greenText: qsTr("Green") + blueText: qsTr("Blue") + opacityText: qsTr("Opacity") } } } @@ -34,4 +40,3 @@ FluScrollablePage{ } } - diff --git a/example/qml/page/T_Network.qml b/example/qml/page/T_Network.qml index ce39a37d..2bd28414 100644 --- a/example/qml/page/T_Network.qml +++ b/example/qml/page/T_Network.qml @@ -9,7 +9,7 @@ import "../component" FluContentPage{ id:root - title:"Network" + title: qsTr("Network") FluNetworkCallable{ id:callable diff --git a/example/qml/page/T_ShortcutPicker.qml b/example/qml/page/T_ShortcutPicker.qml index 25b9dc46..c202ba82 100644 --- a/example/qml/page/T_ShortcutPicker.qml +++ b/example/qml/page/T_ShortcutPicker.qml @@ -16,6 +16,11 @@ FluScrollablePage{ paddings: 10 FluShortcutPicker{ anchors.verticalCenter: parent.verticalCenter + title: qsTr("Activate the Shortcut") + message: qsTr("Press the key combination to change the shortcut") + positiveText: qsTr("Save") + neutralText: qsTr("Cancel") + negativeText: qsTr("Reset") } } CodeExpander{ @@ -28,3 +33,4 @@ FluScrollablePage{ } + diff --git a/example/qml/page/T_TableView.qml b/example/qml/page/T_TableView.qml index e6b06a08..31296ec1 100644 --- a/example/qml/page/T_TableView.qml +++ b/example/qml/page/T_TableView.qml @@ -416,7 +416,7 @@ FluContentPage{ } FluButton{ - text:"Delete Selection" + text: qsTr("Delete Selection") onClicked: { var data = [] var rows = [] @@ -440,7 +440,7 @@ FluContentPage{ } FluButton{ - text:"Add a row of Data" + text: qsTr("Add a row of Data") onClicked: { table_view.appendRow(genTestObject()) } diff --git a/example/qml/page/T_Tour.qml b/example/qml/page/T_Tour.qml index 87022fa7..1e3fa0db 100644 --- a/example/qml/page/T_Tour.qml +++ b/example/qml/page/T_Tour.qml @@ -7,7 +7,7 @@ import "../component" FluScrollablePage{ - title:"Tour" + title: qsTr("Tour") FluTour{ id:tour diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0c0f9ff5..b3f31c2b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -83,7 +83,7 @@ endif() #如果是Windows平台,则生成rc文件 set(FLUENTUI_VERSION_RC_PATH "") if(WIN32) - set(FLUENTUI_VERSION_RC_PATH ${CMAKE_CURRENT_SOURCE_DIR}/version_${PROJECT_NAME}.rc) + set(FLUENTUI_VERSION_RC_PATH ${CMAKE_CURRENT_BINARY_DIR}/version_${PROJECT_NAME}.rc) configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/.cmake/version_dll.rc.in ${FLUENTUI_VERSION_RC_PATH} diff --git a/src/FluFramelessHelper.cpp b/src/FluFramelessHelper.cpp index 16a2cfd8..f4ea7050 100644 --- a/src/FluFramelessHelper.cpp +++ b/src/FluFramelessHelper.cpp @@ -64,7 +64,7 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void * if (wp != nullptr && (wp->flags & SWP_NOSIZE) == 0) { wp->flags |= SWP_NOCOPYBITS; - *result = DefWindowProcW(hwnd, uMsg, wParam, lParam); + *result = 0; return true; } return false; diff --git a/src/Qt5/imports/FluentUI/Controls/FluColorPicker.qml b/src/Qt5/imports/FluentUI/Controls/FluColorPicker.qml index f04f0074..c809cfc6 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluColorPicker.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluColorPicker.qml @@ -13,6 +13,14 @@ Button{ property color current : Qt.rgba(1,1,1,1) signal accepted() property int colorHandleRadius: 8 + property string cancelText: "取消" + property string okText: "确定" + property string titleText: "颜色选择器" + property string editText: "编辑颜色" + property string redText: "红色" + property string greenText: "绿色" + property string blueText: "蓝色" + property string opacityText: "透明度" background: Rectangle{ id:layout_color @@ -60,7 +68,7 @@ Button{ Layout.fillWidth: true Layout.fillHeight: true FluButton{ - text: "取消" + text: control.cancelText width: parent.width anchors.centerIn: parent onClicked: { @@ -72,7 +80,7 @@ Button{ Layout.fillWidth: true Layout.fillHeight: true FluFilledButton{ - text: "确认" + text: control.okText width: parent.width anchors.centerIn: parent onClicked: { @@ -93,13 +101,13 @@ Button{ clip: true ScrollBar.vertical: FluScrollBar {} Item{ - id:layout_content + id: layout_content width: parent.width height: childrenRect.height FluText{ - id:text_titile - font:FluTextStyle.Subtitle - text:"颜色选择器" + id: text_titile + font: FluTextStyle.Subtitle + text: control.titleText anchors{ left: parent.left top: parent.top @@ -108,7 +116,7 @@ Button{ } } Item{ - id:layout_sb + id: layout_sb width: 200 height: 200 anchors{ @@ -117,7 +125,7 @@ Button{ leftMargin: 12 } FluClip{ - id:layout_color_hue + id: layout_color_hue property color colorValue property real xPercent: pickerCursor.x/width property real yPercent: pickerCursor.y/height @@ -455,7 +463,7 @@ Button{ width: parent.width height: text_box_color.height FluText{ - text:"编辑颜色" + text: control.editText anchors{ verticalCenter: parent.verticalCenter left:parent.left @@ -507,7 +515,7 @@ Button{ } } FluText{ - text:"Red" + text: control.redText anchors.verticalCenter: parent.verticalCenter } } @@ -526,7 +534,7 @@ Button{ } } FluText{ - text:"Green" + text: control.greenText anchors.verticalCenter: parent.verticalCenter } } @@ -545,7 +553,7 @@ Button{ } } FluText{ - text:"Blue" + text: control.blueText anchors.verticalCenter: parent.verticalCenter } } @@ -570,7 +578,7 @@ Button{ } } FluText{ - text:"Opacity" + text: control.opacityText anchors.verticalCenter: parent.verticalCenter } } diff --git a/src/Qt6/imports/FluentUI/Controls/FluColorPicker.qml b/src/Qt6/imports/FluentUI/Controls/FluColorPicker.qml index 2faf8288..72728a56 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluColorPicker.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluColorPicker.qml @@ -13,6 +13,14 @@ Button{ property color current : Qt.rgba(1,1,1,1) signal accepted() property int colorHandleRadius: 8 + property string cancelText: "取消" + property string okText: "确定" + property string titleText: "颜色选择器" + property string editText: "编辑颜色" + property string redText: "红色" + property string greenText: "绿色" + property string blueText: "蓝色" + property string opacityText: "透明度" background: Rectangle{ id:layout_color @@ -60,7 +68,7 @@ Button{ Layout.fillWidth: true Layout.fillHeight: true FluButton{ - text: "取消" + text: control.cancelText width: parent.width anchors.centerIn: parent onClicked: { @@ -72,7 +80,7 @@ Button{ Layout.fillWidth: true Layout.fillHeight: true FluFilledButton{ - text: "确认" + text: control.okText width: parent.width anchors.centerIn: parent onClicked: { @@ -93,13 +101,13 @@ Button{ clip: true ScrollBar.vertical: FluScrollBar {} Item{ - id:layout_content + id: layout_content width: parent.width height: childrenRect.height FluText{ - id:text_titile - font:FluTextStyle.Subtitle - text:"颜色选择器" + id: text_titile + font: FluTextStyle.Subtitle + text: control.titleText anchors{ left: parent.left top: parent.top @@ -108,7 +116,7 @@ Button{ } } Item{ - id:layout_sb + id: layout_sb width: 200 height: 200 anchors{ @@ -117,7 +125,7 @@ Button{ leftMargin: 12 } FluClip{ - id:layout_color_hue + id: layout_color_hue property color colorValue property real xPercent: pickerCursor.x/width property real yPercent: pickerCursor.y/height @@ -455,7 +463,7 @@ Button{ width: parent.width height: text_box_color.height FluText{ - text:"编辑颜色" + text: control.editText anchors{ verticalCenter: parent.verticalCenter left:parent.left @@ -507,7 +515,7 @@ Button{ } } FluText{ - text:"Red" + text: control.redText anchors.verticalCenter: parent.verticalCenter } } @@ -526,7 +534,7 @@ Button{ } } FluText{ - text:"Green" + text: control.greenText anchors.verticalCenter: parent.verticalCenter } } @@ -545,7 +553,7 @@ Button{ } } FluText{ - text:"Blue" + text: control.blueText anchors.verticalCenter: parent.verticalCenter } } @@ -570,7 +578,7 @@ Button{ } } FluText{ - text:"Opacity" + text: control.opacityText anchors.verticalCenter: parent.verticalCenter } } diff --git a/src/version_fluentuiplugin.rc b/src/version_fluentuiplugin.rc deleted file mode 100644 index 4febd6e5..00000000 --- a/src/version_fluentuiplugin.rc +++ /dev/null @@ -1,32 +0,0 @@ -1 VERSIONINFO - FILEVERSION 1,6,9,1176 - PRODUCTVERSION 1,6,9,1176 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "080404b0" - BEGIN - VALUE "CompanyName", "ZhuZiChu" - VALUE "FileDescription", "" - VALUE "FileVersion", "1.6.9.1176" - VALUE "InternalName", "fluentuiplugin.dll" - VALUE "LegalCopyright", "Copyright (C) 2023 ZhuZiChu. All rights reserved." - VALUE "OriginalFilename", "fluentuiplugin.dll" - VALUE "ProductName", "fluentuiplugin" - VALUE "ProductVersion", "1.6.9.0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x804, 1200 - END -END