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

Commit

Permalink
#325 win: don't show two tooltips (#326)
Browse files Browse the repository at this point in the history
Co-authored-by: yangzhenghan <[email protected]>
  • Loading branch information
kira-96 and yangzhenghan authored Nov 20, 2023
1 parent 2765d18 commit 1764a8a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/quick/quickstandardtitlebar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/standardtitlebar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down

0 comments on commit 1764a8a

Please sign in to comment.