mavlink / qgroundcontrol

Cross-platform ground control station for drones (Android, iOS, Mac OS, Linux, Windows)
http://qgroundcontrol.io
3.22k stars 3.55k forks source link

Toolbar buttons - when selecting a button in touch screen (tablet) the highlight effect stays on button #9100

Open tzuriel-spearuav opened 3 years ago

tzuriel-spearuav commented 3 years ago

Expected Behavior

Highlight effect on button should disappear upon clicking it

Current Behavior

When hovering a button on image toolbar (Fly, Return, etc) - on windows with mouse pointing device the button shows hover effect highlighting the button with color, this highlight vanish when mouse cursor is no longer on the button. In touch screen devices, as as tablet, pressing the button "Return", which causes confirmation slider to appear, the button stays highlighted until user touch any other toolbar button on screen.

Steps to Reproduce:

  1. Install latest nightly build of QGC on a tablet computer (I'm using a windows tablet)
  2. Connect copter or SITL simulator
  3. During mission, press with thumb on "Return" button (RTL)
  4. Notice return is highlighted while confirmation slider is shown and sometimes even after dismissing the slider (confirming or cancelling)

System Information

tzuriel-spearuav commented 3 years ago

Comment: on similar toolbar disabling the hovered effect from highlight mechanism prevents this problem (in the expense of removing the hover effect of course)

QGCButton {
    ...
    _showHighlight:     pressed | /*hovered |*/ checked
    ...
}

But I think here the repeater is drawing QGCHoverButton instead.

Example: Return button stays hovered after cancelling slider vlcsnap-2020-10-06-09h18m19s675

DonLakeFlyer commented 3 years ago

Does this only happen on the ToolStrip buttons on the left? What about normal buttons like "Ok" buttons in dialog?

tzuriel-spearuav commented 3 years ago

With OK/Cancel buttons, the problem cannot be seen because a dialog would then be dismissed. I'll have to re-test this on a tablet with other toolbars. However, I think QGCHoverButton is only used in this left toolbar

DonLakeFlyer commented 3 years ago

Duh, yeah, that was stupid. Needs to be a place which does not dismiss. Here is one:

DonLakeFlyer commented 3 years ago

I"m trying to determine if this is a Qt bug or a QGC bug. In previous Qt versions there was a bug like this with the mouse hover.

tzuriel-spearuav commented 3 years ago

Just check with "Reset Default Branding Image" and indeed every other click on the button - the button stays with highlight color until you click anywhere else - on background or any other button

DonLakeFlyer commented 3 years ago

Hmm, that's not good news. Points more to a Qt bug. Hopefully there is some way I can work around.