Added close on double click for a stat window
Just in case you don't have a mouse with middle button
This commit is contained in:
parent
4ada389f86
commit
fdc5a0a635
|
@ -583,7 +583,6 @@ class Hud:
|
||||||
px = int(x * self.table.width / 1000)
|
px = int(x * self.table.width / 1000)
|
||||||
py = int(y * self.table.height / 1000)
|
py = int(y * self.table.height / 1000)
|
||||||
if i in self.stat_windows:
|
if i in self.stat_windows:
|
||||||
self.stat_windows[i].relocate(x, y)
|
|
||||||
self.stat_windows[i].relocate(px, py)
|
self.stat_windows[i].relocate(px, py)
|
||||||
else:
|
else:
|
||||||
self.stat_windows[i] = Stat_Window(game = config.supported_games[self.poker_game],
|
self.stat_windows[i] = Stat_Window(game = config.supported_games[self.poker_game],
|
||||||
|
@ -686,6 +685,9 @@ class Stat_Window:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if event.button == 1: # left button event
|
if event.button == 1: # left button event
|
||||||
|
if event.type == gtk.gdk._2BUTTON_PRESS:
|
||||||
|
self.window.hide()
|
||||||
|
return True
|
||||||
# TODO: make position saving save sizes as well?
|
# TODO: make position saving save sizes as well?
|
||||||
if event.state & gtk.gdk.SHIFT_MASK:
|
if event.state & gtk.gdk.SHIFT_MASK:
|
||||||
self.window.begin_resize_drag(gtk.gdk.WINDOW_EDGE_SOUTH_EAST, event.button, int(event.x_root), int(event.y_root), event.time)
|
self.window.begin_resize_drag(gtk.gdk.WINDOW_EDGE_SOUTH_EAST, event.button, int(event.x_root), int(event.y_root), event.time)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user