gnucash maint: Bug 798415 - Due Bills Reminder Dialog - Right align 'amount'

Robert Fewell bobit at code.gnucash.org
Sun Jan 9 07:13:26 EST 2022


Updated	 via  https://github.com/Gnucash/gnucash/commit/a41a2959 (commit)
	from  https://github.com/Gnucash/gnucash/commit/4a91e193 (commit)



commit a41a2959323df321c8db83c60b3522e5ede35544
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sun Jan 9 12:07:32 2022 +0000

    Bug 798415 - Due Bills Reminder Dialog - Right align 'amount'
    
    When Gnucash is run in Hebrew which is a right-to-left language, the
    monetary columns on the Bills/Invoices due reminder dialog are left
    aligned but should be right aligned. This is down to GTK transposing
    the column alignment when using an RTL language so detect this and
    align to the left before GTK transposes it.

diff --git a/gnucash/gnome-utils/gnc-query-view.c b/gnucash/gnome-utils/gnc-query-view.c
index b61bee948..03c3ac9c6 100644
--- a/gnucash/gnome-utils/gnc-query-view.c
+++ b/gnucash/gnome-utils/gnc-query-view.c
@@ -324,7 +324,12 @@ gnc_query_view_init_view (GNCQueryView *qview)
         if (((GNCSearchParam *) param)->justify == GTK_JUSTIFY_CENTER)
             algn = 0.5;
         else if (((GNCSearchParam *) param)->justify == GTK_JUSTIFY_RIGHT)
-            algn = 1.0;
+        {
+            /* GTK_JUSTIFY_RIGHT is only used for monetary values so right align
+             * the column title and data for both ltr and rtl */
+            if (gtk_widget_get_direction (GTK_WIDGET(view)) != GTK_TEXT_DIR_RTL)
+                algn = 1.0;
+        }
 
         /* Set the column title alignment to that of the column */
         gtk_tree_view_column_set_alignment (col, algn);



Summary of changes:
 gnucash/gnome-utils/gnc-query-view.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)



More information about the gnucash-changes mailing list