D15226: Check against QRect whether pointer is inside DecorationButton

Vlad Zagorodniy noreply at phabricator.kde.org
Sun Sep 2 22:45:47 BST 2018


zzag created this revision.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
zzag requested review of this revision.

REVISION SUMMARY
  If several buttons share an edge, i.e. spacing between decoration
  buttons is set to 0, and the pointer is on that edge, both buttons will
  be hovered.
  
  This happens because QRectF::contains returns true for points that are
  on "outer" edges, e.g.
  
    QRectF rect(0, 0, 10, 10);
    rect.contains(QPointF(10, 5)); // returns true

TEST PLAN
  Manually.

REPOSITORY
  R129 Window Decoration Library

BRANCH
  fix-hover-with-zero-spacing

REVISION DETAIL
  https://phabricator.kde.org/D15226

AFFECTED FILES
  src/decoration.cpp
  src/decorationbutton.cpp

To: zzag
Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180902/d1f54938/attachment-0001.html>


More information about the Plasma-devel mailing list