Move graph location
This commit is contained in:
parent
fdf81ecf06
commit
e26e4006d6
@ -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
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user