Mausklick und Uhr fixes
This commit is contained in:
		
							parent
							
								
									2992fed56b
								
							
						
					
					
						commit
						0114f25689
					
				
							
								
								
									
										6
									
								
								obp60.py
								
								
								
								
							
							
						
						
									
										6
									
								
								obp60.py
								
								
								
								
							|  | @ -438,14 +438,14 @@ class Frontend(Gtk.Window): | |||
|         # TODO | ||||
|         print("release") | ||||
|         if self.button_round: | ||||
|             if (event.x < self.button[1][0] - self.radius or event.x > self.button[6][0] + self.radius): | ||||
|             if (event.x < self.button[1][0] - self.button_radius or event.x > self.button[6][0] + self.button_radius): | ||||
|                return True | ||||
|             if (event.y < self.button[1][1] - self.radius or event.y > self.button[3][1] + self.radius): | ||||
|             if (event.y < self.button[1][1] - self.button_radius or event.y > self.button[3][1] + self.button_radius): | ||||
|                return True | ||||
|             selected = 0 | ||||
|             for b, v in self.button.items(): | ||||
|                 diff = math.sqrt((event.x - v[0])**2 + (event.y - v[1])**2) | ||||
|                 if diff < self.radius: | ||||
|                 if diff < self.button_radius: | ||||
|                     selected = b | ||||
|                     break | ||||
|         else: | ||||
|  |  | |||
|  | @ -68,7 +68,7 @@ class Clock(Page): | |||
|         # mitgerechnet wird. Dafür muß ggf. der Zeichensatz angepaßt werden. | ||||
|         # self.draw_text_center(ctx, 200, 150, ts.strftime("%H:%M:%S")) | ||||
|         ctx.move_to(-30, 200) | ||||
|         ctx.show_text(ts.strftime("%H:%M:%S")) | ||||
|         ctx.show_text(ts.strftime("%-H:%M:%S")) | ||||
| 
 | ||||
|     def draw_timer(self, ctx): | ||||
|         ts = datetime.now() | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue