summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Michael Brummer <jan.brummer@tabos.org>2020-03-15 10:46:30 +0100
committerMichael Catanzaro <mcatanzaro@gnome.org>2020-03-16 17:27:10 +0000
commit11cc9449213cba5808cf71bd92aecbafa53c8c27 (patch)
treeb88093e3499d751bccc2d5779aca1c32249b54e1
parent8863347600861844b449e73926ef34a720f18b24 (diff)
downloadepiphany-11cc9449213cba5808cf71bd92aecbafa53c8c27.tar.gz
Use full width url popdown in narrow mode
-rw-r--r--lib/widgets/ephy-location-entry.c10
-rw-r--r--lib/widgets/ephy-location-entry.h3
-rw-r--r--src/ephy-header-bar.c3
3 files changed, 16 insertions, 0 deletions
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);
}