This commit is contained in:
zhuzichu 2023-09-27 18:10:20 +08:00
parent 8e1e8a9db5
commit 4a03ad4227
3 changed files with 31 additions and 62 deletions

View File

@ -9,6 +9,7 @@
#include <FramelessHelper/Quick/framelessquickmodule.h> #include <FramelessHelper/Quick/framelessquickmodule.h>
#include <FramelessHelper/Core/private/framelessconfig_p.h> #include <FramelessHelper/Core/private/framelessconfig_p.h>
#include <QtQml/qqmlextensionplugin.h> #include <QtQml/qqmlextensionplugin.h>
#include <QLoggingCategory>
#include "AppInfo.h" #include "AppInfo.h"
#include "src/component/CircularReveal.h" #include "src/component/CircularReveal.h"
#include "src/component/FileWatcher.h" #include "src/component/FileWatcher.h"
@ -47,6 +48,8 @@ int main(int argc, char *argv[])
#endif #endif
} }
QGuiApplication app(argc, argv); QGuiApplication app(argc, argv);
// QLoggingCategory::setFilterRules(QStringLiteral("qt.scenegraph.general=true"));
// qSetMessagePattern("%{category}: %{message}");
FramelessConfig::instance()->set(Global::Option::DisableLazyInitializationForMicaMaterial); FramelessConfig::instance()->set(Global::Option::DisableLazyInitializationForMicaMaterial);
FramelessConfig::instance()->set(Global::Option::CenterWindowBeforeShow); FramelessConfig::instance()->set(Global::Option::CenterWindowBeforeShow);
FramelessConfig::instance()->set(Global::Option::ForceNonNativeBackgroundBlur); FramelessConfig::instance()->set(Global::Option::ForceNonNativeBackgroundBlur);

View File

@ -68,7 +68,6 @@ Button {
iconSource: control.iconSource iconSource: control.iconSource
} }
} }
Component{ Component{
id:com_row id:com_row
RowLayout{ RowLayout{
@ -82,23 +81,8 @@ Button {
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
visible: display !== Button.IconOnly visible: display !== Button.IconOnly
} }
FluTooltip{
id:tool_tip
visible: {
if(control.text === ""){
return false
}
if(control.display !== Button.IconOnly){
return false
}
return hovered
}
text:control.text
delay: 1000
}
} }
} }
Component{ Component{
id:com_column id:com_column
ColumnLayout{ ColumnLayout{
@ -112,23 +96,8 @@ Button {
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
visible: display !== Button.IconOnly visible: display !== Button.IconOnly
} }
FluTooltip{
id:tool_tip
visible: {
if(control.text === ""){
return false
}
if(control.display !== Button.IconOnly){
return false
}
return hovered
}
text:control.text
delay: 1000
}
} }
} }
contentItem:Loader{ contentItem:Loader{
sourceComponent: { sourceComponent: {
if(display === Button.TextUnderIcon){ if(display === Button.TextUnderIcon){
@ -137,4 +106,18 @@ Button {
return com_row return com_row
} }
} }
FluTooltip{
id:tool_tip
visible: {
if(control.text === ""){
return false
}
if(control.display !== Button.IconOnly){
return false
}
return hovered
}
text:control.text
delay: 1000
}
} }

View File

@ -69,7 +69,6 @@ Button {
iconSource: control.iconSource iconSource: control.iconSource
} }
} }
Component{ Component{
id:com_row id:com_row
RowLayout{ RowLayout{
@ -83,23 +82,8 @@ Button {
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
visible: display !== Button.IconOnly visible: display !== Button.IconOnly
} }
FluTooltip{
id:tool_tip
visible: {
if(control.text === ""){
return false
}
if(control.display !== Button.IconOnly){
return false
}
return hovered
}
text:control.text
delay: 1000
}
} }
} }
Component{ Component{
id:com_column id:com_column
ColumnLayout{ ColumnLayout{
@ -113,23 +97,8 @@ Button {
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
visible: display !== Button.IconOnly visible: display !== Button.IconOnly
} }
FluTooltip{
id:tool_tip
visible: {
if(control.text === ""){
return false
}
if(control.display !== Button.IconOnly){
return false
}
return hovered
}
text:control.text
delay: 1000
}
} }
} }
contentItem:Loader{ contentItem:Loader{
sourceComponent: { sourceComponent: {
if(display === Button.TextUnderIcon){ if(display === Button.TextUnderIcon){
@ -138,4 +107,18 @@ Button {
return com_row return com_row
} }
} }
FluTooltip{
id:tool_tip
visible: {
if(control.text === ""){
return false
}
if(control.display !== Button.IconOnly){
return false
}
return hovered
}
text:control.text
delay: 1000
}
} }