diff --git a/example/src/main.cpp b/example/src/main.cpp index 1a5ca868..0d6a8ed9 100644 --- a/example/src/main.cpp +++ b/example/src/main.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include "AppInfo.h" #include "src/component/CircularReveal.h" #include "src/component/FileWatcher.h" @@ -47,6 +48,8 @@ int main(int argc, char *argv[]) #endif } 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::CenterWindowBeforeShow); FramelessConfig::instance()->set(Global::Option::ForceNonNativeBackgroundBlur); diff --git a/src/Qt5/imports/FluentUI/Controls/FluIconButton.qml b/src/Qt5/imports/FluentUI/Controls/FluIconButton.qml index e0e5efc2..c65978cf 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluIconButton.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluIconButton.qml @@ -68,7 +68,6 @@ Button { iconSource: control.iconSource } } - Component{ id:com_row RowLayout{ @@ -82,23 +81,8 @@ Button { Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter 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{ id:com_column ColumnLayout{ @@ -112,23 +96,8 @@ Button { Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter 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{ sourceComponent: { if(display === Button.TextUnderIcon){ @@ -137,4 +106,18 @@ Button { 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 + } } diff --git a/src/Qt6/imports/FluentUI/Controls/FluIconButton.qml b/src/Qt6/imports/FluentUI/Controls/FluIconButton.qml index d3ca552d..1f973082 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluIconButton.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluIconButton.qml @@ -69,7 +69,6 @@ Button { iconSource: control.iconSource } } - Component{ id:com_row RowLayout{ @@ -83,23 +82,8 @@ Button { Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter 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{ id:com_column ColumnLayout{ @@ -113,23 +97,8 @@ Button { Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter 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{ sourceComponent: { if(display === Button.TextUnderIcon){ @@ -138,4 +107,18 @@ Button { 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 + } }