Added ViewBox.setBackgroundColor()
This commit is contained in:
parent
283a568693
commit
9677b1492b
@ -35,6 +35,7 @@ pyqtgraph-0.9.9 [unreleased]
|
|||||||
when plots do not fit inside the widget.
|
when plots do not fit inside the widget.
|
||||||
- Added BarGraphItem.shape() to allow better mouse interaction
|
- Added BarGraphItem.shape() to allow better mouse interaction
|
||||||
- Added MeshData.cylinder
|
- Added MeshData.cylinder
|
||||||
|
- Added ViewBox.setBackgroundColor()
|
||||||
|
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
- PlotCurveItem now has correct clicking behavior--clicks within a few px
|
- PlotCurveItem now has correct clicking behavior--clicks within a few px
|
||||||
|
@ -285,6 +285,15 @@ class ViewBox(GraphicsWidget):
|
|||||||
self.updateViewRange()
|
self.updateViewRange()
|
||||||
self.sigStateChanged.emit(self)
|
self.sigStateChanged.emit(self)
|
||||||
|
|
||||||
|
def setBackgroundColor(self, color):
|
||||||
|
"""
|
||||||
|
Set the background color of the ViewBox.
|
||||||
|
|
||||||
|
If color is None, then no background will be drawn.
|
||||||
|
"""
|
||||||
|
self.background.setVisible(color is not None)
|
||||||
|
self.state['background'] = color
|
||||||
|
self.updateBackground()
|
||||||
|
|
||||||
def setMouseMode(self, mode):
|
def setMouseMode(self, mode):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user