From c232e37b9b44910c5c819fdd5ce96b51f6699898 Mon Sep 17 00:00:00 2001 From: Alfredo Monclus Date: Wed, 12 Jun 2024 13:27:53 -0300 Subject: [PATCH] bedmap: dinamically determine if the number fits --- ks_includes/widgets/bedmap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ks_includes/widgets/bedmap.py b/ks_includes/widgets/bedmap.py index e910d9c0..1da45561 100644 --- a/ks_includes/widgets/bedmap.py +++ b/ks_includes/widgets/bedmap.py @@ -155,9 +155,9 @@ class BedMap(Gtk.DrawingArea): ctx.close_path() ctx.fill() ctx.stroke() - if rows > 16 or columns > 8: - continue # Numbers + if gwidth / columns < self.font_size * 3: + continue ctx.set_source_rgb(0, 0, 0) if column > 0: ctx.move_to((lx + rx) / 2 - self.font_size, (ty + by + self.font_size) / 2)