mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-06-16 08:49:31 +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 *avatar;
|
||||||
GtkWidget *title;
|
GtkWidget *title;
|
||||||
GtkWidget *grid;
|
GtkWidget *grid;
|
||||||
|
GtkWidget *box;
|
||||||
|
|
||||||
gint n_phonenumbers;
|
gint n_phonenumbers;
|
||||||
|
|
||||||
|
@ -49,12 +50,9 @@ insert_phonenumber (CallsContactsRow *self,
|
||||||
gtk_actionable_set_action_target (GTK_ACTIONABLE (button), "s", number, NULL);
|
gtk_actionable_set_action_target (GTK_ACTIONABLE (button), "s", number, NULL);
|
||||||
gtk_widget_set_visible (button, TRUE);
|
gtk_widget_set_visible (button, TRUE);
|
||||||
gtk_widget_add_css_class (button, "flat");
|
gtk_widget_add_css_class (button, "flat");
|
||||||
gtk_grid_attach_next_to (GTK_GRID (self->grid),
|
gtk_box_insert_child_after (GTK_BOX (self->box),
|
||||||
button,
|
button,
|
||||||
label,
|
self->grid);
|
||||||
GTK_POS_RIGHT,
|
|
||||||
1,
|
|
||||||
1);
|
|
||||||
|
|
||||||
self->n_phonenumbers++;
|
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, avatar);
|
||||||
gtk_widget_class_bind_template_child (widget_class, CallsContactsRow, title);
|
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, grid);
|
||||||
|
gtk_widget_class_bind_template_child (widget_class, CallsContactsRow, box);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -4,8 +4,12 @@
|
||||||
<property name="activatable">False</property>
|
<property name="activatable">False</property>
|
||||||
<property name="selectable">False</property>
|
<property name="selectable">False</property>
|
||||||
<property name="child">
|
<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-start">6</property>
|
||||||
|
<property name="margin-end">6</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkGrid" id="grid">
|
||||||
<property name="margin-end">6</property>
|
<property name="margin-end">6</property>
|
||||||
<property name="margin-top">6</property>
|
<property name="margin-top">6</property>
|
||||||
<property name="margin-bottom">6</property>
|
<property name="margin-bottom">6</property>
|
||||||
|
@ -38,6 +42,8 @@
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
</property>
|
</property>
|
||||||
</template>
|
</template>
|
||||||
</interface>
|
</interface>
|
||||||
|
|
Loading…
Reference in a new issue