fix cell padding hit-test: use mapFrom instead of broken mapToGlobal on Wayland
This commit is contained in:
parent
9c42b4fdd7
commit
b541f64374
@ -571,8 +571,7 @@ class ThumbnailGrid(QScrollArea):
|
|||||||
# Empty space: flow layout, viewport, or cell padding (missed pixmap)
|
# Empty space: flow layout, viewport, or cell padding (missed pixmap)
|
||||||
is_empty = child is self.widget() or child is self.viewport()
|
is_empty = child is self.widget() or child is self.viewport()
|
||||||
if not is_empty and isinstance(child, ThumbnailWidget):
|
if not is_empty and isinstance(child, ThumbnailWidget):
|
||||||
global_pos = self.mapToGlobal(event.position().toPoint())
|
local = child.mapFrom(self, event.position().toPoint())
|
||||||
local = child.mapFromGlobal(global_pos)
|
|
||||||
if not child._hit_pixmap(local):
|
if not child._hit_pixmap(local):
|
||||||
is_empty = True
|
is_empty = True
|
||||||
if is_empty:
|
if is_empty:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user