Compare commits
2 Commits
096d30b8cf
...
1764a8a918
Author | SHA1 | Date |
---|---|---|
|
1764a8a918 | |
|
2765d18634 |
|
@ -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;
|
||||||
|
@ -361,7 +361,7 @@ void QuickStandardTitleBar::clickCloseButton()
|
||||||
|
|
||||||
void QuickStandardTitleBar::retranslateUi()
|
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_minimizeButton))->setText(tr("Minimize"));
|
||||||
qobject_cast<QQuickToolTipAttached *>(qmlAttachedPropertiesObject<QQuickToolTip>(m_maximizeButton))->setText([this]() -> QString {
|
qobject_cast<QQuickToolTipAttached *>(qmlAttachedPropertiesObject<QQuickToolTip>(m_maximizeButton))->setText([this]() -> QString {
|
||||||
if (const QQuickWindow * const w = window()) {
|
if (const QQuickWindow * const w = window()) {
|
||||||
|
|
|
@ -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"));
|
||||||
|
@ -338,7 +338,7 @@ void StandardTitleBarPrivate::updateChromeButtonColor()
|
||||||
|
|
||||||
void StandardTitleBarPrivate::retranslateUi()
|
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"));
|
minimizeButton->setToolTip(tr("Minimize"));
|
||||||
maximizeButton->setToolTip(window->isMaximized() ? tr("Restore") : tr("Maximize"));
|
maximizeButton->setToolTip(window->isMaximized() ? tr("Restore") : tr("Maximize"));
|
||||||
closeButton->setToolTip(tr("Close"));
|
closeButton->setToolTip(tr("Close"));
|
||||||
|
|
Loading…
Reference in New Issue