win: don't show two tooltips

Fixes: #325
This commit is contained in:
Yuhang Zhao 2023-11-20 10:31:03 +08:00
parent 096d30b8cf
commit 2765d18634
2 changed files with 2 additions and 2 deletions

View File

@ -245,7 +245,7 @@ void QuickStandardTitleBar::setWindowIcon(const QVariant &value)
void QuickStandardTitleBar::updateMaximizeButton() void QuickStandardTitleBar::updateMaximizeButton()
{ {
#if (!defined(Q_OS_MACOS) && FRAMELESSHELPER_CONFIG(system_button)) #if (FRAMELESSHELPER_CONFIG(system_button) && defined(Q_OS_LINUX))
const QQuickWindow * const w = window(); const QQuickWindow * const w = window();
if (!w) { if (!w) {
return; return;

View File

@ -293,7 +293,7 @@ bool StandardTitleBarPrivate::isInTitleBarIconArea(const QPoint &pos) const
void StandardTitleBarPrivate::updateMaximizeButton() void StandardTitleBarPrivate::updateMaximizeButton()
{ {
#if (!defined(Q_OS_MACOS) && FRAMELESSHELPER_CONFIG(system_button)) #if (FRAMELESSHELPER_CONFIG(system_button) && defined(Q_OS_LINUX))
const bool max = window->isMaximized(); const bool max = window->isMaximized();
maximizeButton->setButtonType(max ? SystemButtonType::Restore : SystemButtonType::Maximize); maximizeButton->setButtonType(max ? SystemButtonType::Restore : SystemButtonType::Maximize);
maximizeButton->setToolTip(max ? tr("Restore") : tr("Maximize")); maximizeButton->setToolTip(max ? tr("Restore") : tr("Maximize"));