[epiphany] Dramatically shrink the location entry
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Dramatically shrink the location entry
- Date: Mon, 16 Jan 2017 05:31:06 +0000 (UTC)
commit cce7462b78b05fbf1a2cf960f8b4ef2d1cc86b07
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sun Jan 15 23:09:46 2017 -0600
Dramatically shrink the location entry
It doesn't look good when it's so big.
Unfortunately the GTK+ size model is not really good enough to get
exactly the behavior we want, so we have to settle for an
insufficiently-large address bar at large window sizes. It's not the end
of the world, but it would be good to improve this so that the location
entry can expand to fill larger windows. Unfortunately the only way I
know of to do this would be to set a huge amount of margin, which
results in a huge minimum size for the window and breaks shell tiling.
lib/widgets/ephy-location-entry.c | 4 ++--
src/ephy-header-bar.c | 10 ++++++----
2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index 72b7e12..ae2d4c0 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -308,10 +308,10 @@ ephy_location_entry_get_preferred_width (GtkWidget *widget,
gint *natural_width)
{
if (minimum_width)
- *minimum_width = -1;
+ *minimum_width = 240;
if (natural_width)
- *natural_width = 848;
+ *natural_width = 480;
}
static void
diff --git a/src/ephy-header-bar.c b/src/ephy-header-bar.c
index 3c1ae89..e487109 100644
--- a/src/ephy-header-bar.c
+++ b/src/ephy-header-bar.c
@@ -702,12 +702,14 @@ ephy_header_bar_constructed (GObject *object)
}
/* Title widget (location entry or title box) */
- if (ephy_embed_shell_get_mode (embed_shell) == EPHY_EMBED_SHELL_MODE_APPLICATION)
+ if (ephy_embed_shell_get_mode (embed_shell) == EPHY_EMBED_SHELL_MODE_APPLICATION) {
header_bar->title_widget = EPHY_TITLE_WIDGET (ephy_title_box_new ());
- else
+ } else {
header_bar->title_widget = EPHY_TITLE_WIDGET (ephy_location_entry_new ());
- gtk_widget_set_margin_start (GTK_WIDGET (header_bar->title_widget), 54);
- gtk_widget_set_margin_end (GTK_WIDGET (header_bar->title_widget), 54);
+ gtk_widget_set_margin_start (GTK_WIDGET (header_bar->title_widget), 30);
+ gtk_widget_set_margin_end (GTK_WIDGET (header_bar->title_widget), 30);
+ }
+
gtk_header_bar_set_custom_title (GTK_HEADER_BAR (header_bar), GTK_WIDGET (header_bar->title_widget));
gtk_widget_show (GTK_WIDGET (header_bar->title_widget));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]