Преглед изворни кода

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
       {