From 4157c93edf391a9f87f06bc3a078ec11c94a2848 Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Mon, 22 Apr 2024 20:00:37 +0200 Subject: [PATCH] une grille pour plusieurs boutons (mini commit) --- exec | Bin 16272 -> 16272 bytes main.c | 18 ++++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/exec b/exec index 5058b60da71d4dc867b4a4fd47d800f3c277a522..bc4e8b45263d43de42c475d818e526326d7c9d36 100755 GIT binary patch delta 242 zcmbPGKcRku10!b*BLf)JZ1!Z-XB3Q3fN&!e9Kei-&7DjZf{dn<4+(E%w4YoeqR!~Q zd5*{wZkE8(%#z7=3M#gY(#+O2K*el8eB%B8|1*H}ix2<*M*wMwkN^L-0O@l;`T&sr z1f(ATX|^x_|1*GWo;+7UnXzN?K?QBm9-tnmV;EF`QU*Y*F_}?Oor&$^WGzKGMy|=8 zit>#AHfJgx=bn6kiDR>YZUhS>(1nJ}xfmlR8`|h|!ks-i)5e^02GkQXHm|gK&IAAh C=SFJ) delta 275 zcmbPGKcRku10!b(BLf(;Z1!Z-XB13PfN)b39Kei}&7DjZf{gZ)4+(E%^qgEGqRtq( zd5*{wZaxJN2rSJk0W&6>D5zL7Ffd9pTU!7%vH|g)_y7M-0n&Fq{Qn;Uq8Vwz5}Fxeg6Od&*Xy&l9Sgda4|Ma-l?E1+5*%Abr^#RP>lf)D@^{Wpsx52 zC<78~|3nS1AhReAalO`M5 Y=ySsTH96D9oO1!xmkTzpw0X`10AP+!H~;_u diff --git a/main.c b/main.c index 9b1ec91..e60d282 100755 --- a/main.c +++ b/main.c @@ -1,3 +1,17 @@ +/* GtkBox GtkGrid GtkRevealer GtkStack + * GtkOverlay GtkPaned GtkExpander GtkFixed */ + +/* box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); + gtk_widget_set_halign (box, GTK_ALIGN_FILL); + gtk_widget_set_valign (box, GTK_ALIGN_CENTER); * START CENTER END FILL * + gtk_window_set_child (GTK_WINDOW (window), box); + puis, après déclaration du bouton, gtk_box_append (GTK_BOX (box), button); */ + +/* grid = gtk_grid_new (); + gtk_window_set_child (GTK_WINDOW (window), grid); + button = gtk_button_new_with_label (" I "); n fois + gtk_grid_attach (GTK_GRID (grid), button, 0, 0, 1, 1); n fois */ + #include static void print (GtkWidget *widget, gpointer data) {g_print (data);} @@ -10,8 +24,8 @@ static void activate (GtkApplication *app, gpointer user_data) { window = gtk_application_window_new (app); gtk_window_set_title (GTK_WINDOW (window), "Window"); - grid = gtk_grid_new (); - gtk_window_set_child (GTK_WINDOW (window), grid); + grid = gtk_grid_new (); + gtk_window_set_child (GTK_WINDOW (window), grid); button = gtk_button_new_with_label (" I "); g_signal_connect (button, "clicked", G_CALLBACK (print), "I'm n°1\n");