[Xfce4-commits] [panel-plugins/xfce4-datetime-plugin] 01/01: Further improve spacing
noreply at xfce.org
noreply at xfce.org
Thu Apr 25 02:25:14 CEST 2019
This is an automated email from the git hooks/post-receive script.
b l u e s a b r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository panel-plugins/xfce4-datetime-plugin.
commit b085d6d32e07af138f4090adeb82199f824920ca
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Wed Apr 24 20:25:08 2019 -0400
Further improve spacing
---
panel-plugin/datetime-dialog.c | 32 +++++++++++++++++++++++---------
1 file changed, 23 insertions(+), 9 deletions(-)
diff --git a/panel-plugin/datetime-dialog.c b/panel-plugin/datetime-dialog.c
index 22552a1..d78f3b1 100644
--- a/panel-plugin/datetime-dialog.c
+++ b/panel-plugin/datetime-dialog.c
@@ -323,6 +323,26 @@ datetime_dialog_response(GtkWidget *dlg, int response, t_datetime *dt)
}
}
+static GtkWidget *
+get_frame_box (const gchar *label,
+ GtkWidget **container_return)
+{
+ GtkWidget *bin;
+ GtkWidget *frame;
+
+ frame = xfce_gtk_frame_box_new(label, &bin);
+ gtk_widget_set_margin_top(GTK_WIDGET(bin), 6);
+ gtk_widget_set_margin_start(GTK_WIDGET(bin), 0);
+
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ gtk_alignment_set_padding(GTK_ALIGNMENT(bin), 0, 0, 12, 0);
+ G_GNUC_END_IGNORE_DEPRECATIONS
+
+ *container_return = bin;
+
+ return frame;
+}
+
/*
* show datetime properties dialog
*/
@@ -369,9 +389,7 @@ datetime_properties_dialog(XfcePanelPlugin *plugin, t_datetime * datetime)
/*
* layout frame
*/
- frame = xfce_gtk_frame_box_new(_("Layout"), &bin);
- gtk_widget_set_margin_top(GTK_WIDGET (bin), 6);
- gtk_widget_set_margin_start(GTK_WIDGET (bin), 12);
+ frame = get_frame_box(_("Layout"), &bin);
gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dlg))), frame,
FALSE, FALSE, 0);
@@ -404,9 +422,7 @@ datetime_properties_dialog(XfcePanelPlugin *plugin, t_datetime * datetime)
/*
* Date frame
*/
- datetime->date_frame = xfce_gtk_frame_box_new(_("Date"), &bin);
- gtk_widget_set_margin_top(GTK_WIDGET (bin), 6);
- gtk_widget_set_margin_start(GTK_WIDGET (bin), 12);
+ datetime->date_frame = get_frame_box(_("Date"), &bin);
gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dlg))), datetime->date_frame,
FALSE, FALSE, 0);
@@ -503,9 +519,7 @@ datetime_properties_dialog(XfcePanelPlugin *plugin, t_datetime * datetime)
/*
* time frame
*/
- datetime->time_frame = xfce_gtk_frame_box_new(_("Time"), &bin);
- gtk_widget_set_margin_top(GTK_WIDGET (bin), 6);
- gtk_widget_set_margin_start(GTK_WIDGET (bin), 12);
+ datetime->time_frame = get_frame_box(_("Time"), &bin);
gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dlg))), datetime->time_frame,
FALSE, FALSE, 0);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list