[gnome-builder] libide/webkit: use inscription for url display
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide/webkit: use inscription for url display
- Date: Thu, 22 Sep 2022 06:25:02 +0000 (UTC)
commit fdf48a10af3dbfda36818d508654773ae3087da1
Author: Christian Hergert <chergert redhat com>
Date: Wed Sep 21 23:24:38 2022 -0700
libide/webkit: use inscription for url display
This simplifies a lot of the layout for really long strings and helps
ensure that our url bar doesn't grow unweildly wide.
Fixes #1802
src/libide/webkit/ide-url-bar.c | 4 ++--
src/libide/webkit/ide-url-bar.ui | 10 ++++++++--
2 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/libide/webkit/ide-url-bar.c b/src/libide/webkit/ide-url-bar.c
index 0bc3d9194..74d1b1637 100644
--- a/src/libide/webkit/ide-url-bar.c
+++ b/src/libide/webkit/ide-url-bar.c
@@ -43,7 +43,7 @@ struct _IdeUrlBar
/* Template references */
GtkOverlay *overlay;
GtkStack *stack;
- GtkLabel *url_display;
+ GtkInscription *url_display;
GtkText *url_editable;
GtkProgressBar *load_progress;
GtkImage *security_image;
@@ -400,7 +400,7 @@ ide_url_bar_init (IdeUrlBar *self)
self->web_view_bindings = g_binding_group_new ();
g_binding_group_bind (self->web_view_bindings, "uri",
- self->url_display, "label",
+ self->url_display, "text",
G_BINDING_SYNC_CREATE);
gtk_widget_set_cursor_from_name (GTK_WIDGET (self->url_display), "text");
diff --git a/src/libide/webkit/ide-url-bar.ui b/src/libide/webkit/ide-url-bar.ui
index 6a2ee2961..815941df4 100644
--- a/src/libide/webkit/ide-url-bar.ui
+++ b/src/libide/webkit/ide-url-bar.ui
@@ -43,9 +43,15 @@
</object>
</child>
<child>
- <object class="GtkLabel" id="url_display">
+ <object class="GtkInscription" id="url_display">
+ <property name="wrap-mode">none</property>
+ <property name="text-overflow">clip</property>
+ <property name="nat-lines">1</property>
+ <property name="min-lines">1</property>
<property name="hexpand">true</property>
- <property name="xalign">0</property>
+ <property name="nat-chars">10</property>
+ <property name="min-chars">10</property>
+ <property name="valign">center</property>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]