Merge branch '6.5.0'

main
zhuzihcu 2023-06-08 10:18:59 +08:00
commit 11206c1d18
2 changed files with 22 additions and 12 deletions

View File

@ -5,9 +5,10 @@
#if (QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)) #if (QT_VERSION >= QT_VERSION_CHECK(6, 5, 0))
#include <QStyleHints> #include <QStyleHints>
#elif ((QT_VERSION >= QT_VERSION_CHECK(6, 2, 1))) #elif ((QT_VERSION >= QT_VERSION_CHECK(6, 2, 1)))
#include <QPalette>
#include <QtGui/qpa/qplatformtheme.h> #include <QtGui/qpa/qplatformtheme.h>
#include <QtGui/private/qguiapplication_p.h> #include <QtGui/private/qguiapplication_p.h>
#else
#include <QPalette>
#endif #endif
#include <QGuiApplication> #include <QGuiApplication>
@ -57,8 +58,11 @@ bool FluTheme::systemDark()
return (theme->appearance() == QPlatformTheme::Appearance::Dark); return (theme->appearance() == QPlatformTheme::Appearance::Dark);
} }
return false; return false;
#else
QPalette palette = qApp->palette();
QColor color = palette.color(QPalette::Window).rgb();
return !(color.red() * 0.2126 + color.green() * 0.7152 + color.blue() * 0.0722 > 255 / 2);
#endif #endif
return false;
} }
bool FluTheme::dark(){ bool FluTheme::dark(){

View File

@ -15,26 +15,32 @@ Popup {
property alias blurOpacity: blur.acrylicOpacity property alias blurOpacity: blur.acrylicOpacity
property alias blurRectX: blur.rectX property alias blurRectX: blur.rectX
property alias blurRectY: blur.rectY property alias blurRectY: blur.rectY
enter: Transition { enter: Transition {
reversible: true
NumberAnimation { NumberAnimation {
properties: "opacity,scale" properties: "scale"
from:1.2
to:1
duration: 83
}
NumberAnimation {
property: "opacity"
duration: 83
from:0 from:0
to:1 to:1
duration: 167
easing.type: Easing.BezierSpline
easing.bezierCurve: [ 0, 0, 0, 1 ]
} }
} }
exit:Transition { exit:Transition {
NumberAnimation { NumberAnimation {
properties: "opacity,scale" properties: "scale"
from:1
to:1.2
duration: 83
}
NumberAnimation {
property: "opacity"
duration: 83
from:1 from:1
to:0 to:0
duration: 167
easing.type: Easing.BezierSpline
easing.bezierCurve: [ 1, 0, 0, 0 ]
} }
} }