瀏覽代碼

ctkPopupWidget was having a 1px overlap with the base widget

Julien Finet 13 年之前
父節點
當前提交
0be9fd1819
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      Libs/Widgets/ctkBasePopupWidget.cpp

+ 4 - 4
Libs/Widgets/ctkBasePopupWidget.cpp

@@ -369,14 +369,14 @@ QRect ctkBasePopupWidgetPrivate::desiredOpenGeometry(QRect baseGeometry)const
       }
     else
       {
-      geometry.moveRight(topLeft.x());
+      geometry.moveRight(topLeft.x() - 1);
       }
     }
   else if (this->Alignment & Qt::AlignRight)
     {
     if (this->HorizontalDirection == Qt::LeftToRight)
       {
-      geometry.moveLeft(bottomRight.x());
+      geometry.moveLeft(bottomRight.x() + 1);
       }
     else
       {
@@ -400,14 +400,14 @@ QRect ctkBasePopupWidgetPrivate::desiredOpenGeometry(QRect baseGeometry)const
       }
     else
       {
-      geometry.moveBottom(topLeft.y());
+      geometry.moveBottom(topLeft.y() - 1);
       }
     }
   else if (this->Alignment & Qt::AlignBottom)
     {
     if (this->VerticalDirection == ctkBasePopupWidget::TopToBottom)
       {
-      geometry.moveTop(bottomRight.y());
+      geometry.moveTop(bottomRight.y() + 1);
       }
     else
       {