Commit b85a8543 authored by Julian Sparber's avatar Julian Sparber

contact-editor: imporve grid spacing

Reduce grid size to 3 for instead of 4, this caused to much space
between the input field and the delete button.

Reduce margins around grid to the same values as g-c-c and reduce
general spacing
parent 0de4a532
......@@ -15,6 +15,7 @@
<object class="ContactsMaxWidthBin">
<property name="visible">True</property>
<property name="max_width">600</property>
<property name="halign">center</property>
<child>
<object class="GtkGrid" id="container_grid">
<property name="visible">True</property>
......@@ -22,9 +23,10 @@
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<property name="row_spacing">12</property>
<property name="column_spacing">16</property>
<property name="margin">36</property>
<property name="margin_bottom">24</property>
<property name="column_spacing">12</property>
<property name="margin">12</property>
<property name="margin_top">36</property>
<property name="margin_bottom">36</property>
</object>
</child>
</object>
......
......@@ -351,7 +351,7 @@ public class Contacts.ContactEditor : ContactForm {
child.destroy ();
child = container_grid.get_child_at (1, row);
child.destroy ();
child = container_grid.get_child_at (3, row);
child = container_grid.get_child_at (2, row);
child.destroy ();
field_entry.value.changed = true;
......@@ -385,7 +385,7 @@ public class Contacts.ContactEditor : ContactForm {
var delete_button = new Button.from_icon_name ("user-trash-symbolic", IconSize.MENU);
delete_button.get_accessible ().set_name (_("Delete field"));
container_grid.attach (delete_button, 3, row, 1, 1);
container_grid.attach (delete_button, 2, row, 1, 1);
/* Notify change to upper layer */
combo.changed.connect ((c) => {
......@@ -416,7 +416,7 @@ public class Contacts.ContactEditor : ContactForm {
var delete_button = new Button.from_icon_name ("user-trash-symbolic", IconSize.MENU);
delete_button.get_accessible ().set_name (_("Delete field"));
container_grid.attach (delete_button, 3, row, 1, 1);
container_grid.attach (delete_button, 2, row, 1, 1);
/* Notify change to upper layer */
value_entry.changed.connect (() => {
......@@ -451,7 +451,7 @@ public class Contacts.ContactEditor : ContactForm {
var delete_button = new Button.from_icon_name ("user-trash-symbolic", IconSize.MENU);
delete_button.get_accessible ().set_name (_("Delete field"));
delete_button.set_valign (Align.START);
container_grid.attach (delete_button, 3, row, 1, 1);
container_grid.attach (delete_button, 2, row, 1, 1);
/* Notify change to upper layer */
value_text.get_buffer ().changed.connect (() => {
......@@ -505,7 +505,7 @@ public class Contacts.ContactEditor : ContactForm {
var delete_button = new Button.from_icon_name ("user-trash-symbolic", IconSize.MENU);
delete_button.get_accessible ().set_name (_("Delete field"));
container_grid.attach (delete_button, 3, row, 1, 1);
container_grid.attach (delete_button, 2, row, 1, 1);
AdjustingDateFn fn = () => {
int[] month_of_31 = {3, 5, 8, 10};
......@@ -556,7 +556,7 @@ public class Contacts.ContactEditor : ContactForm {
var delete_button = new Button.from_icon_name ("user-trash-symbolic", IconSize.MENU);
delete_button.get_accessible ().set_name (_("Delete field"));
delete_button.set_valign (Align.START);
container_grid.attach (delete_button, 3, row, 1, 1);
container_grid.attach (delete_button, 2, row, 1, 1);
/* Notify change to upper layer */
combo.changed.connect (() => {
......@@ -678,7 +678,7 @@ public class Contacts.ContactEditor : ContactForm {
}
if (! rows.is_empty) {
has_nickname_row = true;
var delete_button = container_grid.get_child_at (3, row - 1) as Button;
var delete_button = container_grid.get_child_at (2, row - 1) as Button;
delete_button.clicked.connect (() => {
has_nickname_row = false;
});
......@@ -959,7 +959,7 @@ public class Contacts.ContactEditor : ContactForm {
this.name_entry.set_data ("changed", true);
});
this.container_grid.attach (this.name_entry, 1, 0, 3, 3);
this.container_grid.attach (this.name_entry, 1, 0, 2, 3);
}
public bool name_changed () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment