[epiphany] Replace HdyColumn by HdyClamp
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Replace HdyColumn by HdyClamp
- Date: Thu, 18 Jun 2020 12:30:20 +0000 (UTC)
commit b7dd938b13f20acdc9e54dcbd1b8b82ba7ce83e4
Author: Adrien Plazas <kekun plazas laposte net>
Date: Tue Jun 16 15:27:02 2020 +0200
Replace HdyColumn by HdyClamp
Also drop rename its properties, and drop them when they have the
default values.
embed/ephy-find-toolbar.c | 12 ++++++------
src/ephy-header-bar.c | 16 ++++++++--------
src/resources/gtk/clear-data-dialog.ui | 4 +---
src/resources/gtk/cookies-dialog.ui | 4 +---
src/resources/gtk/data-dialog.ui | 6 +++---
src/resources/gtk/history-dialog.ui | 4 +---
src/resources/gtk/passwords-dialog.ui | 4 +---
7 files changed, 21 insertions(+), 29 deletions(-)
---
diff --git a/embed/ephy-find-toolbar.c b/embed/ephy-find-toolbar.c
index 819a9112a..34b3d90d9 100644
--- a/embed/ephy-find-toolbar.c
+++ b/embed/ephy-find-toolbar.c
@@ -370,23 +370,23 @@ ephy_find_toolbar_load_changed_cb (WebKitWebView *web_view,
static void
ephy_find_toolbar_init (EphyFindToolbar *toolbar)
{
- GtkWidget *column;
+ GtkWidget *clamp;
GtkWidget *box;
GtkSizeGroup *size_group;
size_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
- column = GTK_WIDGET (hdy_column_new ());
- hdy_column_set_maximum_width (HDY_COLUMN (column), 400);
- hdy_column_set_linear_growth_width (HDY_COLUMN (column), 300);
- gtk_container_add (GTK_CONTAINER (toolbar), column);
+ clamp = GTK_WIDGET (hdy_clamp_new ());
+ hdy_clamp_set_maximum_size (HDY_CLAMP (clamp), 400);
+ hdy_clamp_set_tightening_threshold (HDY_CLAMP (clamp), 300);
+ gtk_container_add (GTK_CONTAINER (toolbar), clamp);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_style_context_add_class (gtk_widget_get_style_context (box),
GTK_STYLE_CLASS_RAISED);
gtk_style_context_add_class (gtk_widget_get_style_context (box),
GTK_STYLE_CLASS_LINKED);
- gtk_container_add (GTK_CONTAINER (column), box);
+ gtk_container_add (GTK_CONTAINER (clamp), box);
toolbar->entry = gd_tagged_entry_new ();
toolbar->entry_tag = gd_tagged_entry_tag_new ("");
diff --git a/src/ephy-header-bar.c b/src/ephy-header-bar.c
index d41a0ea7a..4910864e0 100644
--- a/src/ephy-header-bar.c
+++ b/src/ephy-header-bar.c
@@ -215,16 +215,16 @@ ephy_header_bar_constructed (GObject *object)
gtk_header_bar_set_custom_title (GTK_HEADER_BAR (header_bar), GTK_WIDGET (header_bar->title_widget));
} else {
- GtkWidget *column;
+ GtkWidget *clamp;
- column = hdy_column_new ();
- gtk_widget_set_hexpand (GTK_WIDGET (column), TRUE);
- gtk_widget_show (column);
- hdy_column_set_maximum_width (HDY_COLUMN (column), 860);
- hdy_column_set_linear_growth_width (HDY_COLUMN (column), 560);
- gtk_container_add (GTK_CONTAINER (column), GTK_WIDGET (header_bar->title_widget));
+ clamp = hdy_clamp_new ();
+ gtk_widget_set_hexpand (GTK_WIDGET (clamp), TRUE);
+ gtk_widget_show (clamp);
+ hdy_clamp_set_maximum_size (HDY_CLAMP (clamp), 860);
+ hdy_clamp_set_tightening_threshold (HDY_CLAMP (clamp), 560);
+ gtk_container_add (GTK_CONTAINER (clamp), GTK_WIDGET (header_bar->title_widget));
- gtk_header_bar_set_custom_title (GTK_HEADER_BAR (header_bar), column);
+ gtk_header_bar_set_custom_title (GTK_HEADER_BAR (header_bar), clamp);
}
gtk_widget_show (GTK_WIDGET (header_bar->title_widget));
diff --git a/src/resources/gtk/clear-data-dialog.ui b/src/resources/gtk/clear-data-dialog.ui
index e181c9b2b..042830400 100644
--- a/src/resources/gtk/clear-data-dialog.ui
+++ b/src/resources/gtk/clear-data-dialog.ui
@@ -33,13 +33,11 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
- <object class="HdyColumn">
+ <object class="HdyClamp">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">6</property>
<property name="margin_end">6</property>
- <property name="maximum_width">600</property>
- <property name="linear_growth_width">400</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
diff --git a/src/resources/gtk/cookies-dialog.ui b/src/resources/gtk/cookies-dialog.ui
index 69d390d52..12dc1913a 100644
--- a/src/resources/gtk/cookies-dialog.ui
+++ b/src/resources/gtk/cookies-dialog.ui
@@ -17,13 +17,11 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
- <object class="HdyColumn">
+ <object class="HdyClamp">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">6</property>
<property name="margin_end">6</property>
- <property name="maximum_width">600</property>
- <property name="linear_growth_width">400</property>
<child>
<object class="GtkListBox" id="cookies_listbox">
<property name="visible">True</property>
diff --git a/src/resources/gtk/data-dialog.ui b/src/resources/gtk/data-dialog.ui
index eedafb1f8..c8cf048ea 100644
--- a/src/resources/gtk/data-dialog.ui
+++ b/src/resources/gtk/data-dialog.ui
@@ -80,11 +80,11 @@
<property name="hexpand">True</property>
<property name="search_mode_enabled">False</property>
<child>
- <object class="HdyColumn">
+ <object class="HdyClamp">
<property name="visible">True</property>
<property name="hexpand">True</property>
- <property name="maximum_width">400</property>
- <property name="linear_growth_width">300</property>
+ <property name="maximum_size">400</property>
+ <property name="tightening_threshold">300</property>
<child>
<object class="GtkSearchEntry" id="search_entry">
<property name="visible">True</property>
diff --git a/src/resources/gtk/history-dialog.ui b/src/resources/gtk/history-dialog.ui
index c799afcc9..5814c75cc 100644
--- a/src/resources/gtk/history-dialog.ui
+++ b/src/resources/gtk/history-dialog.ui
@@ -18,13 +18,11 @@
<property name="can_focus">True</property>
<signal name="edge-reached" handler="on_edge_reached" object="EphyHistoryDialog" swapped="no"/>
<child>
- <object class="HdyColumn">
+ <object class="HdyClamp">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">6</property>
<property name="margin_end">6</property>
- <property name="maximum_width">600</property>
- <property name="linear_growth_width">400</property>
<child>
<object class="GtkListBox" id="listbox">
<property name="visible">True</property>
diff --git a/src/resources/gtk/passwords-dialog.ui b/src/resources/gtk/passwords-dialog.ui
index e0f2dc6dc..a0f3274ef 100644
--- a/src/resources/gtk/passwords-dialog.ui
+++ b/src/resources/gtk/passwords-dialog.ui
@@ -43,13 +43,11 @@
<property name="min_content_width">300</property>
<property name="min_content_height">300</property>
<child>
- <object class="HdyColumn">
+ <object class="HdyClamp">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">6</property>
<property name="margin_end">6</property>
- <property name="maximum_width">600</property>
- <property name="linear_growth_width">400</property>
<child>
<object class="GtkListBox" id="listbox">
<property name="visible">True</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]