gnucash stable: Force options text views to be at least 400px wide.

John Ralls jralls at code.gnucash.org
Sat Dec 13 16:11:05 EST 2025


Updated	 via  https://github.com/Gnucash/gnucash/commit/1133d599 (commit)
	from  https://github.com/Gnucash/gnucash/commit/3bda88c5 (commit)



commit 1133d599081a9cd311a2b8b00434f23be48bc97e
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Dec 13 13:08:08 2025 -0800

    Force options text views to be at least 400px wide.
    
    The GtkGrid being quite resistant to h/vexpand and word wrap causes the
    text view to be the greater of the longest word in its textbuffer or the
    width of the widest other element in the grid column if there is one.

diff --git a/gnucash/gnome-utils/gnc-option-gtk-ui.cpp b/gnucash/gnome-utils/gnc-option-gtk-ui.cpp
index 3db1cb7c80..4deec72d59 100644
--- a/gnucash/gnome-utils/gnc-option-gtk-ui.cpp
+++ b/gnucash/gnome-utils/gnc-option-gtk-ui.cpp
@@ -277,6 +277,7 @@ create_option_widget<GncOptionUIType::TEXT> (GncOption& option, GtkGrid *page_bo
     gtk_box_set_homogeneous (GTK_BOX (enclosing), FALSE);
     auto widget = gtk_text_view_new();
     gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(widget), GTK_WRAP_WORD);
+    gtk_widget_set_size_request(widget, 400, -1);
     gtk_text_view_set_editable(GTK_TEXT_VIEW(widget), TRUE);
     gtk_text_view_set_accepts_tab (GTK_TEXT_VIEW(widget), FALSE);
 



Summary of changes:
 gnucash/gnome-utils/gnc-option-gtk-ui.cpp | 1 +
 1 file changed, 1 insertion(+)



More information about the gnucash-changes mailing list