Mauszeiger ausschaltbar bei Vollbildanzeige z.B. für Touch
This commit is contained in:
		
							parent
							
								
									013cd5f5e9
								
							
						
					
					
						commit
						e94f6df408
					
				|  | @ -5,6 +5,7 @@ deviceid = 100 | |||
| simulation = on | ||||
| histpath = ~/.local/lib/obp60 | ||||
| guistyle = fullscreen | ||||
| mouseptr = off | ||||
| 
 | ||||
| [bme280] | ||||
| enabled = true | ||||
|  |  | |||
							
								
								
									
										7
									
								
								obp60.py
								
								
								
								
							
							
						
						
									
										7
									
								
								obp60.py
								
								
								
								
							|  | @ -285,6 +285,7 @@ class Frontend(Gtk.Window): | |||
|         self.owndev = device | ||||
|         self.boatdata = boatdata | ||||
|         self._fullscreen = cfg['guistyle'] == 'fullscreen' | ||||
|         self._mouseptr = cfg['mouseptr'] | ||||
| 
 | ||||
|         self.connect("destroy", self.on_destroy) | ||||
| 
 | ||||
|  | @ -351,6 +352,11 @@ class Frontend(Gtk.Window): | |||
|          | ||||
|         print("Wische von 2 nach 1 für Programmende") | ||||
| 
 | ||||
|     def on_realize(self, widget): | ||||
|         if self._fullscreen and not self._mouseptr: | ||||
|             # Mauszeiger ggf. ausschalten | ||||
|             self.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.BLANK_CURSOR)) | ||||
| 
 | ||||
|     def run(self): | ||||
|         GLib.timeout_add_seconds(2, self.on_timer) | ||||
|         self.show_all() | ||||
|  | @ -586,6 +592,7 @@ if __name__ == "__main__": | |||
|     cfg['simulation'] = config.getboolean('system', 'simulation') | ||||
|     cfg['histpath'] = os.path.expanduser(config.get('system', 'histpath')) | ||||
|     cfg['guistyle'] = config.get('system', 'guistyle') | ||||
|     cfg['mouseptr'] = config.getboolean('system', 'mouseptr') | ||||
|     print("Setting GUI style to '{}'".format(cfg['guistyle'])) | ||||
| 
 | ||||
|     cfg['gps'] = config.getboolean('gps', 'enabled') | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue