Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

【bug】windows10下最大化和恢复按钮不显示 #335

Open
blazewater-gmail opened this issue Dec 12, 2023 · 0 comments
Open

【bug】windows10下最大化和恢复按钮不显示 #335

blazewater-gmail opened this issue Dec 12, 2023 · 0 comments

Comments

@blazewater-gmail
Copy link

blazewater-gmail commented Dec 12, 2023

版本:Qt6.3.2

quickstandardtitlebar.cpp 和 standardtitlebar.cpp中的宏定义屏蔽了windows和macos

@@ -243,11 +243,12 @@ void QuickStandardTitleBar::setWindowIcon(const QVariant &value)
     m_windowIcon->setSource(value);
 }
 
 void QuickStandardTitleBar::updateMaximizeButton()
 {
-#if (FRAMELESSHELPER_CONFIG(system_button) && defined(Q_OS_LINUX))
+#if (!defined(Q_OS_MACOS) && FRAMELESSHELPER_CONFIG(system_button))
     const QQuickWindow * const w = window();
     if (!w) {
         return;
     }
     const bool max = (w->visibility() == QQuickWindow::Maximized);
@@ -359,11 +360,12 @@ void QuickStandardTitleBar::clickCloseButton()
     }
 }
 
 void QuickStandardTitleBar::retranslateUi()
 {
-#if (FRAMELESSHELPER_CONFIG(system_button) && defined(Q_OS_LINUX))
+#if (!defined(Q_OS_MACOS) && FRAMELESSHELPER_CONFIG(system_button))
     qobject_cast<QQuickToolTipAttached *>(qmlAttachedPropertiesObject<QQuickToolTip>(m_minimizeButton))->setText(tr("Minimize"));
     qobject_cast<QQuickToolTipAttached *>(qmlAttachedPropertiesObject<QQuickToolTip>(m_maximizeButton))->setText([this]() -> QString {
         if (const QQuickWindow * const w = window()) {
             if (w->visibility() == QQuickWindow::Maximized) {
                 return tr("Restore");
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant