From a7b7b50c21f6e59b1325143dcbdf8555d4027804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Wed, 19 Apr 2017 16:16:02 +0200 Subject: [PATCH] Replace gtk_misc_set_padding() --- src/YGDialog.cc | 6 +++++- src/ygtksteps.c | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/YGDialog.cc b/src/YGDialog.cc index d811ec1..5ebe1eb 100644 --- a/src/YGDialog.cc +++ b/src/YGDialog.cc @@ -323,7 +323,11 @@ YGDialog::YGDialog (YDialogType dialogType, YDialogColorMode colorMode) gtk_widget_set_halign (icon, GTK_ALIGN_CENTER); gtk_widget_set_valign (icon, GTK_ALIGN_START); - gtk_misc_set_padding (GTK_MISC (icon), 0, 12); + // gtk_misc_set_padding (GTK_MISC (icon), 0, 12); + gtk_widget_set_margin_start (icon, 0); + gtk_widget_set_margin_end (icon, 0); + gtk_widget_set_margin_top (icon, 12); + gtk_widget_set_margin_bottom (icon, 12); gtk_box_pack_start (GTK_BOX (getWidget()), icon, FALSE, FALSE, 12); gtk_box_pack_start (GTK_BOX (getWidget()), m_containee, TRUE, TRUE, 0); diff --git a/src/ygtksteps.c b/src/ygtksteps.c index eefe2e9..292760c 100644 --- a/src/ygtksteps.c +++ b/src/ygtksteps.c @@ -147,7 +147,13 @@ gint ygtk_steps_append (YGtkSteps *steps, const gchar *text) int mark_width = 10; pango_layout_get_pixel_size (steps->check_mark_layout, &mark_width, NULL); - gtk_misc_set_padding (GTK_MISC (label), mark_width+12, 0); + + // gtk_misc_set_padding (GTK_MISC (label), mark_width+12, 0); + gtk_widget_set_margin_start (label, mark_width+12); + gtk_widget_set_margin_end (label, mark_width+12); + gtk_widget_set_margin_top (label, 0); + gtk_widget_set_margin_bottom (label, 0); + gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (steps), label, FALSE, TRUE, 0); return ygtk_steps_total (steps)-1;