diff options
author | Daniel Boles <dboles@src.gnome.org> | 2017-03-06 23:59:17 +0000 |
---|---|---|
committer | Daniel Boles <dboles@src.gnome.org> | 2017-03-07 00:30:24 +0000 |
commit | aaa9ea6e3fef6905ddbbd18c36beaab7044bc41e (patch) | |
tree | 335af38b4cabf29805e760141690e1bdda8e60b1 /tests | |
parent | 2eee3ef79c78cad03fbb25cc5a63c7a4148a1566 (diff) | |
download | gtk+-aaa9ea6e3fef6905ddbbd18c36beaab7044bc41e.tar.gz |
testframe: Simplify initial setting of padding
Just start with both dimensions’ paddings at 0.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testframe.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/tests/testframe.c b/tests/testframe.c index b1e02c491b..b822f27cb3 100644 --- a/tests/testframe.c +++ b/tests/testframe.c @@ -139,8 +139,6 @@ draw_border_cb (GtkToggleButton *toggle_button, GtkFrame *frame) int main (int argc, char **argv) { - GtkStyleContext *context; - GtkBorder pad; GtkWidget *window, *widget; GtkBox *vbox; GtkFrame *frame; @@ -170,12 +168,6 @@ int main (int argc, char **argv) gtk_grid_set_column_spacing (grid, 6); gtk_box_pack_start (vbox, GTK_WIDGET (grid), FALSE, FALSE); - context = gtk_widget_get_style_context (GTK_WIDGET (frame)); - gtk_style_context_save (context); - gtk_style_context_set_state (context, GTK_STATE_FLAG_NORMAL); - gtk_style_context_get_padding (context, &pad); - gtk_style_context_restore (context); - gtk_frame_get_label_align (frame, &xalign, &yalign); /* Spin to control :label-xalign */ @@ -201,8 +193,8 @@ int main (int argc, char **argv) gtk_grid_attach (grid, widget, 0, 2, 1, 1); widget = gtk_spin_button_new_with_range (0, 250, 1); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), pad.top); g_signal_connect (widget, "value-changed", G_CALLBACK (spin_vpadding_cb), frame); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), 0); gtk_grid_attach (grid, widget, 1, 2, 1, 1); /* Spin to control horizontal padding */ @@ -210,8 +202,8 @@ int main (int argc, char **argv) gtk_grid_attach (grid, widget, 0, 3, 1, 1); widget = gtk_spin_button_new_with_range (0, 250, 1); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), pad.left); g_signal_connect (widget, "value-changed", G_CALLBACK (spin_hpadding_cb), frame); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), 0); gtk_grid_attach (grid, widget, 1, 3, 1, 1); /* CheckButton to control whether to draw border */ |