Skip to content

Commit 26ca728

Browse files
Copilotfsmosca
andcommitted
Align review sidebar with board using expand_y instead of hardcoded heights
Agent-Logs-Url: https://github.com/fsmosca/Python-Easy-Chess-GUI/sessions/7a4b98ce-4757-4264-bb59-aad562589e91 Co-authored-by: fsmosca <22366935+fsmosca@users.noreply.github.com>
1 parent 165d2dc commit 26ca728

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

python_easy_chess_gui.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@
7070
REVIEW_MAX_DISPLAY_GAMES = 10000
7171
REVIEW_ANALYSIS_MULTIPV_LINES = 3
7272
REVIEW_ANALYSIS_PV_MOVES = 7
73-
REVIEW_MOVE_LIST_HEIGHT = 13
74-
REVIEW_ANALYSIS_BOX_HEIGHT = 5
73+
REVIEW_MOVE_LIST_HEIGHT = 11
74+
REVIEW_ANALYSIS_BOX_HEIGHT = 4
7575

7676

7777
platform = sys.platform
@@ -2921,10 +2921,9 @@ def build_review_layout(self, is_user_white=True):
29212921
font=('Consolas', 10), key='review_header_k',
29222922
disabled=True)],
29232923
[sg.Text('Move list', size=(16, 1), font=('Consolas', 10))],
2924-
# Tuned so the move list and analysis panel align with the board height.
2925-
[sg.Listbox(values=['Start position'], size=(52, REVIEW_MOVE_LIST_HEIGHT),
2926-
font=('Consolas', 10), key='review_move_list_k',
2927-
enable_events=True)],
2924+
[sg.Listbox(values=['Start position'], size=(52, REVIEW_MOVE_LIST_HEIGHT),
2925+
font=('Consolas', 10), key='review_move_list_k',
2926+
enable_events=True, expand_y=True)],
29282927
[sg.Text('Position 0/0', size=(20, 1), font=('Consolas', 10),
29292928
key='review_nav_k', relief='sunken')],
29302929
[sg.Text('Analysis stopped', size=(52, 1), font=('Consolas', 10),
@@ -2939,8 +2938,8 @@ def build_review_layout(self, is_user_white=True):
29392938

29402939
layout = [
29412940
[sg.Menu(menu_def_review, tearoff=False)],
2942-
[sg.Column(board_column, vertical_alignment='top'),
2943-
sg.Column(board_controls, vertical_alignment='top')],
2941+
[sg.Column(board_column, vertical_alignment='top'),
2942+
sg.Column(board_controls, vertical_alignment='top', expand_y=True)],
29442943
[sg.Button('First', size=(10, 1)),
29452944
sg.Button('Previous', size=(10, 1)),
29462945
sg.Button('Next', size=(10, 1)),

0 commit comments

Comments
 (0)