[calls] account-widgets: Conform to style
- From: Evangelos Ribeiro Tzaras <devrtz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [calls] account-widgets: Conform to style
- Date: Tue, 24 May 2022 13:16:01 +0000 (UTC)
commit f102fb3fcd64ba9e3c33574c8c2b3774f45a8ce6
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date: Sat May 21 17:33:39 2022 +0200
account-widgets: Conform to style
Closes #396
src/calls-account-row.c | 14 --------------
src/ui/account-overview.ui | 23 ++++++++++++++++++-----
src/ui/account-row.ui | 10 ++--------
3 files changed, 20 insertions(+), 27 deletions(-)
---
diff --git a/src/calls-account-row.c b/src/calls-account-row.c
index 7c1db4f5..b86bda0d 100644
--- a/src/calls-account-row.c
+++ b/src/calls-account-row.c
@@ -63,7 +63,6 @@ struct _CallsAccountRow {
/* UI elements */
HdyAvatar *avatar;
GtkSwitch *online_switch;
- GtkButton *edit_btn;
};
G_DEFINE_TYPE (CallsAccountRow, calls_account_row, HDY_TYPE_ACTION_ROW)
@@ -82,17 +81,6 @@ on_account_state_changed (CallsAccountRow *self)
gtk_switch_set_state (self->online_switch, state == CALLS_ACCOUNT_STATE_ONLINE);
}
-static void
-on_edit_clicked (CallsAccountRow *self)
-{
- /** CallsAccountOverview connects to this signal to show
- * the window containing the account providers widget.
- * See calls_account_provider_get_account_widget()
- */
- g_signal_emit (self, signals[EDIT_CLICKED], 0, self->provider, self->account);
-}
-
-
static gboolean
on_online_switched (GtkSwitch *widget,
gboolean online,
@@ -225,9 +213,7 @@ calls_account_row_class_init (CallsAccountRowClass *klass)
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/Calls/ui/account-row.ui");
gtk_widget_class_bind_template_child (widget_class, CallsAccountRow, avatar);
gtk_widget_class_bind_template_child (widget_class, CallsAccountRow, online_switch);
- gtk_widget_class_bind_template_child (widget_class, CallsAccountRow, edit_btn);
- gtk_widget_class_bind_template_callback (widget_class, on_edit_clicked);
gtk_widget_class_bind_template_callback (widget_class, on_online_switched);
}
diff --git a/src/ui/account-overview.ui b/src/ui/account-overview.ui
index f30f3ead..436cca03 100644
--- a/src/ui/account-overview.ui
+++ b/src/ui/account-overview.ui
@@ -73,8 +73,15 @@
<object class="GtkListBox" id="overview">
<property name="visible">True</property>
<property name="selection-mode">none</property>
+ <property name="margin-top">18</property>
+ <property name="margin-bottom">18</property>
+ <property name="margin-start">12</property>
+ <property name="margin-end">12</property>
<!-- placeholder -->
<child type="placeholder"/>
+ <style>
+ <class name="content"/>
+ </style>
</object>
<packing>
<property name="name">overview-page</property>
@@ -90,14 +97,20 @@
</child>
</template>
- <object class="HdyActionRow" id="add_row">
+ <object class="GtkListBoxRow" id="add_row">
<property name="visible">True</property>
- <property name="use-underline">True</property>
- <property name="activatable">True</property>
- <property name="title" translatable="yes">_Add Account</property>
- <signal name="activated" handler="on_add_account_clicked" swapped="yes"/>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Add Account</property>
+ <property name="use-underline">True</property>
+ <property name="margin-top">9</property>
+ <property name="margin-bottom">9</property>
+ </object>
+ </child>
</object>
+
<object class="HdyWindow" id="account_window">
<property name="visible">False</property>
<property name="default-width">380</property>
diff --git a/src/ui/account-row.ui b/src/ui/account-row.ui
index 156d5ed0..6d11133c 100644
--- a/src/ui/account-row.ui
+++ b/src/ui/account-row.ui
@@ -26,15 +26,9 @@
</child>
<child>
- <object class="GtkButton" id="edit_btn">
+ <object class="GtkImage">
<property name="visible">True</property>
- <child>
- <object class="GtkImage">
- <property name="visible">True</property>
- <property name="icon_name">go-next-symbolic</property>
- </object>
- </child>
- <signal name="clicked" handler="on_edit_clicked" swapped="yes"/>
+ <property name="icon_name">go-next-symbolic</property>
</object>
</child>
</template>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]