From 8c550d62c2147de2750c5a5763bd4b0d4f689c25 Mon Sep 17 00:00:00 2001 From: Jeremy Wootten Date: Sat, 6 Jan 2024 17:51:46 +0000 Subject: [PATCH] Associate popover with foldermanager (#1396) * Associate popover with foldermanager * Remove deprecated PopoverConstraint --- plugins/fuzzy-search/fuzzy-search-popover.vala | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/fuzzy-search/fuzzy-search-popover.vala b/plugins/fuzzy-search/fuzzy-search-popover.vala index 98273e17f..07d58589f 100644 --- a/plugins/fuzzy-search/fuzzy-search-popover.vala +++ b/plugins/fuzzy-search/fuzzy-search-popover.vala @@ -20,7 +20,8 @@ public class Scratch.FuzzySearchPopover : Gtk.Popover { private bool should_distinguish_projects; private Gtk.EventControllerKey search_term_entry_key_controller; private Gtk.Label title_label; - private Scratch.MainWindow current_window; + public Scratch.MainWindow current_window { get; construct; } + public bool sidebar_is_visible { get; set; } public signal void open_file (string filepath); public signal void close_search (); @@ -28,13 +29,11 @@ public class Scratch.FuzzySearchPopover : Gtk.Popover { public FuzzySearchPopover (Gee.HashMap pps, Scratch.MainWindow window) { Object ( modal: true, - relative_to: window.toolbar, - constrain_to: Gtk.PopoverConstraint.WINDOW, - width_request: 500 + relative_to: window.document_view, + width_request: 500, + current_window: window ); - current_window = window; - int height; current_window.get_size (null, out height); window_height = height; @@ -85,6 +84,7 @@ public class Scratch.FuzzySearchPopover : Gtk.Popover { } construct { + pointing_to = { 0, 32, 1, 1 }; this.get_style_context ().add_class ("fuzzy-popover"); title_label = new Gtk.Label (_("Find project files"));