From e26e4006d6510fc95232499b32b9e34ef554c530 Mon Sep 17 00:00:00 2001 From: Jordan Date: Sat, 4 Dec 2021 14:32:29 -0500 Subject: [PATCH] Move graph location --- ks_includes/{ => widgets}/graph.py | 6 ++---- panels/main_menu.py | 5 +---- 2 files changed, 3 insertions(+), 8 deletions(-) rename ks_includes/{ => widgets}/graph.py (96%) diff --git a/ks_includes/graph.py b/ks_includes/widgets/graph.py similarity index 96% rename from ks_includes/graph.py rename to ks_includes/widgets/graph.py index 11fb6603..6c85b84a 100644 --- a/ks_includes/graph.py +++ b/ks_includes/widgets/graph.py @@ -37,13 +37,13 @@ class HeaterGraph(Gtk.DrawingArea): if ev.type == Gdk.EventType.BUTTON_PRESS: x = ev.x y = ev.y + # logging.info("Drawing area clicked: %s %s" % (x, y)) if ev.get_source_device().get_source() == Gdk.InputSource.TOUCHSCREEN: if ev.touch.type == Gdk.EventType.TOUCH_BEGIN: x = ev.touch.x y = ev.touch.y - - logging.info("Drawing area clicked: %s %s" % (x, y)) + # logging.info("Drawing area clicked: %s %s" % (x, y)) def get_max_length(self): @@ -97,8 +97,6 @@ class HeaterGraph(Gtk.DrawingArea): if points_per_pixel > 3: points_per_pixel = 3 data_points = graph_width * points_per_pixel - logging.info("Max length: %s PPP: %s" % (self.max_length, points_per_pixel)) - logging.info("aa: %s %s" % (points_per_pixel, data_points)) max_num = math.ceil(self.get_max_num(data_points) * 1.1 / 10) * 10 d_width = 1 / points_per_pixel diff --git a/panels/main_menu.py b/panels/main_menu.py index 3b552723..869cc155 100644 --- a/panels/main_menu.py +++ b/panels/main_menu.py @@ -6,7 +6,7 @@ import logging gi.require_version("Gtk", "3.0") from gi.repository import Gtk, Gdk, GLib, Pango from panels.menu import MenuPanel -from ks_includes.graph import HeaterGraph +from ks_includes.widgets.graph import HeaterGraph def create_panel(*args): return MainPanel(*args) @@ -97,7 +97,6 @@ class MainPanel(MenuPanel): child = name.get_children()[0].get_children()[0].get_children()[1] child.set_ellipsize(True) child.set_ellipsize(Pango.EllipsizeMode.END) - logging.info("DClass %s %s" % (device, class_name)) temp = Gtk.Label("") @@ -229,9 +228,7 @@ class MainPanel(MenuPanel): def update_graph(self): self.labels['da'].queue_draw() alloc = self.labels['devices'].get_allocation() - logging.info("Devices height: %s" % alloc.height) alloc = self.labels['da'].get_allocation() - logging.info("DA height: %s" % alloc.height) return True def update_temp(self, device, temp, target):