jamulus icon indicating copy to clipboard operation
jamulus copied to clipboard

Add equivalent of "hover" for touch displays

Open pljones opened this issue 2 years ago • 4 comments

What is the current behaviour and why should it be changed?

On desktop builds, hovering the mouse over the channel user displays their profile details in a tool tip: image

As no "hover" action is available for touch displays (e.g. Android), this feature is unavailable.

Describe possible approaches

A single tap or, probably better, long-hold could be used to display tool tips in general. (Long-hold would avoid misinterpretation of single tap on a checkbox or menu, etc.)

I'm guessing touch screens also are missing right-click "What's this?" support. Possibly that could be implemented as above, with "Show musician profile" as an extra option where applicable.

Other trigger actions could be double tap or two-finger tap. Long-hold is prefered, I think.

Has this feature been discussed and generally agreed?

Only with my partner, who raised it.

pljones avatar Aug 12 '23 16:08 pljones

Long tap should be the way to go.

ann0see avatar Aug 12 '23 21:08 ann0see

OK https://doc.qt.io/qt-6/qtapandholdgesture.html has been around since qt4.8 or earlier, so it looks like gesture support is pretty solid. ~I propose to update any object supporting "What's this?" with an additional trigger of tap-hold and, for the musician profile, to add that to the tap-hold menu.~

Edit: So editing the default Shift-F1 / right-click / help menu behaviour is "not simple"; neither is routing tap-hold to hover (as it's tap-hold finished). For now, I'll just add tap-hold to the one component.

Edit2: Ugh... and gestures use QWidget::event() rather than sending a signal!

Edit3: Oh dear... https://doc.qt.io/qt-6/moc.html#multiple-inheritance-requires-qobject-to-be-first so overriding event() has to be done explicitly per class and can't reuse code (either to convert the event to a signal or to handle the event).

pljones avatar Aug 13 '23 10:08 pljones

Well, that didn't work. Doesn't appear to have broken the Windows build but long hold did nothing... I'll have to investigate further.

pljones avatar Aug 13 '23 16:08 pljones

I'm going to de-assign myself from this: my Android-foo hasn't got me any progress on it so far.

pljones avatar Mar 28 '24 17:03 pljones