From 2eae0076054d9f3c1afa1e8434b3b9bdd54b6089 Mon Sep 17 00:00:00 2001 From: Orsiris de Jong Date: Fri, 20 Feb 2026 07:21:50 +0100 Subject: [PATCH] Fix button size calculation in PopupButton for foreign langs --- FreeSimpleGUI/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/FreeSimpleGUI/__init__.py b/FreeSimpleGUI/__init__.py index 5925f37c..b2996487 100644 --- a/FreeSimpleGUI/__init__.py +++ b/FreeSimpleGUI/__init__.py @@ -9690,7 +9690,7 @@ def popup( [ PopupButton( custom_text, - size=(len(custom_text), 1), + size=(len(custom_text)+1, 1), button_color=button_color, focus=True, bind_return_key=True, @@ -9702,7 +9702,7 @@ def popup( [ PopupButton( custom_text[0], - size=(len(custom_text[0]), 1), + size=(len(custom_text[0])+1, 1), button_color=button_color, focus=True, bind_return_key=True, @@ -9717,9 +9717,9 @@ def popup( button_color=button_color, focus=True, bind_return_key=True, - size=(len(custom_text[0]), 1), + size=(len(custom_text[0])+1, 1), ), - PopupButton(custom_text[1], button_color=button_color, size=(len(custom_text[1]), 1)), + PopupButton(custom_text[1], button_color=button_color, size=(len(custom_text[1])+1, 1)), ] ] elif button_type == POPUP_BUTTONS_YES_NO: