mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-26 05:17:05 +08:00
update
This commit is contained in:
parent
91bda2a22c
commit
f922978338
@ -1964,7 +1964,7 @@ Some contents...</source>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="177"/>
|
<location filename="qml/page/T_TableView.qml" line="177"/>
|
||||||
<location filename="qml/page/T_TableView.qml" line="511"/>
|
<location filename="qml/page/T_TableView.qml" line="509"/>
|
||||||
<source>Name</source>
|
<source>Name</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -1984,67 +1984,67 @@ Some contents...</source>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="367"/>
|
<location filename="qml/page/T_TableView.qml" line="365"/>
|
||||||
<source>Age</source>
|
<source>Age</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="442"/>
|
<location filename="qml/page/T_TableView.qml" line="440"/>
|
||||||
<source>Clear All</source>
|
<source>Clear All</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="449"/>
|
<location filename="qml/page/T_TableView.qml" line="447"/>
|
||||||
<source>Delete Selection</source>
|
<source>Delete Selection</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="472"/>
|
<location filename="qml/page/T_TableView.qml" line="470"/>
|
||||||
<source>Add a row of Data</source>
|
<source>Add a row of Data</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="478"/>
|
<location filename="qml/page/T_TableView.qml" line="476"/>
|
||||||
<source>Insert a Row</source>
|
<source>Insert a Row</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="485"/>
|
<location filename="qml/page/T_TableView.qml" line="483"/>
|
||||||
<source>Focus not acquired: Please click any item in the form as the target for insertion!</source>
|
<source>Focus not acquired: Please click any item in the form as the target for insertion!</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="516"/>
|
<location filename="qml/page/T_TableView.qml" line="514"/>
|
||||||
<source>Avatar</source>
|
<source>Avatar</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="530"/>
|
<location filename="qml/page/T_TableView.qml" line="528"/>
|
||||||
<source>Address</source>
|
<source>Address</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="538"/>
|
<location filename="qml/page/T_TableView.qml" line="536"/>
|
||||||
<source>Nickname</source>
|
<source>Nickname</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="545"/>
|
<location filename="qml/page/T_TableView.qml" line="543"/>
|
||||||
<source>Long String</source>
|
<source>Long String</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="553"/>
|
<location filename="qml/page/T_TableView.qml" line="551"/>
|
||||||
<source>Options</source>
|
<source>Options</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="571"/>
|
<location filename="qml/page/T_TableView.qml" line="569"/>
|
||||||
<source><Previous</source>
|
<source><Previous</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="572"/>
|
<location filename="qml/page/T_TableView.qml" line="570"/>
|
||||||
<source>Next></source>
|
<source>Next></source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -2110,7 +2110,7 @@ Some contents...</source>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="177"/>
|
<location filename="qml/page/T_TableView.qml" line="177"/>
|
||||||
<location filename="qml/page/T_TableView.qml" line="511"/>
|
<location filename="qml/page/T_TableView.qml" line="509"/>
|
||||||
<source>Name</source>
|
<source>Name</source>
|
||||||
<translation type="unfinished">名称</translation>
|
<translation type="unfinished">名称</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -2130,67 +2130,67 @@ Some contents...</source>
|
|||||||
<translation type="unfinished">全选</translation>
|
<translation type="unfinished">全选</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="367"/>
|
<location filename="qml/page/T_TableView.qml" line="365"/>
|
||||||
<source>Age</source>
|
<source>Age</source>
|
||||||
<translation type="unfinished">年龄</translation>
|
<translation type="unfinished">年龄</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="442"/>
|
<location filename="qml/page/T_TableView.qml" line="440"/>
|
||||||
<source>Clear All</source>
|
<source>Clear All</source>
|
||||||
<translation type="unfinished">清除所有</translation>
|
<translation type="unfinished">清除所有</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="478"/>
|
<location filename="qml/page/T_TableView.qml" line="476"/>
|
||||||
<source>Insert a Row</source>
|
<source>Insert a Row</source>
|
||||||
<translation type="unfinished">插入一行</translation>
|
<translation type="unfinished">插入一行</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="485"/>
|
<location filename="qml/page/T_TableView.qml" line="483"/>
|
||||||
<source>Focus not acquired: Please click any item in the form as the target for insertion!</source>
|
<source>Focus not acquired: Please click any item in the form as the target for insertion!</source>
|
||||||
<translation type="unfinished">焦点未获取:请点击表格中的任意一项,作为插入的靶点!</translation>
|
<translation type="unfinished">焦点未获取:请点击表格中的任意一项,作为插入的靶点!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="516"/>
|
<location filename="qml/page/T_TableView.qml" line="514"/>
|
||||||
<source>Avatar</source>
|
<source>Avatar</source>
|
||||||
<translation type="unfinished">头像</translation>
|
<translation type="unfinished">头像</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="530"/>
|
<location filename="qml/page/T_TableView.qml" line="528"/>
|
||||||
<source>Address</source>
|
<source>Address</source>
|
||||||
<translation type="unfinished">地址</translation>
|
<translation type="unfinished">地址</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="538"/>
|
<location filename="qml/page/T_TableView.qml" line="536"/>
|
||||||
<source>Nickname</source>
|
<source>Nickname</source>
|
||||||
<translation type="unfinished">昵称</translation>
|
<translation type="unfinished">昵称</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="545"/>
|
<location filename="qml/page/T_TableView.qml" line="543"/>
|
||||||
<source>Long String</source>
|
<source>Long String</source>
|
||||||
<translation type="unfinished">长字符串</translation>
|
<translation type="unfinished">长字符串</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="553"/>
|
<location filename="qml/page/T_TableView.qml" line="551"/>
|
||||||
<source>Options</source>
|
<source>Options</source>
|
||||||
<translation type="unfinished">操作</translation>
|
<translation type="unfinished">操作</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="571"/>
|
<location filename="qml/page/T_TableView.qml" line="569"/>
|
||||||
<source><Previous</source>
|
<source><Previous</source>
|
||||||
<translation type="unfinished"><上一页</translation>
|
<translation type="unfinished"><上一页</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="572"/>
|
<location filename="qml/page/T_TableView.qml" line="570"/>
|
||||||
<source>Next></source>
|
<source>Next></source>
|
||||||
<translation type="unfinished">下一页></translation>
|
<translation type="unfinished">下一页></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="449"/>
|
<location filename="qml/page/T_TableView.qml" line="447"/>
|
||||||
<source>Delete Selection</source>
|
<source>Delete Selection</source>
|
||||||
<translation type="unfinished">删除选中</translation>
|
<translation type="unfinished">删除选中</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TableView.qml" line="472"/>
|
<location filename="qml/page/T_TableView.qml" line="470"/>
|
||||||
<source>Add a row of Data</source>
|
<source>Add a row of Data</source>
|
||||||
<translation type="unfinished">添加一行数据</translation>
|
<translation type="unfinished">添加一行数据</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -273,7 +273,6 @@ FluContentPage{
|
|||||||
}
|
}
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
currentIndex=["100","300","500","1000"].findIndex((element) => element === display)
|
currentIndex=["100","300","500","1000"].findIndex((element) => element === display)
|
||||||
console.debug(textBox)
|
|
||||||
textBox.forceActiveFocus()
|
textBox.forceActiveFocus()
|
||||||
textBox.selectAll()
|
textBox.selectAll()
|
||||||
}
|
}
|
||||||
@ -291,7 +290,6 @@ FluContentPage{
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
focus: true
|
focus: true
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
console.debug("333333")
|
|
||||||
var data = ["傲来国界花果山水帘洞","傲来国界坎源山脏水洞","大唐国界黑风山黑风洞","大唐国界黄风岭黄风洞","大唐国界骷髅山白骨洞","宝象国界碗子山波月洞","宝象国界平顶山莲花洞","宝象国界压龙山压龙洞","乌鸡国界号山枯松涧火云洞","乌鸡国界衡阳峪黑水河河神府"]
|
var data = ["傲来国界花果山水帘洞","傲来国界坎源山脏水洞","大唐国界黑风山黑风洞","大唐国界黄风岭黄风洞","大唐国界骷髅山白骨洞","宝象国界碗子山波月洞","宝象国界平顶山莲花洞","宝象国界压龙山压龙洞","乌鸡国界号山枯松涧火云洞","乌鸡国界衡阳峪黑水河河神府"]
|
||||||
var result = data.map(function(item) {
|
var result = data.map(function(item) {
|
||||||
return {title: item};
|
return {title: item};
|
||||||
|
@ -15,7 +15,7 @@ FluWindow {
|
|||||||
title: "FluentUI"
|
title: "FluentUI"
|
||||||
width: 1000
|
width: 1000
|
||||||
height: 680
|
height: 680
|
||||||
minimumWidth: 1000
|
minimumWidth: 800
|
||||||
minimumHeight: 200
|
minimumHeight: 200
|
||||||
launchMode: FluWindowType.SingleTask
|
launchMode: FluWindowType.SingleTask
|
||||||
fitsAppBarWindows: true
|
fitsAppBarWindows: true
|
||||||
|
@ -87,7 +87,7 @@ void FluFrameless::componentComplete() {
|
|||||||
int w = window()->width();
|
int w = window()->width();
|
||||||
int h = window()->height();
|
int h = window()->height();
|
||||||
_current = window()->winId();
|
_current = window()->winId();
|
||||||
window()->setFlags((window()->flags()) | Qt::CustomizeWindowHint | Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint);
|
window()->setFlags((window()->flags()) | Qt::CustomizeWindowHint | Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint | Qt::FramelessWindowHint);
|
||||||
if (!_fixSize) {
|
if (!_fixSize) {
|
||||||
window()->setFlag(Qt::WindowMaximizeButtonHint);
|
window()->setFlag(Qt::WindowMaximizeButtonHint);
|
||||||
}
|
}
|
||||||
@ -106,14 +106,14 @@ void FluFrameless::componentComplete() {
|
|||||||
HWND hwnd = reinterpret_cast<HWND>(window()->winId());
|
HWND hwnd = reinterpret_cast<HWND>(window()->winId());
|
||||||
DWORD style = ::GetWindowLongPtr(hwnd, GWL_STYLE);
|
DWORD style = ::GetWindowLongPtr(hwnd, GWL_STYLE);
|
||||||
if (_fixSize) {
|
if (_fixSize) {
|
||||||
::SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_CAPTION);
|
::SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_THICKFRAME | WS_CAPTION);
|
||||||
for (int i = 0; i <= QGuiApplication::screens().count() - 1; ++i) {
|
for (int i = 0; i <= QGuiApplication::screens().count() - 1; ++i) {
|
||||||
connect(QGuiApplication::screens().at(i), &QScreen::logicalDotsPerInchChanged, this, [=] {
|
connect(QGuiApplication::screens().at(i), &QScreen::logicalDotsPerInchChanged, this, [=] {
|
||||||
SetWindowPos(hwnd, nullptr, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_FRAMECHANGED);
|
SetWindowPos(hwnd, nullptr, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_FRAMECHANGED);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
::SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_MAXIMIZEBOX | WS_CAPTION);
|
::SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_MAXIMIZEBOX | WS_THICKFRAME | WS_CAPTION);
|
||||||
}
|
}
|
||||||
SetWindowPos(hwnd, nullptr, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
|
SetWindowPos(hwnd, nullptr, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
|
||||||
connect(window(), &QQuickWindow::screenChanged, this, [hwnd] {
|
connect(window(), &QQuickWindow::screenChanged, this, [hwnd] {
|
||||||
@ -153,6 +153,7 @@ void FluFrameless::componentComplete() {
|
|||||||
const auto uMsg = msg->message;
|
const auto uMsg = msg->message;
|
||||||
const auto wParam = msg->wParam;
|
const auto wParam = msg->wParam;
|
||||||
const auto lParam = msg->lParam;
|
const auto lParam = msg->lParam;
|
||||||
|
static int offsetXY;
|
||||||
if (uMsg == WM_WINDOWPOSCHANGING) {
|
if (uMsg == WM_WINDOWPOSCHANGING) {
|
||||||
auto *wp = reinterpret_cast<WINDOWPOS *>(lParam);
|
auto *wp = reinterpret_cast<WINDOWPOS *>(lParam);
|
||||||
if (wp != nullptr && (wp->flags & SWP_NOSIZE) == 0) {
|
if (wp != nullptr && (wp->flags & SWP_NOSIZE) == 0) {
|
||||||
@ -173,13 +174,19 @@ void FluFrameless::componentComplete() {
|
|||||||
*result = static_cast<QT_NATIVE_EVENT_RESULT_TYPE>(hitTestResult);
|
*result = static_cast<QT_NATIVE_EVENT_RESULT_TYPE>(hitTestResult);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if(clientRect->left - originalLeft != 0){
|
||||||
|
offsetXY = clientRect->left - originalLeft;
|
||||||
|
}
|
||||||
if (!isMaximum) {
|
if (!isMaximum) {
|
||||||
clientRect->top = originalTop;
|
clientRect->top = originalTop;
|
||||||
clientRect->bottom = originalBottom;
|
clientRect->bottom = originalBottom;
|
||||||
clientRect->left = originalLeft;
|
clientRect->left = originalLeft;
|
||||||
clientRect->right = originalRight;
|
clientRect->right = originalRight;
|
||||||
} else {
|
} else {
|
||||||
clientRect->top = 0;
|
clientRect->top = originalTop+offsetXY;
|
||||||
|
clientRect->bottom = originalBottom-offsetXY;
|
||||||
|
clientRect->left = originalLeft+offsetXY;
|
||||||
|
clientRect->right = originalRight-offsetXY;
|
||||||
}
|
}
|
||||||
_setMaximizeHovered(false);
|
_setMaximizeHovered(false);
|
||||||
*result = WVR_REDRAW;
|
*result = WVR_REDRAW;
|
||||||
|
Loading…
Reference in New Issue
Block a user