[MPlayer-cvslog] r38278 - trunk/gui/dialog/dialog.c

ib subversion at mplayerhq.hu
Fri Feb 26 17:29:26 EET 2021


Author: ib
Date: Fri Feb 26 17:29:26 2021
New Revision: 38278

Log:
Improve the readability of message boxes with long texts.

Align the text left and set a box width.

Modified:
   trunk/gui/dialog/dialog.c

Modified: trunk/gui/dialog/dialog.c
==============================================================================
--- trunk/gui/dialog/dialog.c	Fri Feb 26 17:25:20 2021	(r38277)
+++ trunk/gui/dialog/dialog.c	Fri Feb 26 17:29:26 2021	(r38278)
@@ -184,11 +184,11 @@ void gtkMessageBox(int type, const gchar
     ShowMessageBox(str);
     gtk_label_set_text(GTK_LABEL(gtkMessageBoxText), str);
 
-    /* enable linewrapping by alex */
-// GTK_LABEL(gtkMessageBoxText)->max_width = 80;
-    if (strlen(str) > 80)
+    if (strlen(str) > 80) {
         gtk_label_set_line_wrap(GTK_LABEL(gtkMessageBoxText), TRUE);
-    else
+        gtk_label_set_justify(GTK_LABEL(gtkMessageBoxText), GTK_JUSTIFY_LEFT);
+        gtk_widget_set_size_request(gtkMessageBoxText, 415, -1);
+    } else
         gtk_label_set_line_wrap(GTK_LABEL(gtkMessageBoxText), FALSE);
 
     switch (type) {


More information about the MPlayer-cvslog mailing list