mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-06-28 14:49:30 +00:00
contacts-row: center call button vertically
This commit is contained in:
parent
c77eddfd19
commit
0a2489d1f7
|
@ -22,6 +22,7 @@ struct _CallsContactsRow {
|
|||
GtkWidget *avatar;
|
||||
GtkWidget *title;
|
||||
GtkWidget *grid;
|
||||
GtkWidget *box;
|
||||
|
||||
gint n_phonenumbers;
|
||||
|
||||
|
@ -49,12 +50,9 @@ insert_phonenumber (CallsContactsRow *self,
|
|||
gtk_actionable_set_action_target (GTK_ACTIONABLE (button), "s", number, NULL);
|
||||
gtk_widget_set_visible (button, TRUE);
|
||||
gtk_widget_add_css_class (button, "flat");
|
||||
gtk_grid_attach_next_to (GTK_GRID (self->grid),
|
||||
button,
|
||||
label,
|
||||
GTK_POS_RIGHT,
|
||||
1,
|
||||
1);
|
||||
gtk_box_insert_child_after (GTK_BOX (self->box),
|
||||
button,
|
||||
self->grid);
|
||||
|
||||
self->n_phonenumbers++;
|
||||
}
|
||||
|
@ -139,6 +137,7 @@ calls_contacts_row_class_init (CallsContactsRowClass *klass)
|
|||
gtk_widget_class_bind_template_child (widget_class, CallsContactsRow, avatar);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsContactsRow, title);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsContactsRow, grid);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsContactsRow, box);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -4,37 +4,43 @@
|
|||
<property name="activatable">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="child">
|
||||
<object class="GtkGrid" id="grid">
|
||||
<object class="GtkBox" id="box">
|
||||
<property name="orientation">horizontal</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="column-spacing">12</property>
|
||||
<property name="row-spacing">3</property>
|
||||
<child>
|
||||
<object class="AdwAvatar" id="avatar">
|
||||
<property name="valign">center</property>
|
||||
<property name="size">36</property>
|
||||
<property name="show-initials">True</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="title">
|
||||
<property name="ellipsize">end</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<style>
|
||||
<class name="bold-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
<object class="GtkGrid" id="grid">
|
||||
<property name="margin-end">6</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="margin-bottom">6</property>
|
||||
<property name="column-spacing">12</property>
|
||||
<property name="row-spacing">3</property>
|
||||
<child>
|
||||
<object class="AdwAvatar" id="avatar">
|
||||
<property name="valign">center</property>
|
||||
<property name="size">36</property>
|
||||
<property name="show-initials">True</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="title">
|
||||
<property name="ellipsize">end</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<style>
|
||||
<class name="bold-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
|
Loading…
Reference in a new issue