From a41a2959323df321c8db83c60b3522e5ede35544 Mon Sep 17 00:00:00 2001 From: Robert Fewell <14uBobIT@gmail.com> Date: Sun, 9 Jan 2022 12:07:32 +0000 Subject: [PATCH] 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. --- gnucash/gnome-utils/gnc-query-view.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gnucash/gnome-utils/gnc-query-view.c b/gnucash/gnome-utils/gnc-query-view.c index b61bee9481..03c3ac9c67 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);