summaryrefslogtreecommitdiff
path: root/silx/gui/plot/ColorBar.py
diff options
context:
space:
mode:
authorPicca Frédéric-Emmanuel <picca@synchrotron-soleil.fr>2019-12-23 13:45:09 +0100
committerPicca Frédéric-Emmanuel <picca@synchrotron-soleil.fr>2019-12-23 13:45:09 +0100
commit5d647cf9a6159afd2933da594b9c79ad93d3cd9b (patch)
tree2571025a602f68fc8933b01104dc712d41f84034 /silx/gui/plot/ColorBar.py
parent654a6ac93513c3cc1ef97cacd782ff674c6f4559 (diff)
New upstream version 0.12.0~b0+dfsg
Diffstat (limited to 'silx/gui/plot/ColorBar.py')
-rw-r--r--silx/gui/plot/ColorBar.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/silx/gui/plot/ColorBar.py b/silx/gui/plot/ColorBar.py
index 9798123..fd4fdf8 100644
--- a/silx/gui/plot/ColorBar.py
+++ b/silx/gui/plot/ColorBar.py
@@ -874,7 +874,7 @@ class _TickBar(qt.QWidget):
fm = qt.QFontMetrics(font)
width = 0
for tick in self.ticks:
- width = max(fm.width(form.format(tick)), width)
+ width = max(fm.boundingRect(form.format(tick)).width(), width)
# if the length of the string are too long we are moving to scientific
# display