[polari] Stop using 'margin' shortcut
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] Stop using 'margin' shortcut
- Date: Sat, 16 Jan 2021 01:50:26 +0000 (UTC)
commit b452782b3e33acc2ce6f082e13be10ae2cfb4795
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Oct 9 14:38:37 2020 +0200
Stop using 'margin' shortcut
In GTK3, 'margin' is a shortcut property that sets
all four of 'margin-start', 'margin-end', 'margin-top'
and 'margin-bottom'.
It was removed in GTK4, so prepare for that by using
the separate properties for each side.
https://gitlab.gnome.org/GNOME/polari/-/merge_requests/174
data/resources/connection-properties.ui | 13 ++++++++++---
data/resources/entry-area.ui | 8 ++++++--
data/resources/join-room-dialog.ui | 11 ++++++++---
data/resources/nick-popover.ui | 5 ++++-
data/resources/room-list-header.ui | 5 ++++-
data/resources/server-room-list.ui | 4 ++--
data/resources/user-details.ui | 10 ++++++++--
data/resources/user-popover.ui | 5 ++++-
src/connections.js | 8 +++++++-
src/userList.js | 10 ++++++++--
10 files changed, 61 insertions(+), 18 deletions(-)
---
diff --git a/data/resources/connection-properties.ui b/data/resources/connection-properties.ui
index 4b2811f7..1fdae4e7 100644
--- a/data/resources/connection-properties.ui
+++ b/data/resources/connection-properties.ui
@@ -31,7 +31,10 @@
<child>
<object class="Gjs_ConnectionDetails" id="details">
<property name="visible">True</property>
- <property name="margin">24</property>
+ <property name="margin-start">24</property>
+ <property name="margin-end">24</property>
+ <property name="margin-top">24</property>
+ <property name="margin-bottom">24</property>
</object>
</child>
<child>
@@ -45,8 +48,10 @@
<property name="visible">True</property>
<property name="icon-name">dialog-error-symbolic</property>
<property name="icon-size">5</property>
- <property name="margin">12</property>
<property name="margin-start">24</property>
+ <property name="margin-end">12</property>
+ <property name="margin-top">12</property>
+ <property name="margin-bottom">12</property>
</object>
</child>
<child>
@@ -55,8 +60,10 @@
<property name="vexpand">True</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
- <property name="margin">12</property>
+ <property name="margin-start">12</property>
<property name="margin-end">24</property>
+ <property name="margin-top">12</property>
+ <property name="margin-bottom">12</property>
</object>
</child>
</object>
diff --git a/data/resources/entry-area.ui b/data/resources/entry-area.ui
index 483ab089..665bf286 100644
--- a/data/resources/entry-area.ui
+++ b/data/resources/entry-area.ui
@@ -12,8 +12,10 @@
<object class="GtkBox">
<property name="visible">True</property>
<property name="spacing">6</property>
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
<property name="margin-end">14</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<child>
<object class="GtkMenuButton" id="nickButton">
<property name="visible">True</property>
@@ -64,8 +66,10 @@
<object class="GtkBox" id="pasteBox">
<property name="visible">True</property>
<property name="spacing">6</property>
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
<property name="margin-end">0</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<child>
<object class="GtkSpinner" id="uploadSpinner">
<property name="visible">True</property>
diff --git a/data/resources/join-room-dialog.ui b/data/resources/join-room-dialog.ui
index 170669b5..f8ba87a7 100644
--- a/data/resources/join-room-dialog.ui
+++ b/data/resources/join-room-dialog.ui
@@ -35,7 +35,9 @@
<child>
<object class="GtkGrid">
<property name="visible">True</property>
- <property name="margin">30</property>
+ <property name="margin-start">30</property>
+ <property name="margin-end">30</property>
+ <property name="margin-top">30</property>
<property name="margin-bottom">24</property>
<property name="row-spacing">18</property>
<property name="column-spacing">12</property>
@@ -99,7 +101,9 @@
<child>
<object class="GtkBox">
<property name="visible">True</property>
- <property name="margin">30</property>
+ <property name="margin-start">30</property>
+ <property name="margin-end">30</property>
+ <property name="margin-top">30</property>
<property name="margin-bottom">24</property>
<property name="orientation">vertical</property>
<property name="spacing">18</property>
@@ -126,7 +130,8 @@
<object class="GtkSearchEntry" id="filterEntry">
<property name="visible">True</property>
<property name="hexpand">True</property>
- <property name="margin">60</property>
+ <property name="margin-start">60</property>
+ <property name="margin-end">60</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
</object>
diff --git a/data/resources/nick-popover.ui b/data/resources/nick-popover.ui
index dc4bbd0d..d8355fd6 100644
--- a/data/resources/nick-popover.ui
+++ b/data/resources/nick-popover.ui
@@ -5,7 +5,10 @@
<child>
<object class="GtkBox">
<property name="visible">True</property>
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
diff --git a/data/resources/room-list-header.ui b/data/resources/room-list-header.ui
index ad86be33..a2650371 100644
--- a/data/resources/room-list-header.ui
+++ b/data/resources/room-list-header.ui
@@ -96,7 +96,10 @@
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
- <property name="margin">12</property>
+ <property name="margin-start">12</property>
+ <property name="margin-end">12</property>
+ <property name="margin-top">12</property>
+ <property name="margin-bottom">12</property>
<property name="visible">True</property>
<child>
<object class="GtkLabel" id="popoverTitle">
diff --git a/data/resources/server-room-list.ui b/data/resources/server-room-list.ui
index a053f138..af70c9df 100644
--- a/data/resources/server-room-list.ui
+++ b/data/resources/server-room-list.ui
@@ -37,10 +37,10 @@
<object class="GtkSearchEntry" id="filterEntry">
<property name="visible">True</property>
<property name="hexpand">True</property>
- <property name="margin">60</property>
+ <property name="margin-start">60</property>
+ <property name="margin-end">22</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
- <property name="margin-end">22</property>
<property name="activates-default">True</property>
<property name="placeholder-text" translatable="yes">Enter room name to add</property>
</object>
diff --git a/data/resources/user-details.ui b/data/resources/user-details.ui
index a460fdae..56820008 100644
--- a/data/resources/user-details.ui
+++ b/data/resources/user-details.ui
@@ -8,12 +8,18 @@
<object class="GtkBox" id="box">
<property name="orientation">vertical</property>
<property name="spacing">2</property>
- <property name="margin">9</property>
+ <property name="margin-start">9</property>
+ <property name="margin-end">9</property>
+ <property name="margin-top">9</property>
+ <property name="margin-bottom">9</property>
<property name="visible">True</property>
<child>
<object class="GtkBox" id="spinnerBox">
<property name="spacing">6</property>
- <property name="margin">12</property>
+ <property name="margin-start">12</property>
+ <property name="margin-end">12</property>
+ <property name="margin-top">12</property>
+ <property name="margin-bottom">12</property>
<property name="hexpand">True</property>
<property name="halign">center</property>
<property name="visible">True</property>
diff --git a/data/resources/user-popover.ui b/data/resources/user-popover.ui
index 34c9e801..0ee860ce 100644
--- a/data/resources/user-popover.ui
+++ b/data/resources/user-popover.ui
@@ -12,7 +12,10 @@
<property name="orientation">horizontal</property>
<property name="visible">True</property>
<property name="halign">fill</property>
- <property name="margin">9</property>
+ <property name="margin-start">9</property>
+ <property name="margin-end">9</property>
+ <property name="margin-top">9</property>
+ <property name="margin-bottom">9</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
diff --git a/src/connections.js b/src/connections.js
index e42a5f78..9c521c17 100644
--- a/src/connections.js
+++ b/src/connections.js
@@ -40,7 +40,13 @@ class ConnectionRow extends Gtk.ListBoxRow {
this, 'activatable',
GObject.BindingFlags.SYNC_CREATE);
- let box = new Gtk.Box({ spacing: 12, margin: 12 });
+ let box = new Gtk.Box({
+ spacing: 12,
+ margin_start: 12,
+ margin_end: 12,
+ margin_top: 12,
+ margin_bottom: 12,
+ });
this.add(box);
box.add(new Gtk.Label({ label: name, halign: Gtk.Align.START }));
diff --git a/src/userList.js b/src/userList.js
index 2af888f4..2db6b704 100644
--- a/src/userList.js
+++ b/src/userList.js
@@ -41,7 +41,10 @@ class UserListPopover extends Gtk.Popover {
this._box = new Gtk.Box({
orientation: Gtk.Orientation.VERTICAL,
spacing: 6,
- margin: 6,
+ margin_start: 6,
+ margin_end: 6,
+ margin_top: 6,
+ margin_bottom: 6,
});
this.add(this._box);
@@ -559,7 +562,10 @@ class UserList extends Gtk.ScrolledWindow {
halign: Gtk.Align.CENTER,
valign: Gtk.Align.CENTER,
orientation: Gtk.Orientation.VERTICAL,
- margin: 32,
+ margin_top: 32,
+ margin_bottom: 32,
+ margin_start: 32,
+ margin_end: 32,
spacing: 6,
visible: true,
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]