diff --git a/ks_includes/widgets/graph.py b/ks_includes/widgets/graph.py index e4c7be67..20b44ba6 100644 --- a/ks_includes/widgets/graph.py +++ b/ks_includes/widgets/graph.py @@ -69,8 +69,8 @@ class HeaterGraph(Gtk.DrawingArea): g_width_start = 30 g_width = width - 15 - g_height_start = 15 - g_height = height - 30 + g_height_start = 10 + g_height = height - 20 ctx.set_source_rgb(.5, .5, .5) ctx.set_line_width(1) @@ -144,14 +144,9 @@ class HeaterGraph(Gtk.DrawingArea): ctx.fill() def graph_lines(self, ctx, gsize, max_num): - if max_num <= 30: - nscale = 5 - elif max_num <= 60: - nscale = 10 - elif max_num <= 130: - nscale = 25 - else: - nscale = 50 + nscale = 5 + while (max_num / nscale) > 5: + nscale += 5 # nscale = math.floor((max_num / 10) / 4) * 10 r = int(max_num/nscale) + 1 hscale = (gsize[1][1] - gsize[0][1]) / (r * nscale) diff --git a/panels/printer_select.py b/panels/printer_select.py index e9fac193..6bb950c6 100644 --- a/panels/printer_select.py +++ b/panels/printer_select.py @@ -21,7 +21,7 @@ class PrinterSelect(ScreenPanel): printers = self._config.get_printers() - grid = self._gtk.HomogeneousGrid() + grid = self._gtk.HomogeneousGrid() self.content.add(grid) length = len(printers)