[libadwaita/wip/exalm/tabs2] tab-box: Fix reordering with RTL
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/tabs2] tab-box: Fix reordering with RTL
- Date: Tue, 2 Aug 2022 08:39:47 +0000 (UTC)
commit d4c99c5366b8675961d97b97bcb7bf2a4038b25e
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Tue Aug 2 12:08:36 2022 +0400
tab-box: Fix reordering with RTL
src/adw-tab-box.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/adw-tab-box.c b/src/adw-tab-box.c
index dfe58302..64a9c389 100644
--- a/src/adw-tab-box.c
+++ b/src/adw-tab-box.c
@@ -1321,7 +1321,12 @@ update_drag_reodering (AdwTabBox *self)
for (l = self->tabs; l; l = l->next) {
TabInfo *info = l->data;
- int center = info->unshifted_pos + info->final_width / 2;
+ int center;
+
+ if (is_rtl)
+ center = info->unshifted_pos - info->final_width / 2;
+ else
+ center = info->unshifted_pos + info->final_width / 2;
if (info == self->reordered_tab)
old_index = i;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]