[epiphany] Use full width url popdown in narrow mode
- From: Michael Catanzaro <mcatanzaro src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [epiphany] Use full width url popdown in narrow mode
 
- Date: Mon, 16 Mar 2020 17:33:37 +0000 (UTC)
 
commit 11cc9449213cba5808cf71bd92aecbafa53c8c27
Author: Jan-Michael Brummer <jan brummer tabos org>
Date:   Sun Mar 15 10:46:30 2020 +0100
    Use full width url popdown in narrow mode
 lib/widgets/ephy-location-entry.c | 10 ++++++++++
 lib/widgets/ephy-location-entry.h |  3 +++
 src/ephy-header-bar.c             |  3 +++
 3 files changed, 16 insertions(+)
---
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index 2b375ab25..9d4a2a48e 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -1460,3 +1460,13 @@ ephy_location_entry_set_progress (EphyLocationEntry *entry,
   entry->progress_fraction = fraction;
   ephy_location_entry_set_fraction_internal (entry);
 }
+
+void
+ephy_location_entry_set_mobile_popdown (EphyLocationEntry *entry,
+                                        gboolean           mobile_popdown)
+{
+  if (mobile_popdown)
+    dzl_suggestion_entry_set_position_func (DZL_SUGGESTION_ENTRY (entry->url_entry), 
dzl_suggestion_entry_window_position_func, NULL, NULL);
+  else
+    dzl_suggestion_entry_set_position_func (DZL_SUGGESTION_ENTRY (entry->url_entry), position_func, NULL, 
NULL);
+}
diff --git a/lib/widgets/ephy-location-entry.h b/lib/widgets/ephy-location-entry.h
index 657ace80c..fb8074b83 100644
--- a/lib/widgets/ephy-location-entry.h
+++ b/lib/widgets/ephy-location-entry.h
@@ -80,4 +80,7 @@ void            ephy_location_entry_set_progress               (EphyLocationEntr
                                                                 gdouble            progress,
                                                                 gboolean           loading);
 
+void            ephy_location_entry_set_mobile_popdown         (EphyLocationEntry *entry,
+                                                                gboolean           mobile_popdown);
+
 G_END_DECLS
diff --git a/src/ephy-header-bar.c b/src/ephy-header-bar.c
index a5e3d8e46..543e08224 100644
--- a/src/ephy-header-bar.c
+++ b/src/ephy-header-bar.c
@@ -461,4 +461,7 @@ ephy_header_bar_set_adaptive_mode (EphyHeaderBar    *header_bar,
 
       break;
   }
+
+  if (ephy_embed_shell_get_mode (ephy_embed_shell_get_default ()) != EPHY_EMBED_SHELL_MODE_APPLICATION)
+    ephy_location_entry_set_mobile_popdown (EPHY_LOCATION_ENTRY (header_bar->title_widget), adaptive_mode == 
EPHY_ADAPTIVE_MODE_NARROW);
 }
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]