#325 win: don't show two tooltips

This commit is contained in:
yangzhenghan 2023-11-20 11:45:31 +08:00
parent 2765d18634
commit 21a7704deb
2 changed files with 2 additions and 2 deletions

View File

@ -361,7 +361,7 @@ void QuickStandardTitleBar::clickCloseButton()
void QuickStandardTitleBar::retranslateUi()
{
#if (!defined(Q_OS_MACOS) && FRAMELESSHELPER_CONFIG(system_button))
#if (FRAMELESSHELPER_CONFIG(system_button) && defined(Q_OS_LINUX))
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()) {

View File

@ -338,7 +338,7 @@ void StandardTitleBarPrivate::updateChromeButtonColor()
void StandardTitleBarPrivate::retranslateUi()
{
#if (!defined(Q_OS_MACOS) && FRAMELESSHELPER_CONFIG(system_button))
#if (FRAMELESSHELPER_CONFIG(system_button) && defined(Q_OS_LINUX))
minimizeButton->setToolTip(tr("Minimize"));
maximizeButton->setToolTip(window->isMaximized() ? tr("Restore") : tr("Maximize"));
closeButton->setToolTip(tr("Close"));