@@ -52,7 +52,7 @@ def setup_window(
5252 """Set up the basic window properties and add the instructions text."""
5353 popup_window .root .title (title )
5454 popup_window .root .geometry (geometry )
55- instructions_text .config (borderwidth = 0 , relief = "flat" )
55+ instructions_text .config (borderwidth = 0 , relief = "flat" , highlightthickness = 0 )
5656 instructions_text .pack (padx = 6 , pady = 10 )
5757
5858 @staticmethod
@@ -79,6 +79,14 @@ def update_show_again() -> None:
7979 @staticmethod
8080 def finalize_window_setup (popup_window : BaseWindow , parent : tk .Tk , close_callback : Callable [[], None ]) -> None :
8181 """Finalize window setup: center, make topmost, disable parent, set close handler."""
82+ # Resize window height to ensure all widgets are fully visible
83+ # as some Linux Window managers like KDE, like to change font sizes and padding.
84+ # So we need to dynamically accommodate for that after placing the widgets
85+ popup_window .root .update_idletasks ()
86+ req_height = popup_window .root .winfo_reqheight ()
87+ req_width = popup_window .root .winfo_reqwidth ()
88+ popup_window .root .geometry (f"{ req_width } x{ req_height } " )
89+
8290 BaseWindow .center_window (popup_window .root , parent )
8391 popup_window .root .deiconify () # Show the window now that it's positioned
8492 popup_window .root .attributes ("-topmost" , True ) # noqa: FBT003
0 commit comments