Skip to content

Commit

Permalink
examples: Drop a redundant frame
Browse files Browse the repository at this point in the history
The frame in the drawing example adds nothing
and looks wrong.
  • Loading branch information
Matthias Clasen committed Jun 16, 2021
1 parent 5e99513 commit ece9e7e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions examples/drawing.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ activate (GtkApplication *app,
gpointer user_data)
{
GtkWidget *window;
GtkWidget *frame;
GtkWidget *drawing_area;
GtkGesture *drag;
GtkGesture *press;
Expand All @@ -142,14 +141,11 @@ activate (GtkApplication *app,

g_signal_connect (window, "destroy", G_CALLBACK (close_window), NULL);

frame = gtk_frame_new (NULL);
gtk_window_set_child (GTK_WINDOW (window), frame);

drawing_area = gtk_drawing_area_new ();
/* set a minimum size */
gtk_widget_set_size_request (drawing_area, 100, 100);

gtk_frame_set_child (GTK_FRAME (frame), drawing_area);
gtk_window_set_child (GTK_WINDOW (window), drawing_area);

gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (drawing_area), draw_cb, NULL, NULL);

Expand Down

0 comments on commit ece9e7e

Please sign in to comment.