summaryrefslogtreecommitdiff
path: root/tests/testframe.c
diff options
context:
space:
mode:
authorDaniel Boles <dboles@src.gnome.org>2018-03-01 19:53:53 +0000
committerDaniel Boles <dboles@src.gnome.org>2018-03-12 14:17:32 +0000
commite4578ca7bff19c690a1215ffbbfbaa7e9ac67203 (patch)
treebd1e3178e5be06054d8489540a15906d02531102 /tests/testframe.c
parent362ef4449c8ef52dc135b92727b3c71f5823119c (diff)
downloadgtk+-e4578ca7bff19c690a1215ffbbfbaa7e9ac67203.tar.gz
Frame: Erase the now-useless property label-yalign
The border is now drawn on the frame node, not using an internal border node, so we are no longer able to align the label to vertically overlap the border. The property no longer performs its original purpose, & nor is it a useful candidate for giving a new role, so no point keeping it. https://bugzilla.gnome.org/show_bug.cgi?id=778886
Diffstat (limited to 'tests/testframe.c')
-rw-r--r--tests/testframe.c33
1 files changed, 3 insertions, 30 deletions
diff --git a/tests/testframe.c b/tests/testframe.c
index d193eed022..f05a85de40 100644
--- a/tests/testframe.c
+++ b/tests/testframe.c
@@ -110,26 +110,11 @@ static void
spin_xalign_cb (GtkSpinButton *spin, GtkFrame *frame)
{
gdouble xalign;
- gfloat yalign;
xalign = double_normalize (gtk_spin_button_get_value (spin));
- gtk_frame_get_label_align (frame, NULL, &yalign);
- gtk_frame_set_label_align (frame, xalign, yalign);
+ gtk_frame_set_label_align (frame, xalign);
}
-#if 0
-static void
-spin_yalign_cb (GtkSpinButton *spin, GtkFrame *frame)
-{
- gdouble yalign;
- gfloat xalign;
-
- yalign = double_normalize (gtk_spin_button_get_value (spin));
- gtk_frame_get_label_align (frame, &xalign, NULL);
- gtk_frame_set_label_align (frame, xalign, yalign);
-}
-#endif
-
static void
draw_border_cb (GtkToggleButton *toggle_button, GtkFrame *frame)
{
@@ -145,7 +130,7 @@ int main (int argc, char **argv)
GtkBox *vbox;
GtkFrame *frame;
GtkGrid *grid;
- gfloat xalign, yalign;
+ gfloat xalign;
gboolean draw_border;
gtk_init ();
@@ -171,7 +156,7 @@ int main (int argc, char **argv)
gtk_grid_set_column_spacing (grid, 6);
gtk_box_pack_start (vbox, GTK_WIDGET (grid));
- gtk_frame_get_label_align (frame, &xalign, &yalign);
+ xalign = gtk_frame_get_label_align (frame);
/* Spin to control :label-xalign */
widget = gtk_label_new ("label xalign:");
@@ -182,18 +167,6 @@ int main (int argc, char **argv)
g_signal_connect (widget, "value-changed", G_CALLBACK (spin_xalign_cb), frame);
gtk_grid_attach (grid, widget, 1, 0, 1, 1);
-/* Frame:label-yalign does nothing since the border node was removed */
-#if 0
- /* Spin to control :label-yalign */
- widget = gtk_label_new ("label yalign:");
- gtk_grid_attach (grid, widget, 0, 1, 1, 1);
-
- widget = gtk_spin_button_new_with_range (0.0, 1.0, 0.1);
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), yalign);
- g_signal_connect (widget, "value-changed", G_CALLBACK (spin_yalign_cb), frame);
- gtk_grid_attach (grid, widget, 1, 1, 1, 1);
-#endif
-
/* Spin to control vertical padding */
widget = gtk_label_new ("vertical padding:");
gtk_grid_attach (grid, widget, 0, 1, 1, 1);