Compare commits

...

5 Commits

Author SHA1 Message Date
fa14f5824d update 2024-06-14 17:44:31 +08:00
c05222bd81 Merge branch 'temp' 2024-06-14 17:28:37 +08:00
2b528a7072 update 2024-06-14 17:28:31 +08:00
436ae3f8df update 2024-06-14 16:53:48 +08:00
012f30c979 update 2024-06-14 16:01:08 +08:00
6 changed files with 27 additions and 45 deletions

View File

@ -59,9 +59,6 @@ int main(int argc, char *argv[])
QGuiApplication::setQuitOnLastWindowClosed(false); QGuiApplication::setQuitOnLastWindowClosed(false);
SettingsHelper::getInstance()->init(argv); SettingsHelper::getInstance()->init(argv);
Log::setup(argv,uri); Log::setup(argv,uri);
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL);
#endif
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);

View File

@ -411,27 +411,27 @@ void FluFrameless::_setMaximizeHovered(bool val) {
void FluFrameless::_updateCursor(int edges) { void FluFrameless::_updateCursor(int edges) {
switch (edges) { switch (edges) {
case 0: case 0:
window()->setCursor(Qt::ArrowCursor); window()->setCursor(Qt::ArrowCursor);
break; break;
case Qt::LeftEdge: case Qt::LeftEdge:
case Qt::RightEdge: case Qt::RightEdge:
window()->setCursor(Qt::SizeHorCursor); window()->setCursor(Qt::SizeHorCursor);
break; break;
case Qt::TopEdge: case Qt::TopEdge:
case Qt::BottomEdge: case Qt::BottomEdge:
window()->setCursor(Qt::SizeVerCursor); window()->setCursor(Qt::SizeVerCursor);
break; break;
case Qt::LeftEdge | Qt::TopEdge: case Qt::LeftEdge | Qt::TopEdge:
case Qt::RightEdge | Qt::BottomEdge: case Qt::RightEdge | Qt::BottomEdge:
window()->setCursor(Qt::SizeFDiagCursor); window()->setCursor(Qt::SizeFDiagCursor);
break; break;
case Qt::RightEdge | Qt::TopEdge: case Qt::RightEdge | Qt::TopEdge:
case Qt::LeftEdge | Qt::BottomEdge: case Qt::LeftEdge | Qt::BottomEdge:
window()->setCursor(Qt::SizeBDiagCursor); window()->setCursor(Qt::SizeBDiagCursor);
break; break;
default: default:
break; break;
} }
} }

View File

@ -43,12 +43,12 @@ Rectangle{
property alias layoutStandardbuttons: layout_standard_buttons property alias layoutStandardbuttons: layout_standard_buttons
property var maxClickListener : function(){ property var maxClickListener : function(){
if(FluTools.isMacos()){ if(FluTools.isMacos()){
if (d.win.visibility === Window.FullScreen) if (d.win.visibility === Window.FullScreen || d.win.visibility === Window.Maximized)
d.win.showNormal() d.win.showNormal()
else else
d.win.showFullScreen() d.win.showFullScreen()
}else{ }else{
if (d.win.visibility === Window.Maximized) if (d.win.visibility === Window.Maximized || d.win.visibility === Window.FullScreen)
d.win.showNormal() d.win.showNormal()
else else
d.win.showMaximized() d.win.showMaximized()
@ -93,7 +93,7 @@ Rectangle{
} }
return false return false
} }
property bool isRestore: win && Window.Maximized === win.visibility property bool isRestore: win && (Window.Maximized === win.visibility || Window.FullScreen === win.visibility)
property bool resizable: win && !(win.height === win.maximumHeight && win.height === win.minimumHeight && win.width === win.maximumWidth && win.width === win.minimumWidth) property bool resizable: win && !(win.height === win.maximumHeight && win.height === win.minimumHeight && win.width === win.maximumWidth && win.width === win.minimumWidth)
function containsPointToItem(point,item){ function containsPointToItem(point,item){
var pos = item.mapToGlobal(0,0) var pos = item.mapToGlobal(0,0)

View File

@ -94,13 +94,6 @@ Button {
} }
return normalColor return normalColor
} }
Behavior on color {
enabled: control.animationEnabled
ColorAnimation{
duration: 83
}
}
FluIcon { FluIcon {
anchors.centerIn: parent anchors.centerIn: parent
iconSource: FluentIcons.CheckboxIndeterminate iconSource: FluentIcons.CheckboxIndeterminate
@ -114,7 +107,6 @@ Button {
} }
} }
} }
FluIcon { FluIcon {
anchors.centerIn: parent anchors.centerIn: parent
iconSource: FluentIcons.AcceptMedium iconSource: FluentIcons.AcceptMedium

View File

@ -43,12 +43,12 @@ Rectangle{
property alias layoutStandardbuttons: layout_standard_buttons property alias layoutStandardbuttons: layout_standard_buttons
property var maxClickListener : function(){ property var maxClickListener : function(){
if(FluTools.isMacos()){ if(FluTools.isMacos()){
if (d.win.visibility === Window.FullScreen) if (d.win.visibility === Window.FullScreen || d.win.visibility === Window.Maximized)
d.win.showNormal() d.win.showNormal()
else else
d.win.showFullScreen() d.win.showFullScreen()
}else{ }else{
if (d.win.visibility === Window.Maximized) if (d.win.visibility === Window.Maximized || d.win.visibility === Window.FullScreen)
d.win.showNormal() d.win.showNormal()
else else
d.win.showMaximized() d.win.showMaximized()
@ -93,7 +93,7 @@ Rectangle{
} }
return false return false
} }
property bool isRestore: win && Window.Maximized === win.visibility property bool isRestore: win && (Window.Maximized === win.visibility || Window.FullScreen === win.visibility)
property bool resizable: win && !(win.height === win.maximumHeight && win.height === win.minimumHeight && win.width === win.maximumWidth && win.width === win.minimumWidth) property bool resizable: win && !(win.height === win.maximumHeight && win.height === win.minimumHeight && win.width === win.maximumWidth && win.width === win.minimumWidth)
function containsPointToItem(point,item){ function containsPointToItem(point,item){
var pos = item.mapToGlobal(0,0) var pos = item.mapToGlobal(0,0)

View File

@ -95,13 +95,6 @@ Button {
} }
return normalColor return normalColor
} }
Behavior on color {
enabled: control.animationEnabled
ColorAnimation{
duration: 83
}
}
FluIcon { FluIcon {
anchors.centerIn: parent anchors.centerIn: parent
iconSource: FluentIcons.CheckboxIndeterminate iconSource: FluentIcons.CheckboxIndeterminate