Skip to content

Commit

Permalink
Allow resizing of log and comments windows
Browse files Browse the repository at this point in the history
  • Loading branch information
joeraz committed Jan 6, 2025
1 parent 4c031b9 commit 5d1ed62
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pysollib/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,8 @@ def mEditGameComment(self, *args):
'id': game.getGameNumber(format=1)}
cc = _("Comments for %(game)s %(id)s:\n\n") % kw
c = game.gsaveinfo.comment or cc
d = EditTextDialog(game.top, _("Comments for %(id)s") % kw, text=c)
d = EditTextDialog(game.top, _("Comments for %(id)s") % kw, text=c,
resizable=True)
if d.status == 0 and d.button == 0:
text = d.text
if text.strip() == cc.strip():
Expand Down Expand Up @@ -644,13 +645,15 @@ def mPlayerStats(self, *args, **kw):
elif mode == 103:
header = (_("%(app)s Demo Full log") if demo
else _("Full log for %(player)s")) % transkw
d = FullLog_StatsDialog(self.top, header, self.app, player)
d = FullLog_StatsDialog(self.top, header, self.app, player,
resizable=True)
gameid = d.selected_game
gamenum = d.selected_game_num
elif mode == 104:
header = (_("%(app)s Demo Session log") if demo
else _("Session log for %(player)s")) % transkw
d = SessionLog_StatsDialog(self.top, header, self.app, player)
d = SessionLog_StatsDialog(self.top, header, self.app, player,
resizable=True)
gameid = d.selected_game
gamenum = d.selected_game_num
elif mode == 105:
Expand Down
2 changes: 2 additions & 0 deletions pysollib/tile/tkstats.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,8 @@ def __init__(self, parent, title, app, player, **kw):
title = _('Log')
MfxDialog.__init__(self, parent, title, kw.resizable, kw.default)

self.top.wm_minsize(400, 200)

self.selected_game = None
self.selected_game_num = None

Expand Down
2 changes: 2 additions & 0 deletions pysollib/ui/tktile/edittextdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ def __init__(self, parent, title, text, **kw):
self, parent, title, kw.resizable, kw.default)
top_frame, bottom_frame = self.createFrames(kw)
self.createBitmaps(top_frame, kw)
self.top.wm_minsize(300, 150)

#
self.text_w = tkinter.Text(top_frame, bd=1, relief="sunken",
wrap="word", width=64, height=16)
Expand Down

0 comments on commit 5d1ed62

Please sign in to comment.