[nautilus/2201-location-bar-corners-are-reversed-in-rtl: 10/10] pathbar: Keep scrolled to the end in RTL locale too
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/2201-location-bar-corners-are-reversed-in-rtl: 10/10] pathbar: Keep scrolled to the end in RTL locale too
- Date: Fri, 22 Apr 2022 17:03:33 +0000 (UTC)
commit d2eee12eeed1cdc63ef78e0a59e92a8c01b16867
Author: António Fernandes <antoniof gnome org>
Date: Fri Apr 22 18:02:11 2022 +0100
pathbar: Keep scrolled to the end in RTL locale too
GtkArrangement value is text-direction independant, apparently.
src/nautilus-pathbar.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index 1ae389153..d7dd33f24 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -212,8 +212,12 @@ action_pathbar_properties (GSimpleAction *action,
static void
on_adjustment_changed (GtkAdjustment *adjustment)
{
+ gboolean rtl = (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL);
+
/* Automatically scroll to the end, to keep the current folder visible */
- gtk_adjustment_set_value (adjustment, gtk_adjustment_get_upper (adjustment));
+ gtk_adjustment_set_value (adjustment, (rtl ?
+ gtk_adjustment_get_lower (adjustment) :
+ gtk_adjustment_get_upper (adjustment)));
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]