Skip to content

Commit

Permalink
Merge pull request #12689 from fwcd/disable-tooltips-ios
Browse files Browse the repository at this point in the history
DlgPrefInterface: Disable tooltips on iOS by default
  • Loading branch information
ronso0 authored Feb 6, 2024
2 parents e396a37 + 8f10bac commit 7b3e485
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/preferences/dialog/dlgprefinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <QList>
#include <QLocale>
#include <QScreen>
#include <QtGlobal>

#include "control/controlobject.h"
#include "control/controlproxy.h"
Expand Down Expand Up @@ -302,8 +303,13 @@ void DlgPrefInterface::slotResetToDefaults() {
comboBoxScreensaver->setCurrentIndex(comboBoxScreensaver->findData(
static_cast<int>(mixxx::ScreenSaverPreference::PREVENT_ON)));

#ifdef Q_OS_IOS
// Tooltips off everywhere.
radioButtonTooltipsOff->setChecked(true);
#else
// Tooltips on everywhere.
radioButtonTooltipsLibraryAndSkin->setChecked(true);
#endif
}

void DlgPrefInterface::slotSetTooltips() {
Expand Down Expand Up @@ -439,7 +445,11 @@ void DlgPrefInterface::slotApply() {
void DlgPrefInterface::loadTooltipPreferenceFromConfig() {
const auto tooltipMode = static_cast<mixxx::TooltipsPreference>(
m_pConfig->getValue(ConfigKey(kControlsGroup, kTooltipsKey),
#ifdef Q_OS_IOS
static_cast<int>(mixxx::TooltipsPreference::TOOLTIPS_OFF)));
#else
static_cast<int>(mixxx::TooltipsPreference::TOOLTIPS_ON)));
#endif
switch (tooltipMode) {
case mixxx::TooltipsPreference::TOOLTIPS_OFF:
radioButtonTooltipsOff->setChecked(true);
Expand Down

0 comments on commit 7b3e485

Please sign in to comment.