qt5base-lts/tests/auto/gui/kernel/qmouseevent_modal
Volker Hilsheimer 6e1d70ae12 QPushButton: only trigger button when click occurs within the bevel rect
On the mac, the push button's bevel doesn't cover the entire widget
rectangle, but is smaller to leave space for focus frame, shadow, and
in general to meet style guidelines. Without this change, a click
anywhere inside the widget would activate the button.

QAbstractButton::hitButton can be reimplemented to limit the area in
which the button is triggered. However, getting the rectangle also
requires an addition to QStyle, so that we can query
QStyle::subElementRect for the actual area the button's bevel covers.

As a side effect, tests that use QPushButton and assume that it
responds to clicks at position 0,0 have to be fixed so that they
don't fail on mac.

Change-Id: I01b60a763bccf39090aee5b2369af300f922d226
Fixes: QTBUG-81452
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-01-28 22:26:26 +01:00
..
.gitignore Moved gui autotests into new directory structure 2011-09-01 10:59:49 +02:00
qmouseevent_modal.pro QtGui tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-27 03:54:42 +01:00
tst_qmouseevent_modal.cpp QPushButton: only trigger button when click occurs within the bevel rect 2020-01-28 22:26:26 +01:00