From 89e506b4379559f16496e7cde487c960e0b59d9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Mon, 10 Aug 2026 15:31:56 -0700 Subject: [PATCH] FuzzySearch/FileItem: use arrow, account for RTL --- plugins/fuzzy-search/file-item.vala | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/plugins/fuzzy-search/file-item.vala b/plugins/fuzzy-search/file-item.vala index e5f6563fde..bb4029850e 100644 --- a/plugins/fuzzy-search/file-item.vala +++ b/plugins/fuzzy-search/file-item.vala @@ -24,11 +24,9 @@ public class FileItem : Gtk.ListBoxRow { var path_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 1); path_box.valign = Gtk.Align.CENTER; - var path_label = new Gtk.Label ( - @"$(should_distinguish_project ? result.project + " • " : "")$(result.relative_path)" - ); - - path_label.halign = Gtk.Align.START; + var path_label = new Gtk.Label (get_path_label (should_distinguish_project)) { + halign = START + }; var filename_label = new Gtk.Label (Path.get_basename (result.relative_path)); filename_label.halign = Gtk.Align.START; @@ -56,4 +54,16 @@ public class FileItem : Gtk.ListBoxRow { this.child = container_box; } + + private string get_path_label (bool show_project) { + if (!show_project) { + return result.relative_path; + } + + if (Gtk.StateFlags.DIR_RTL in get_state_flags ()) { + return "%s ← %s".printf (result.relative_path, result.project); + } + + return "%s → %s".printf (result.project, result.relative_path); + } }