[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [plasma-framework] src/plasmaquick: off by one in positioning
From:       Marco Martin <notmart () gmail ! com>
Date:       2014-06-13 11:55:39
Message-ID: E1WvQ55-00037P-6I () scm ! kde ! org
[Download RAW message or body]

Git commit c44c3b30e250d35650cff68794b1737d3f2d34eb by Marco Martin.
Committed on 13/06/2014 at 11:54.
Pushed by mart into branch 'master'.

off by one in positioning

position the dialog at exactly the right-most edge of the screen
it was off by exactly one pixel

M  +2    -2    src/plasmaquick/dialog.cpp

http://commits.kde.org/plasma-framework/c44c3b30e250d35650cff68794b1737d3f2d34eb

diff --git a/src/plasmaquick/dialog.cpp b/src/plasmaquick/dialog.cpp
index df9bcc8..1d09071 100644
--- a/src/plasmaquick/dialog.cpp
+++ b/src/plasmaquick/dialog.cpp
@@ -682,7 +682,7 @@ QPoint Dialog::popupPosition(QQuickItem *item, const QSize &size)
     if (dialogPos.x() + size.width() > avail.right()) {
         // popup hits rhs
         if (d->location == Plasma::Types::TopEdge || d->location == Plasma::Types::BottomEdge) {
-            dialogPos.setX(avail.right() - size.width());
+            dialogPos.setX(avail.right() - size.width() + 1);
         } else {
             dialogPos.setX(leftPoint.x());
         }
@@ -701,7 +701,7 @@ QPoint Dialog::popupPosition(QQuickItem *item, const QSize &size)
         if (d->location == Plasma::Types::TopEdge || d->location == Plasma::Types::BottomEdge) {
             dialogPos.setY(topPoint.y());
         } else {
-            dialogPos.setY(avail.bottom() - size.height());
+            dialogPos.setY(avail.bottom() - size.height() + 1);
         }
     }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic