[gimp] plug-ins: wrap the warning label to something smaller.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: wrap the warning label to something smaller.
- Date: Fri, 11 Mar 2022 17:02:15 +0000 (UTC)
commit e88dc5bed0398a0c6ff739a1abc067d5ab97e19e
Author: Jehan <jehan girinstud io>
Date: Fri Mar 11 17:58:50 2022 +0100
plug-ins: wrap the warning label to something smaller.
As raised on social networks, the big label grows the horizontal size of
the dialog. Make the label wrappable and give it a smaller wanted size
(otherwise, just making it wrappable is not enough and the dialog is
still too big when first appearing, because of how GTK handles such
widgets :-/).
plug-ins/file-tiff/file-tiff-save.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/plug-ins/file-tiff/file-tiff-save.c b/plug-ins/file-tiff/file-tiff-save.c
index dbb6eb224a..33166f4d58 100644
--- a/plug-ins/file-tiff/file-tiff-save.c
+++ b/plug-ins/file-tiff/file-tiff-save.c
@@ -1226,11 +1226,18 @@ save_dialog (GimpImage *image,
image);
if (classic_tiff_failed)
- gimp_procedure_dialog_get_label (GIMP_PROCEDURE_DIALOG (dialog),
- "big-tif-warning",
- "\xe2\x9a\xa0 Warning: maximum TIFF file size exceeded. "
- "Retry as BigTIFF or with a different compression algorithm, "
- "or cancel.");
+ {
+ GtkWidget *label;
+
+ label = gimp_procedure_dialog_get_label (GIMP_PROCEDURE_DIALOG (dialog),
+ "big-tif-warning",
+ "\xe2\x9a\xa0 Warning: maximum TIFF file size exceeded. "
+ "Retry as BigTIFF or with a different compression algorithm, "
+ "or cancel.");
+ gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+ gtk_label_set_line_wrap_mode (GTK_LABEL (label), PANGO_WRAP_WORD);
+ gtk_label_set_max_width_chars (GTK_LABEL (label), 60);
+ }
store =
gimp_int_store_new (_("None"), GIMP_COMPRESSION_NONE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]