Compare commits

..

No commits in common. "b3e26d17a25d0677e9e034133c0c4686862aa4fb" and "eff9e385f53788301333c9b318af7445f4d06290" have entirely different histories.

41 changed files with 89 additions and 89 deletions

View File

@ -18,8 +18,10 @@ option(FLUENTUI_BUILD_STATIC_LIB "Build static library." OFF)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core) find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core) find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core)
set(QT_SDK_DIR "${Qt${QT_VERSION_MAJOR}_DIR}/../../..") set(QT_SDK_DIR "${Qt${QT_VERSION_MAJOR}_DIR}")
cmake_path(SET QT_SDK_DIR NORMALIZE ${QT_SDK_DIR}) cmake_path(GET QT_SDK_DIR PARENT_PATH QT_SDK_DIR)
cmake_path(GET QT_SDK_DIR PARENT_PATH QT_SDK_DIR)
cmake_path(GET QT_SDK_DIR PARENT_PATH QT_SDK_DIR)
#QML<QT_SDK_DIR_PATH>\qml\FluentUI #QML<QT_SDK_DIR_PATH>\qml\FluentUI
set(FLUENTUI_QML_PLUGIN_DIRECTORY "" CACHE PATH "Path to FluentUI plugin") set(FLUENTUI_QML_PLUGIN_DIRECTORY "" CACHE PATH "Path to FluentUI plugin")

View File

@ -680,7 +680,7 @@
<location filename="qml/window/MainWindow.qml" line="118"/> <location filename="qml/window/MainWindow.qml" line="118"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="118"/> <location filename="qml-Qt6/window/MainWindow.qml" line="118"/>
<source>Open in Separate Window</source> <source>Open in Separate Window</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="215"/> <location filename="qml/window/MainWindow.qml" line="215"/>

View File

@ -62,7 +62,7 @@ FluContentPage {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.top: item_icon.bottom anchors.top: item_icon.bottom
width:parent.width width:parent.width
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
text: modelData.name text: modelData.name
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
} }

View File

@ -23,7 +23,7 @@ FluScrollablePage{
right: parent.right right: parent.right
} }
FluText{ FluText{
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
width: parent.width width: parent.width
text: qsTr("It usually appears in the upper right corner of the notification icon or avatar to display the number of messages that need to be processed") text: qsTr("It usually appears in the upper right corner of the notification icon or avatar to display the number of messages that need to be processed")
} }

View File

@ -64,7 +64,7 @@ FluScrollablePage{
FluText{ FluText{
id:text_info id:text_info
width: scrollview.width width: scrollview.width
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
padding: 14 padding: 14
text: qsTr("Permit me to observe: the late emperor was taken from us before he could finish his life`s work, the restoration of Han. Today, the empire is still divided in three, and our very survival is threatened. Yet still the officials at court and the soldiers throughout the realm remain loyal to you, your majesty. Because they remember the late emperor, all of them, and they wish to repay his kindness in service to you. This is the moment to extend your divine influence, to honour the memory of the late Emperor and strengthen the morale of your officers. It is not time to listen to bad advice, or close your ears to the suggestions of loyal men. text: qsTr("Permit me to observe: the late emperor was taken from us before he could finish his life`s work, the restoration of Han. Today, the empire is still divided in three, and our very survival is threatened. Yet still the officials at court and the soldiers throughout the realm remain loyal to you, your majesty. Because they remember the late emperor, all of them, and they wish to repay his kindness in service to you. This is the moment to extend your divine influence, to honour the memory of the late Emperor and strengthen the morale of your officers. It is not time to listen to bad advice, or close your ears to the suggestions of loyal men.
The court and the administration are as one. Both must be judged by one standard. Those who are loyal and good must get what they deserve, but so must the evil-doers who break the law. This will demonstrate the justice of your rule. There cannot be one law for the court and another for the administration. The court and the administration are as one. Both must be judged by one standard. Those who are loyal and good must get what they deserve, but so must the evil-doers who break the law. This will demonstrate the justice of your rule. There cannot be one law for the court and another for the administration.
@ -97,7 +97,7 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
FluText{ FluText{
id:text_info id:text_info
width: scrollview.width width: scrollview.width
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
padding: 14 padding: 14
text: qsTr("Permit me to observe: the late emperor was taken from us before he could finish his life`s work...") text: qsTr("Permit me to observe: the late emperor was taken from us before he could finish his life`s work...")
} }

View File

@ -118,7 +118,7 @@ FluScrollablePage{
Layout.leftMargin: 20 Layout.leftMargin: 20
color: FluColors.Grey120 color: FluColors.Grey120
font.pixelSize: 12 font.pixelSize: 12
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
} }
} }
FluIcon{ FluIcon{
@ -214,7 +214,7 @@ FluScrollablePage{
id:item_desc id:item_desc
text:desc text:desc
color:FluColors.Grey120 color:FluColors.Grey120
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
elide: Text.ElideRight elide: Text.ElideRight
font: FluTextStyle.Caption font: FluTextStyle.Caption
maximumLineCount: 2 maximumLineCount: 2

View File

@ -552,7 +552,7 @@ FluContentPage{
FluText{ FluText{
id:text_info id:text_info
width: scrollview.width width: scrollview.width
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
padding: 14 padding: 14
} }
} }

View File

@ -23,7 +23,7 @@ FluScrollablePage{
Component{ Component{
id:com_lable id:com_lable
FluText{ FluText{
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
font.bold: true font.bold: true
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
text: modelData.lable text: modelData.lable
@ -41,7 +41,7 @@ FluScrollablePage{
Component{ Component{
id:com_text id:com_text
FluText{ FluText{
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
text: modelData.text text: modelData.text
font.bold: true font.bold: true

View File

@ -44,7 +44,7 @@ FluWindow {
leftMargin: 10 leftMargin: 10
rightMargin: 10 rightMargin: 10
} }
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
text: qsTr("We apologize for the inconvenience caused by an unexpected error") text: qsTr("We apologize for the inconvenience caused by an unexpected error")
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter

View File

@ -32,7 +32,7 @@ FluWindow {
text:loader.itemLodaer().sourceComponent.errorString() text:loader.itemLodaer().sourceComponent.errorString()
color:"red" color:"red"
anchors.fill: parent anchors.fill: parent
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
padding: 20 padding: 20
verticalAlignment: Qt.AlignVCenter verticalAlignment: Qt.AlignVCenter
horizontalAlignment: Qt.AlignHCenter horizontalAlignment: Qt.AlignHCenter

View File

@ -13,8 +13,8 @@ FluWindow {
id:window id:window
title: "FluentUI" title: "FluentUI"
width: 1000 width: 960
height: 680 height: 600
minimumWidth: 520 minimumWidth: 520
minimumHeight: 200 minimumHeight: 200
launchMode: FluWindowType.SingleTask launchMode: FluWindowType.SingleTask
@ -112,10 +112,11 @@ FluWindow {
Component{ Component{
id: nav_item_right_menu id: nav_item_right_menu
FluMenu{ FluMenu{
width: 186 id: menu
width: 130
FluMenuItem{ FluMenuItem{
text: qsTr("Open in Separate Window") text: qsTr("Open in Separate Window")
font.pixelSize: 12 visible: true
onClicked: { onClicked: {
FluApp.navigate("/pageWindow",{title:modelData.title,url:modelData.url}) FluApp.navigate("/pageWindow",{title:modelData.title,url:modelData.url})
} }

View File

@ -22,7 +22,7 @@ FluWindow {
} }
FluText{ FluText{
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
anchors{ anchors{
left: parent.left left: parent.left
right: parent.right right: parent.right

View File

@ -62,7 +62,7 @@ FluContentPage {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.top: item_icon.bottom anchors.top: item_icon.bottom
width:parent.width width:parent.width
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
text: modelData.name text: modelData.name
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
} }

View File

@ -23,7 +23,7 @@ FluScrollablePage{
right: parent.right right: parent.right
} }
FluText{ FluText{
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
width: parent.width width: parent.width
text: qsTr("It usually appears in the upper right corner of the notification icon or avatar to display the number of messages that need to be processed") text: qsTr("It usually appears in the upper right corner of the notification icon or avatar to display the number of messages that need to be processed")
} }

View File

@ -64,7 +64,7 @@ FluScrollablePage{
FluText{ FluText{
id:text_info id:text_info
width: scrollview.width width: scrollview.width
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
padding: 14 padding: 14
text: qsTr("Permit me to observe: the late emperor was taken from us before he could finish his life`s work, the restoration of Han. Today, the empire is still divided in three, and our very survival is threatened. Yet still the officials at court and the soldiers throughout the realm remain loyal to you, your majesty. Because they remember the late emperor, all of them, and they wish to repay his kindness in service to you. This is the moment to extend your divine influence, to honour the memory of the late Emperor and strengthen the morale of your officers. It is not time to listen to bad advice, or close your ears to the suggestions of loyal men. text: qsTr("Permit me to observe: the late emperor was taken from us before he could finish his life`s work, the restoration of Han. Today, the empire is still divided in three, and our very survival is threatened. Yet still the officials at court and the soldiers throughout the realm remain loyal to you, your majesty. Because they remember the late emperor, all of them, and they wish to repay his kindness in service to you. This is the moment to extend your divine influence, to honour the memory of the late Emperor and strengthen the morale of your officers. It is not time to listen to bad advice, or close your ears to the suggestions of loyal men.
The court and the administration are as one. Both must be judged by one standard. Those who are loyal and good must get what they deserve, but so must the evil-doers who break the law. This will demonstrate the justice of your rule. There cannot be one law for the court and another for the administration. The court and the administration are as one. Both must be judged by one standard. Those who are loyal and good must get what they deserve, but so must the evil-doers who break the law. This will demonstrate the justice of your rule. There cannot be one law for the court and another for the administration.
@ -97,7 +97,7 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
FluText{ FluText{
id:text_info id:text_info
width: scrollview.width width: scrollview.width
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
padding: 14 padding: 14
text: qsTr("Permit me to observe: the late emperor was taken from us before he could finish his life`s work...") text: qsTr("Permit me to observe: the late emperor was taken from us before he could finish his life`s work...")
} }

View File

@ -118,7 +118,7 @@ FluScrollablePage{
Layout.leftMargin: 20 Layout.leftMargin: 20
color: FluColors.Grey120 color: FluColors.Grey120
font.pixelSize: 12 font.pixelSize: 12
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
} }
} }
FluIcon{ FluIcon{
@ -214,7 +214,7 @@ FluScrollablePage{
id:item_desc id:item_desc
text:desc text:desc
color:FluColors.Grey120 color:FluColors.Grey120
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
elide: Text.ElideRight elide: Text.ElideRight
font: FluTextStyle.Caption font: FluTextStyle.Caption
maximumLineCount: 2 maximumLineCount: 2

View File

@ -552,7 +552,7 @@ FluContentPage{
FluText{ FluText{
id:text_info id:text_info
width: scrollview.width width: scrollview.width
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
padding: 14 padding: 14
} }
} }

View File

@ -23,7 +23,7 @@ FluScrollablePage{
Component{ Component{
id:com_lable id:com_lable
FluText{ FluText{
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
font.bold: true font.bold: true
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
text: modelData.lable text: modelData.lable
@ -41,7 +41,7 @@ FluScrollablePage{
Component{ Component{
id:com_text id:com_text
FluText{ FluText{
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
text: modelData.text text: modelData.text
font.bold: true font.bold: true

View File

@ -44,7 +44,7 @@ FluWindow {
leftMargin: 10 leftMargin: 10
rightMargin: 10 rightMargin: 10
} }
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
text: qsTr("We apologize for the inconvenience caused by an unexpected error") text: qsTr("We apologize for the inconvenience caused by an unexpected error")
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter

View File

@ -32,7 +32,7 @@ FluWindow {
text:loader.itemLodaer().sourceComponent.errorString() text:loader.itemLodaer().sourceComponent.errorString()
color:"red" color:"red"
anchors.fill: parent anchors.fill: parent
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
padding: 20 padding: 20
verticalAlignment: Qt.AlignVCenter verticalAlignment: Qt.AlignVCenter
horizontalAlignment: Qt.AlignHCenter horizontalAlignment: Qt.AlignHCenter

View File

@ -13,8 +13,8 @@ FluWindow {
id:window id:window
title: "FluentUI" title: "FluentUI"
width: 1000 width: 960
height: 680 height: 600
minimumWidth: 520 minimumWidth: 520
minimumHeight: 200 minimumHeight: 200
launchMode: FluWindowType.SingleTask launchMode: FluWindowType.SingleTask
@ -112,10 +112,11 @@ FluWindow {
Component{ Component{
id: nav_item_right_menu id: nav_item_right_menu
FluMenu{ FluMenu{
width: 186 id: menu
width: 130
FluMenuItem{ FluMenuItem{
text: qsTr("Open in Separate Window") text: qsTr("Open in Separate Window")
font.pixelSize: 12 visible: true
onClicked: { onClicked: {
FluApp.navigate("/pageWindow",{title:modelData.title,url:modelData.url}) FluApp.navigate("/pageWindow",{title:modelData.title,url:modelData.url})
} }

View File

@ -22,7 +22,7 @@ FluWindow {
} }
FluText{ FluText{
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
anchors{ anchors{
left: parent.left left: parent.left
right: parent.right right: parent.right

View File

@ -20,12 +20,12 @@ static inline QByteArray qtNativeEventType()
static inline bool isCompositionEnabled(){ static inline bool isCompositionEnabled(){
typedef HRESULT (WINAPI* DwmIsCompositionEnabledPtr)(BOOL *pfEnabled); typedef HRESULT (WINAPI* DwmIsCompositionEnabledPtr)(BOOL *pfEnabled);
HMODULE module = ::LoadLibraryW(L"dwmapi.dll"); HMODULE module = LoadLibraryW(L"dwmapi.dll");
if (module) if (module)
{ {
BOOL composition_enabled = false; BOOL composition_enabled = false;
DwmIsCompositionEnabledPtr dwm_is_composition_enabled; DwmIsCompositionEnabledPtr dwm_is_composition_enabled;
dwm_is_composition_enabled= reinterpret_cast<DwmIsCompositionEnabledPtr>(::GetProcAddress(module, "DwmIsCompositionEnabled")); dwm_is_composition_enabled= reinterpret_cast<DwmIsCompositionEnabledPtr>(GetProcAddress(module, "DwmIsCompositionEnabled"));
if (dwm_is_composition_enabled) if (dwm_is_composition_enabled)
{ {
dwm_is_composition_enabled(&composition_enabled); dwm_is_composition_enabled(&composition_enabled);
@ -64,7 +64,7 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void *
if (wp != nullptr && (wp->flags & SWP_NOSIZE) == 0) if (wp != nullptr && (wp->flags & SWP_NOSIZE) == 0)
{ {
wp->flags |= SWP_NOCOPYBITS; wp->flags |= SWP_NOCOPYBITS;
*result = ::DefWindowProcW(hwnd, uMsg, wParam, lParam); *result = 0;
return true; return true;
} }
return false; return false;
@ -82,7 +82,7 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void *
return true; return true;
} }
int offsetSize = 0; int offsetSize = 0;
bool isMaximum = ::IsZoomed(hwnd); bool isMaximum = IsZoomed(hwnd);
offsetXY = QPoint(abs(clientRect->left - originalLeft),abs(clientRect->top - originalTop)); offsetXY = QPoint(abs(clientRect->left - originalLeft),abs(clientRect->top - originalTop));
if(isMaximum || _helper->fullScreen()){ if(isMaximum || _helper->fullScreen()){
_helper->setOriginalPos(QPoint(originalLeft,originalTop)); _helper->setOriginalPos(QPoint(originalLeft,originalTop));
@ -171,7 +171,7 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void *
*result = FALSE; *result = FALSE;
return true; return true;
}else if(uMsg == WM_NCACTIVATE){ }else if(uMsg == WM_NCACTIVATE){
*result = ::DefWindowProcW(hwnd, WM_NCACTIVATE, wParam, -1); *result = DefWindowProcW(hwnd, WM_NCACTIVATE, wParam, -1);
return true; return true;
}else if(uMsg == WM_GETMINMAXINFO){ }else if(uMsg == WM_GETMINMAXINFO){
#if QT_VERSION < QT_VERSION_CHECK(6,2,4) #if QT_VERSION < QT_VERSION_CHECK(6,2,4)
@ -322,21 +322,21 @@ void FluFramelessHelper::componentComplete(){
HWND hwnd = reinterpret_cast<HWND>(window->winId()); HWND hwnd = reinterpret_cast<HWND>(window->winId());
DWORD style = ::GetWindowLong(hwnd, GWL_STYLE); DWORD style = ::GetWindowLong(hwnd, GWL_STYLE);
if(resizeable()){ if(resizeable()){
::SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_MAXIMIZEBOX | WS_THICKFRAME); SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_MAXIMIZEBOX | WS_THICKFRAME);
}else{ }else{
::SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_THICKFRAME); SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_THICKFRAME);
} }
LONG exstyle = ::GetWindowLong(hwnd, GWL_EXSTYLE); LONG exstyle = ::GetWindowLong(hwnd, GWL_EXSTYLE);
exstyle = exstyle | WS_EX_LAYERED; exstyle = exstyle | WS_EX_LAYERED;
::SetWindowLongPtr(hwnd, GWL_EXSTYLE, exstyle); SetWindowLongPtr(hwnd, GWL_EXSTYLE, exstyle);
::SetLayeredWindowAttributes(hwnd, RGB(251, 255, 242), 0, LWA_COLORKEY); SetLayeredWindowAttributes(hwnd, RGB(251, 255, 242), 0, LWA_COLORKEY);
connect(window,&QQuickWindow::activeChanged,this,[this,hwnd]{ connect(window,&QQuickWindow::activeChanged,this,[this,hwnd]{
if(this->window->isActive()){ if(this->window->isActive()){
LONG exstyle = ::GetWindowLong(hwnd, GWL_EXSTYLE); LONG exstyle = ::GetWindowLong(hwnd, GWL_EXSTYLE);
if(exstyle & WS_EX_LAYERED){ if(exstyle & WS_EX_LAYERED){
exstyle = exstyle &~ WS_EX_LAYERED; exstyle = exstyle &~ WS_EX_LAYERED;
::SetWindowLongPtr(hwnd, GWL_EXSTYLE, exstyle); SetWindowLongPtr(hwnd, GWL_EXSTYLE, exstyle);
::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);
} }
} }
}); });
@ -362,36 +362,36 @@ void FluFramelessHelper::componentComplete(){
void FluFramelessHelper::_onScreenChanged(){ void FluFramelessHelper::_onScreenChanged(){
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
HWND hwnd = reinterpret_cast<HWND>(window->winId()); HWND hwnd = reinterpret_cast<HWND>(window->winId());
::SetWindowPos(hwnd,0,0,0,0,0,SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED | SWP_NOOWNERZORDER); SetWindowPos(hwnd,0,0,0,0,0,SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED | SWP_NOOWNERZORDER);
::RedrawWindow(hwnd, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW); RedrawWindow(hwnd, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW);
#endif #endif
} }
void FluFramelessHelper::showSystemMenu(QPoint point){ void FluFramelessHelper::showSystemMenu(QPoint point){
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
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);
::SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_SYSMENU); SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_SYSMENU);
const HMENU hMenu = ::GetSystemMenu(hwnd, FALSE); const HMENU hMenu = ::GetSystemMenu(hwnd, FALSE);
if(maximized() || fullScreen()){ if(maximized() || fullScreen()){
::EnableMenuItem(hMenu,SC_MOVE,MFS_DISABLED); EnableMenuItem(hMenu,SC_MOVE,MFS_DISABLED);
::EnableMenuItem(hMenu,SC_RESTORE,MFS_ENABLED); EnableMenuItem(hMenu,SC_RESTORE,MFS_ENABLED);
}else{ }else{
::EnableMenuItem(hMenu,SC_MOVE,MFS_ENABLED); EnableMenuItem(hMenu,SC_MOVE,MFS_ENABLED);
::EnableMenuItem(hMenu,SC_RESTORE,MFS_DISABLED); EnableMenuItem(hMenu,SC_RESTORE,MFS_DISABLED);
} }
if(resizeable() && !maximized() && !fullScreen()){ if(resizeable() && !maximized() && !fullScreen()){
::EnableMenuItem(hMenu,SC_SIZE,MFS_ENABLED); EnableMenuItem(hMenu,SC_SIZE,MFS_ENABLED);
::EnableMenuItem(hMenu,SC_MAXIMIZE,MFS_ENABLED); EnableMenuItem(hMenu,SC_MAXIMIZE,MFS_ENABLED);
}else{ }else{
::EnableMenuItem(hMenu,SC_SIZE,MFS_DISABLED); EnableMenuItem(hMenu,SC_SIZE,MFS_DISABLED);
::EnableMenuItem(hMenu,SC_MAXIMIZE,MFS_DISABLED); EnableMenuItem(hMenu,SC_MAXIMIZE,MFS_DISABLED);
} }
const int result = ::TrackPopupMenu(hMenu, (TPM_RETURNCMD | (QGuiApplication::isRightToLeft() ? TPM_RIGHTALIGN : TPM_LEFTALIGN)), point.x()*window->devicePixelRatio(), point.y()*window->devicePixelRatio(), 0, hwnd, nullptr); const int result = TrackPopupMenu(hMenu, (TPM_RETURNCMD | (QGuiApplication::isRightToLeft() ? TPM_RIGHTALIGN : TPM_LEFTALIGN)), point.x()*window->devicePixelRatio(), point.y()*window->devicePixelRatio(), 0, hwnd, nullptr);
if (result != FALSE) { if (result != FALSE) {
::PostMessageW(hwnd, WM_SYSCOMMAND, result, 0); PostMessageW(hwnd, WM_SYSCOMMAND, result, 0);
} }
::SetWindowLongPtr(hwnd, GWL_STYLE, style &~ WS_SYSMENU); SetWindowLongPtr(hwnd, GWL_STYLE, style &~ WS_SYSMENU);
#endif #endif
} }
@ -400,9 +400,9 @@ void FluFramelessHelper::_onStayTopChange(){
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
HWND hwnd = reinterpret_cast<HWND>(window->winId()); HWND hwnd = reinterpret_cast<HWND>(window->winId());
if(isStayTop){ if(isStayTop){
::SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
}else{ }else{
::SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
} }
#else #else
window->setFlag(Qt::WindowStaysOnTopHint,isStayTop); window->setFlag(Qt::WindowStaysOnTopHint,isStayTop);

View File

@ -41,7 +41,7 @@ FluPopup {
FluText{ FluText{
id:text_message id:text_message
font: FluTextStyle.Body font: FluTextStyle.Body
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
text:message text:message
width: parent.width width: parent.width
topPadding: 4 topPadding: 4
@ -67,7 +67,7 @@ FluPopup {
topPadding: 20 topPadding: 20
leftPadding: 20 leftPadding: 20
rightPadding: 20 rightPadding: 20
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
} }
FluLoader{ FluLoader{
sourceComponent: com_message sourceComponent: com_message

View File

@ -45,7 +45,7 @@ Button {
radius: parent.radius radius: parent.radius
anchors{ anchors{
fill: parent fill: parent
topMargin: control.enabled ? 0 : 0 topMargin: control.enabled ? 1 : 0
leftMargin: control.enabled ? 1 : 0 leftMargin: control.enabled ? 1 : 0
rightMargin: control.enabled ? 1 : 0 rightMargin: control.enabled ? 1 : 0
bottomMargin: control.enabled ? 2 : 0 bottomMargin: control.enabled ? 2 : 0

View File

@ -192,13 +192,13 @@ FluObject {
spacing: 5 spacing: 5
FluText{ FluText{
text:_super.text text:_super.text
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
width: Math.min(implicitWidth,mcontrol.maxWidth) width: Math.min(implicitWidth,mcontrol.maxWidth)
} }
FluText{ FluText{
text: _super.moremsg text: _super.moremsg
visible: _super.moremsg visible: _super.moremsg
wrapMode : Text.WrapAnywhere wrapMode : Text.WordWrap
textColor: FluColors.Grey120 textColor: FluColors.Grey120
width: Math.min(implicitWidth,mcontrol.maxWidth) width: Math.min(implicitWidth,mcontrol.maxWidth)
} }

View File

@ -40,7 +40,6 @@ T.MenuItem {
icon.height: 24 icon.height: 24
icon.color: control.palette.windowText icon.color: control.palette.windowText
height: visible ? implicitHeight : 0 height: visible ? implicitHeight : 0
font:FluTextStyle.Body
Component{ Component{
id:com_icon id:com_icon
FluIcon{ FluIcon{
@ -70,7 +69,6 @@ T.MenuItem {
FluText { FluText {
id:content_text id:content_text
text: control.text text: control.text
font: control.font
color: control.textColor color: control.textColor
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }

View File

@ -20,7 +20,7 @@ TextArea{
return normalColor return normalColor
} }
font:FluTextStyle.Body font:FluTextStyle.Body
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
padding: 8 padding: 8
leftPadding: padding+4 leftPadding: padding+4
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering

View File

@ -141,7 +141,7 @@ Rectangle {
id:item_text id:item_text
text: String(display) text: String(display)
elide: Text.ElideRight elide: Text.ElideRight
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
anchors{ anchors{
fill: parent fill: parent
leftMargin: 11 leftMargin: 11

View File

@ -95,7 +95,7 @@ Item{
Component{ Component{
id:com_lable id:com_lable
FluText{ FluText{
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
text: { text: {
if(modelData.lable){ if(modelData.lable){
@ -110,7 +110,7 @@ Item{
Component{ Component{
id:com_text id:com_text
FluText{ FluText{
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
text: modelData.text text: modelData.text
textFormat: Text.RichText textFormat: Text.RichText

View File

@ -61,7 +61,7 @@ Button {
radius: parent.radius radius: parent.radius
anchors{ anchors{
fill: parent fill: parent
topMargin: checked && enabled ? 0 : 0 topMargin: checked && enabled ? 1 : 0
leftMargin: checked && enabled ? 1 : 0 leftMargin: checked && enabled ? 1 : 0
rightMargin: checked && enabled ? 1 : 0 rightMargin: checked && enabled ? 1 : 0
bottomMargin: checked && enabled ? 2 : 0 bottomMargin: checked && enabled ? 2 : 0

View File

@ -145,7 +145,7 @@ Popup{
FluText{ FluText{
id: text_desc id: text_desc
font: FluTextStyle.Body font: FluTextStyle.Body
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
maximumLineCount: 4 maximumLineCount: 4
elide: Text.ElideRight elide: Text.ElideRight
text: d.step.description text: d.step.description

View File

@ -41,7 +41,7 @@ FluPopup {
FluText{ FluText{
id:text_message id:text_message
font: FluTextStyle.Body font: FluTextStyle.Body
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
text:message text:message
width: parent.width width: parent.width
topPadding: 4 topPadding: 4
@ -67,7 +67,7 @@ FluPopup {
topPadding: 20 topPadding: 20
leftPadding: 20 leftPadding: 20
rightPadding: 20 rightPadding: 20
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
} }
FluLoader{ FluLoader{
sourceComponent: com_message sourceComponent: com_message

View File

@ -46,7 +46,7 @@ Button {
radius: parent.radius radius: parent.radius
anchors{ anchors{
fill: parent fill: parent
topMargin: control.enabled ? 0 : 0 topMargin: control.enabled ? 1 : 0
leftMargin: control.enabled ? 1 : 0 leftMargin: control.enabled ? 1 : 0
rightMargin: control.enabled ? 1 : 0 rightMargin: control.enabled ? 1 : 0
bottomMargin: control.enabled ? 2 : 0 bottomMargin: control.enabled ? 2 : 0

View File

@ -192,13 +192,13 @@ FluObject {
spacing: 5 spacing: 5
FluText{ FluText{
text:_super.text text:_super.text
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
width: Math.min(implicitWidth,mcontrol.maxWidth) width: Math.min(implicitWidth,mcontrol.maxWidth)
} }
FluText{ FluText{
text: _super.moremsg text: _super.moremsg
visible: _super.moremsg visible: _super.moremsg
wrapMode : Text.WrapAnywhere wrapMode : Text.WordWrap
textColor: FluColors.Grey120 textColor: FluColors.Grey120
width: Math.min(implicitWidth,mcontrol.maxWidth) width: Math.min(implicitWidth,mcontrol.maxWidth)
} }

View File

@ -41,7 +41,6 @@ T.MenuItem {
icon.height: 24 icon.height: 24
icon.color: control.palette.windowText icon.color: control.palette.windowText
height: visible ? implicitHeight : 0 height: visible ? implicitHeight : 0
font:FluTextStyle.Body
Component{ Component{
id:com_icon id:com_icon
FluIcon{ FluIcon{
@ -71,7 +70,6 @@ T.MenuItem {
FluText { FluText {
id:content_text id:content_text
text: control.text text: control.text
font: control.font
color: control.textColor color: control.textColor
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }

View File

@ -21,7 +21,7 @@ TextArea{
return normalColor return normalColor
} }
font:FluTextStyle.Body font:FluTextStyle.Body
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
padding: 8 padding: 8
leftPadding: padding+4 leftPadding: padding+4
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering

View File

@ -142,7 +142,7 @@ Rectangle {
id:item_text id:item_text
text: String(display) text: String(display)
elide: Text.ElideRight elide: Text.ElideRight
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
anchors{ anchors{
fill: parent fill: parent
leftMargin: 11 leftMargin: 11

View File

@ -95,7 +95,7 @@ Item{
Component{ Component{
id:com_lable id:com_lable
FluText{ FluText{
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
text: { text: {
if(modelData.lable){ if(modelData.lable){
@ -110,7 +110,7 @@ Item{
Component{ Component{
id:com_text id:com_text
FluText{ FluText{
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
text: modelData.text text: modelData.text
textFormat: Text.RichText textFormat: Text.RichText

View File

@ -57,7 +57,7 @@ Button {
radius: parent.radius radius: parent.radius
anchors{ anchors{
fill: parent fill: parent
topMargin: checked && enabled ? 0 : 0 topMargin: checked && enabled ? 1 : 0
leftMargin: checked && enabled ? 1 : 0 leftMargin: checked && enabled ? 1 : 0
rightMargin: checked && enabled ? 1 : 0 rightMargin: checked && enabled ? 1 : 0
bottomMargin: checked && enabled ? 2 : 0 bottomMargin: checked && enabled ? 2 : 0

View File

@ -145,7 +145,7 @@ Popup{
FluText{ FluText{
id: text_desc id: text_desc
font: FluTextStyle.Body font: FluTextStyle.Body
wrapMode: Text.WrapAnywhere wrapMode: Text.WordWrap
maximumLineCount: 4 maximumLineCount: 4
elide: Text.ElideRight elide: Text.ElideRight
text: d.step.description text: d.step.description