D13192: Implement a triangle filter for mouse events on the Kickoff tabbar

Vlad Zagorodniy noreply at phabricator.kde.org
Tue May 29 13:17:53 UTC 2018


zzag added inline comments.

INLINE COMMENTS

> FullRepresentation.qml:439
> +            // pointer motion vector.
> +            if ((Math.abs(dx) + Math.abs(dy)) > Qt.styleHints.startDragDistance) {
> +                if (tabBar.currentTab != button) {

I believe it's possible to reduce indentation. E.g.

  if ((Math.abs(dx) + Math.abs(dy)) <= Qt.styleHints.startDragDistance) {
      return;
  }
  
  if (tabBar.currentTab == button) {
      oldPos = Qt.point(mouse.x, mouse.y);
      return;
  }
  
  var tabBarPos = mapToItem(tabBar, oldPos.x, oldPos.y);
  // ...

REPOSITORY
  R119 Plasma Desktop

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

To: hein, ngraham, davidedmundson, rkflx, cfeck
Cc: zzag, 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/20180529/b51acce6/attachment-0001.html>


More information about the Plasma-devel mailing list