comparison gtk3/dw.c @ 1579:245e6bf51317

Fix GTK3 MDI titlebar buttons expanding... or really the label not expanding. The child widget also needs to expand, both directions.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 24 Jan 2012 00:00:36 +0000
parents 36f0cfda3be3
children 525c4c9d04c6
comparison
equal deleted inserted replaced
1578:36f0cfda3be3 1579:245e6bf51317
442 image = gtk_image_new_from_pixbuf(pixbuf); 442 image = gtk_image_new_from_pixbuf(pixbuf);
443 gtk_widget_show(image); 443 gtk_widget_show(image);
444 gtk_container_add (GTK_CONTAINER (button[2]), image); 444 gtk_container_add (GTK_CONTAINER (button[2]), image);
445 445
446 446
447 /* Titlebar and buttons - GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0 */ 447 /* Titlebar and buttons */
448 gtk_widget_set_hexpand(top_event_box, TRUE);
448 gtk_grid_attach (GTK_GRID (grid), top_event_box, 0, 0, 1, 1); 449 gtk_grid_attach (GTK_GRID (grid), top_event_box, 0, 0, 1, 1);
449 gtk_grid_attach (GTK_GRID (grid), button[0], 1, 0, 1, 1); 450 gtk_grid_attach (GTK_GRID (grid), button[0], 1, 0, 1, 1);
450 gtk_grid_attach (GTK_GRID (grid), button[1], 2, 0, 1, 1); 451 gtk_grid_attach (GTK_GRID (grid), button[1], 2, 0, 1, 1);
451 gtk_grid_attach (GTK_GRID (grid), button[2], 3, 0, 1, 1); 452 gtk_grid_attach (GTK_GRID (grid), button[2], 3, 0, 1, 1);
452 453
453 /* Window contents - GTK_EXPAND | GTK_SHRINK | GTK_FILL, GTK_EXPAND | GTK_SHRINK | GTK_FILL */ 454 /* Window contents */
455 gtk_widget_set_hexpand(child_widget_box, TRUE);
456 gtk_widget_set_vexpand(child_widget_box, TRUE);
454 gtk_grid_attach (GTK_GRID (grid), child_widget_box, 0, 1, 4, 1); 457 gtk_grid_attach (GTK_GRID (grid), child_widget_box, 0, 1, 4, 1);
455 458
456 /* Bottom border */ 459 /* Bottom border */
457 gtk_grid_attach (GTK_GRID (grid), bottom_event_box, 4, 2, 1, 1); 460 gtk_grid_attach (GTK_GRID (grid), bottom_event_box, 4, 2, 1, 1);
458 461