diff --git a/examples/shots/xstackbar.png b/examples/shots/xstackbar.png index 5e963f7..893f3a5 100644 Binary files a/examples/shots/xstackbar.png and b/examples/shots/xstackbar.png differ diff --git a/lightgui/xframe/monitor.py b/lightgui/xframe/monitor.py index 4c9ad9f..06c605b 100644 --- a/lightgui/xframe/monitor.py +++ b/lightgui/xframe/monitor.py @@ -1090,21 +1090,15 @@ class MonitorWidget(Widget): # Legend: color chip + "label 45%" flowing left to right, # wrapping to a second row when the width runs out. lx, ly = 6, bar_y + bar_h + 15 - line1 = True for label, value, color in segments: text = "%s %.0f%%" % (label, 100.0 * value / total) tw = _text_width(cr, self, text, size=10) + 16 if lx + tw > self.width - 4 and lx > 6: lx = 6 ly += 14 - line1 = False _box(cr, lx, ly - 8, 8, 8, color, color) _wtext(cr, self, text, lx + 12, ly, size=10, rgb=_TEXT) lx += tw - if line1: - _wtext(cr, self, "total %s" % _fmt_bytes(total), - self.width - 6, bar_y + bar_h + 15, size=10, - rgb=_DIM, align="right") def _draw_vertical_bar(self, cr): frac = _range_frac(self)