Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DlgPrefInterface: Disable tooltips on iOS by default #12689

Merged
merged 2 commits into from
Feb 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 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 @@ -439,7 +440,11 @@ void DlgPrefInterface::slotApply() {
void DlgPrefInterface::loadTooltipPreferenceFromConfig() {
const auto tooltipMode = static_cast<mixxx::TooltipsPreference>(
m_pConfig->getValue(ConfigKey(kControlsGroup, kTooltipsKey),
#ifdef Q_OS_IOS
Copy link
Member

@JoergAtGithub JoergAtGithub Jan 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the OS the appropriated criteria here? Shouldn't it be screen size, or screen size + touch instead? This also applies to RPi etc.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screen size would be debatable IMO, touch seems reasonable, but remember that this is only a default value and setting it depending on whether there's a mouse currently connected doesn't make much sense IMO (or would lead to surprising behavior with missing tooltips once the user connects one).

If we'd want to go this route, we would likely have to dynamically update this option based on screen size/connected input devices etc. Such a mechanism would be a lot more complex to implement than this fix, which is safe to apply given that all iOS devices use a touchscreen as their primary input.

We could implement a more complex system in future PRs, but I'd consider that out of scope for this small UX improvement which is trivial to replace.

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
Loading