mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
try fix save games geometry.
See https://github.com/shlomif/PySolFC/issues/84 .
This commit is contained in:
parent
80252696c8
commit
48e24c2021
1 changed files with 4 additions and 4 deletions
|
@ -202,13 +202,13 @@ class Game(object):
|
||||||
# update display properties
|
# update display properties
|
||||||
self.canvas.busy = True
|
self.canvas.busy = True
|
||||||
# geometry
|
# geometry
|
||||||
mycond = (not USE_PIL and self.app.opt.save_games_geometry and
|
mycond = (self.app.opt.save_games_geometry and
|
||||||
self.id in self.app.opt.games_geometry)
|
self.id in self.app.opt.games_geometry)
|
||||||
if mycond:
|
if mycond:
|
||||||
# restore game geometry
|
# restore game geometry
|
||||||
w, h = self.app.opt.games_geometry[self.id]
|
w, h = self.app.opt.games_geometry[self.id]
|
||||||
self.canvas.config(width=w, height=h)
|
self.canvas.config(width=w, height=h)
|
||||||
if USE_PIL:
|
if True and USE_PIL:
|
||||||
if self.app.opt.auto_scale:
|
if self.app.opt.auto_scale:
|
||||||
w, h = self.app.opt.game_geometry
|
w, h = self.app.opt.game_geometry
|
||||||
self.canvas.setInitialSize(w, h, margins=False,
|
self.canvas.setInitialSize(w, h, margins=False,
|
||||||
|
@ -219,7 +219,7 @@ class Game(object):
|
||||||
else:
|
else:
|
||||||
w = int(round(self.width * self.app.opt.scale_x))
|
w = int(round(self.width * self.app.opt.scale_x))
|
||||||
h = int(round(self.height * self.app.opt.scale_y))
|
h = int(round(self.height * self.app.opt.scale_y))
|
||||||
self.canvas.setInitialSize(w, h)
|
# self.canvas.setInitialSize(w, h)
|
||||||
self.top.wm_geometry("") # cancel user-specified geometry
|
self.top.wm_geometry("") # cancel user-specified geometry
|
||||||
# preserve texts positions
|
# preserve texts positions
|
||||||
for t in ('info', 'help', 'misc', 'score', 'base_rank'):
|
for t in ('info', 'help', 'misc', 'score', 'base_rank'):
|
||||||
|
@ -1124,7 +1124,7 @@ class Game(object):
|
||||||
|
|
||||||
def _configureHandler(self, event=None):
|
def _configureHandler(self, event=None):
|
||||||
# print 'configureHandler'
|
# print 'configureHandler'
|
||||||
if not USE_PIL:
|
if False: # if not USE_PIL:
|
||||||
return
|
return
|
||||||
if not self.app:
|
if not self.app:
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue