Reveal controls only with touch or pen

This commit is contained in:
Rafał Dzięgiel
2021-02-18 19:02:34 +01:00
parent 834a690903
commit 7680b85ea9

View File

@@ -742,8 +742,18 @@ class ClapperWidget extends Gtk.Grid
_onReleased(gesture, nPress, x, y) _onReleased(gesture, nPress, x, y)
{ {
/* Reveal if touch was not a swipe or was already revealed */ /* Reveal if touch was not a swipe or was already revealed */
if(!this.isSwipePerformed || this.revealerBottom.child_revealed) if(!this.isSwipePerformed || this.revealerBottom.child_revealed) {
this.revealControls(); const { source } = gesture.get_device();
switch(source) {
case Gdk.InputSource.PEN:
case Gdk.InputSource.TOUCHSCREEN:
this.revealControls();
break;
default:
break;
}
}
} }
_onDragUpdate(gesture, offsetX, offsetY) _onDragUpdate(gesture, offsetX, offsetY)