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.
This commit is contained in:
Robert Fewell 2022-01-09 12:07:32 +00:00
parent 4a91e19368
commit a41a295932

View File

@ -324,7 +324,12 @@ gnc_query_view_init_view (GNCQueryView *qview)
if (((GNCSearchParam *) param)->justify == GTK_JUSTIFY_CENTER) if (((GNCSearchParam *) param)->justify == GTK_JUSTIFY_CENTER)
algn = 0.5; algn = 0.5;
else if (((GNCSearchParam *) param)->justify == GTK_JUSTIFY_RIGHT) 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 */ /* Set the column title alignment to that of the column */
gtk_tree_view_column_set_alignment (col, algn); gtk_tree_view_column_set_alignment (col, algn);