From 9055de610236277edd753479d8ab479abe6c5477 Mon Sep 17 00:00:00 2001 From: SantaSpeen Date: Fri, 21 Mar 2025 17:13:46 +0300 Subject: [PATCH] [!] if header > x then x = len(header) --- boxes/CTkMessageBox.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/boxes/CTkMessageBox.py b/boxes/CTkMessageBox.py index c33f999..2e49b2e 100644 --- a/boxes/CTkMessageBox.py +++ b/boxes/CTkMessageBox.py @@ -85,6 +85,8 @@ class CTkMessageBox(ctk.CTkToplevel): _x += 20 # Add 20 pixels for padding on the left and right _x += 10 # Add 10 pixels for padding on the left and right + _x = max(_x, (len(self.header_map[mode]) * 16) + 25 + 20) # Set width to the length of the title if it's longer than the message + self._text = "\n".join(_text_slt) _y = 0