Browse Source

fixed canvas resize issue

subDesTagesMitExtraKaese 4 years ago
parent
commit
307f65ccc9
1 changed files with 2 additions and 4 deletions
  1. 2 4
      raspberry-pi/gui/graph.py

+ 2 - 4
raspberry-pi/gui/graph.py

@@ -26,11 +26,9 @@ class Graph(tk.Canvas):
 
 
   def on_resize(self,event):
-    # determine the ratio of old width/height to new width/height
-    self.width = max(400, event.width-4)
-    self.height = max(400, event.height-4)
+    self.width = max(100, event.width-4)
+    self.height = max(100, event.height-4)
     # resize the canvas 
-    self.config(width=self.width, height=self.height)
     self.canvas = self.canvas.resize((self.width, self.height))
     self.drawBackground()
     self.canvas = Image.blend(self.canvas, self.bg, 0.1)