Hi,

it seems to me that the code in promptdialog.inc didn't center the dialog text as it should. How about the attached patch? Looks quite a bit better for me, though I've only tested on Windows. As soon as we get rid of the glyphs in the buttons, the dialogs will be quite ok..

Regards,

Ere

Index: lcl/include/promptdialog.inc
===================================================================
--- lcl/include/promptdialog.inc        (revision 8252)
+++ lcl/include/promptdialog.inc        (working copy)
@@ -330,15 +330,15 @@
   If FBitmap <> nil then
     cMinLeft := cBitmapX + max(32,FBitmap.Width) + cLabelSpacing
   else
-    cMinLeft := 0;
+    cMinLeft := cLabelSpacing;
 
-  reqWidth := cMinLeft + TextBox.Right;
+  reqWidth := 2 * cMinLeft + TextBox.Right;
   if reqWidth < reqBtnWidth then
     reqWidth:= reqBtnWidth;
 
   // center the text
-  OffsetRect(TextBox, cLabelSpacing + cMinLeft
-                      +((reqWidth - cMinLeft - TextBox.Right) div 2),
+  OffsetRect(TextBox, cLabelSpacing
+                      +((reqWidth - TextBox.Right) div 2),
                       cLabelSpacing);
 
   // calculate the height of the text+icon

Reply via email to