summaryrefslogtreecommitdiff
path: root/silx/gui/plot/ImageView.py
diff options
context:
space:
mode:
authorPicca Frédéric-Emmanuel <picca@debian.org>2017-11-25 16:55:20 +0100
committerPicca Frédéric-Emmanuel <picca@debian.org>2017-11-25 16:55:20 +0100
commite19c96eff0c310c06c4f268c8b80cb33bd08996f (patch)
treef2b4a365ed899be04766f3937bcc2d58d22be065 /silx/gui/plot/ImageView.py
parentbfa4dba15485b4192f8bbe13345e9658c97ecf76 (diff)
New upstream version 0.6.1+dfsg
Diffstat (limited to 'silx/gui/plot/ImageView.py')
-rw-r--r--silx/gui/plot/ImageView.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/silx/gui/plot/ImageView.py b/silx/gui/plot/ImageView.py
index 803a2fc..46e56e6 100644
--- a/silx/gui/plot/ImageView.py
+++ b/silx/gui/plot/ImageView.py
@@ -311,16 +311,13 @@ class ImageView(PlotWindow):
def _initWidgets(self, backend):
"""Set-up layout and plots."""
- # Monkey-patch for histogram size
- # alternative: create a layout that does not use widget size hints
- def sizeHint():
- return qt.QSize(self.HISTOGRAMS_HEIGHT, self.HISTOGRAMS_HEIGHT)
-
self._histoHPlot = PlotWidget(backend=backend)
+ self._histoHPlot.getWidgetHandle().setMinimumHeight(
+ self.HISTOGRAMS_HEIGHT)
+ self._histoHPlot.getWidgetHandle().setMaximumHeight(
+ self.HISTOGRAMS_HEIGHT)
self._histoHPlot.setInteractiveMode('zoom')
self._histoHPlot.sigPlotSignal.connect(self._histoHPlotCB)
- self._histoHPlot.getWidgetHandle().sizeHint = sizeHint
- self._histoHPlot.getWidgetHandle().minimumSizeHint = sizeHint
self.setPanWithArrowKeys(True)
@@ -330,10 +327,12 @@ class ImageView(PlotWindow):
self.sigActiveImageChanged.connect(self._activeImageChangedSlot)
self._histoVPlot = PlotWidget(backend=backend)
+ self._histoVPlot.getWidgetHandle().setMinimumWidth(
+ self.HISTOGRAMS_HEIGHT)
+ self._histoVPlot.getWidgetHandle().setMaximumWidth(
+ self.HISTOGRAMS_HEIGHT)
self._histoVPlot.setInteractiveMode('zoom')
self._histoVPlot.sigPlotSignal.connect(self._histoVPlotCB)
- self._histoVPlot.getWidgetHandle().sizeHint = sizeHint
- self._histoVPlot.getWidgetHandle().minimumSizeHint = sizeHint
self._radarView = RadarView()
self._radarView.visibleRectDragged.connect(self._radarViewCB)