1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-05-18 19:19:29 +00:00

Merge branch 'listbox-button-style-fixes' into 'main'

Listbox/button style fixes

See merge request GNOME/calls!727
This commit is contained in:
Anton Lazarev 2024-04-22 00:03:38 +00:00
commit 3536d6f9b5
4 changed files with 46 additions and 34 deletions

View file

@ -22,6 +22,7 @@ struct _CallsContactsRow {
GtkWidget *avatar;
GtkWidget *title;
GtkWidget *grid;
GtkWidget *box;
gint n_phonenumbers;
@ -48,12 +49,10 @@ insert_phonenumber (CallsContactsRow *self,
gtk_actionable_set_action_name (GTK_ACTIONABLE (button), "app.dial");
gtk_actionable_set_action_target (GTK_ACTIONABLE (button), "s", number, NULL);
gtk_widget_set_visible (button, TRUE);
gtk_grid_attach_next_to (GTK_GRID (self->grid),
button,
label,
GTK_POS_RIGHT,
1,
1);
gtk_widget_add_css_class (button, "flat");
gtk_box_insert_child_after (GTK_BOX (self->box),
button,
self->grid);
self->n_phonenumbers++;
}
@ -138,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

View file

@ -53,6 +53,9 @@
<property name="valign">center</property>
<property name="tooltip-text">Call</property>
<property name="icon-name">call-start-symbolic</property>
<style>
<class name="flat"/>
</style>
</object>
</child>
</object>

View file

@ -37,6 +37,9 @@
<property name="title" translatable="yes">No Contacts Found</property>
</object>
</child>
<style>
<class name="boxed-list"/>
</style>
</object>
</property>
</object>

View file

@ -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>