summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid King <amigadave@amigadave.com>2022-04-25 13:42:41 +0100
committerDavid King <amigadave@amigadave.com>2022-04-26 08:17:59 +0100
commitf5a68cdb7f4b1c6e82c879d5afd7057959246893 (patch)
tree24f9ce34578eabd2238f7b7e82381f56ced55a9d /src
parentMerge branch 'hydrargyrum-master-patch-43242' into 'master' (diff)
downloadzenity-f5a68cdb7f4b1c6e82c879d5afd7057959246893.tar.gz
zenity-f5a68cdb7f4b1c6e82c879d5afd7057959246893.tar.bz2
zenity-f5a68cdb7f4b1c6e82c879d5afd7057959246893.zip
msg: Fix maximum width to 60 characters
Commit 3b64d05e8a1aae1581d2bec7288d80ac4699e1b1 mentioned that labels in message dialogs were set to a maximum width of 60 characters, with inspiration from GtkMessageDialog, but in fact a typo meant that they were set to both a width and maximum width of just 10 characters. This lead to text layout problems, which can be fixed by using the intended maximum of 60 characters. https://bugzilla.redhat.com/show_bug.cgi?id=2053530
Diffstat (limited to 'src')
-rw-r--r--src/msg.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/msg.c b/src/msg.c
index 496fe185..92651525 100644
--- a/src/msg.c
+++ b/src/msg.c
@@ -202,12 +202,10 @@ zenity_msg (ZenityData *data, ZenityMsgData *msg_data) {
if (data->width > -1)
gtk_widget_set_size_request (GTK_WIDGET (text), data->width, -1);
else if (!msg_data->ellipsize && !msg_data->no_wrap) {
- // the magic number 60 is picked from gtk+/gtk/ui/gtkmessagedialog.ui
- // however, 60 would increase the distance between the icon and the
- // text,
- // decreasing to 10 fix it.
+ /* The magic number 60 is taken from gtk+/gtk/ui/gtkmessagedialog.ui
+ with 10 as a minimum width. */
gtk_label_set_width_chars (GTK_LABEL (text), 10);
- gtk_label_set_max_width_chars (GTK_LABEL (text), 10);
+ gtk_label_set_max_width_chars (GTK_LABEL (text), 60);
}
if (data->modal)
bgstack15