diff options
Diffstat (limited to 'silx/gui/plot/Profile.py')
-rw-r--r-- | silx/gui/plot/Profile.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/silx/gui/plot/Profile.py b/silx/gui/plot/Profile.py index 4a74fa7..f61412d 100644 --- a/silx/gui/plot/Profile.py +++ b/silx/gui/plot/Profile.py @@ -660,23 +660,23 @@ class ProfileToolBar(qt.QToolBar): winGeom = self.window().frameGeometry() qapp = qt.QApplication.instance() screenGeom = qapp.desktop().availableGeometry(self) - spaceOnLeftSide = winGeom.left() spaceOnRightSide = screenGeom.width() - winGeom.right() profileWindowWidth = profileMainWindow.frameGeometry().width() - if (profileWindowWidth < spaceOnRightSide or - spaceOnRightSide > spaceOnLeftSide): + if (profileWindowWidth < spaceOnRightSide): # Place profile on the right profileMainWindow.move(winGeom.right(), winGeom.top()) - else: - # Not enough place on the right, place profile on the left + elif(profileWindowWidth < spaceOnLeftSide): + # Place profile on the left profileMainWindow.move( - max(0, winGeom.left() - profileWindowWidth), winGeom.top()) + max(0, winGeom.left() - profileWindowWidth), winGeom.top()) profileMainWindow.show() + profileMainWindow.raise_() else: self.getProfilePlot().show() + self.getProfilePlot().raise_() def hideProfileWindow(self): """Hide profile window. |