adjustments in the space page

This commit is contained in:
Jean Sirmai 2024-04-30 13:06:46 +02:00
parent 9c0c44f8bd
commit feb8fd2ecf
Signed by: jean
GPG Key ID: FB3115C340E057E3
3 changed files with 26 additions and 14 deletions

BIN
exec.o

Binary file not shown.

38
hot.c
View File

@ -8,27 +8,39 @@ GtkWidget *get_space_page_new(){
GtkWidget *space_grid = gtk_grid_new(); GtkWidget *space_grid = gtk_grid_new();
GtkScrolledWindow *scrolled = GTK_SCROLLED_WINDOW(gtk_scrolled_window_new()); GtkScrolledWindow *scrolled = GTK_SCROLLED_WINDOW(gtk_scrolled_window_new());
gtk_scrolled_window_set_min_content_width (scrolled, 650); gtk_scrolled_window_set_min_content_width (scrolled, 600);
gtk_scrolled_window_set_min_content_height (scrolled, 600); gtk_scrolled_window_set_min_content_height (scrolled, 600);
GtkAdjustment *width = gtk_adjustment_new (600, 300, 1000, 1, 1, 1000); GtkAdjustment *width = gtk_adjustment_new (600, 300, 1000, 1, 1, 1000);
GtkAdjustment *height = gtk_adjustment_new (600, 300, 1000, 1, 1, 1000); GtkAdjustment *height = gtk_adjustment_new (600, 300, 1000, 1, 1, 1000);
// (value, lower, upper, step_increment, page_increment, page_size) // (value, lower, upper, step_increment, page_increment, page_size)
GtkWidget *viewport = gtk_viewport_new (width, height); GtkWidget *viewport = gtk_viewport_new (width, height);
gtk_scrolled_window_set_child (scrolled, viewport); gtk_scrolled_window_set_child (scrolled, viewport);
gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(scrolled), 0, 0, 1, 1);
GtkBox *controls_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0)); // spacing = 2
gtk_box_append (controls_box, gtk_button_new_with_label ("RUN / STOP"));
gtk_box_append (controls_box, gtk_button_new_with_label ("slow down / speed up"));
gtk_box_append (controls_box, gtk_button_new_with_label ("step by step"));
gtk_box_append (controls_box, gtk_button_new_with_label ("buffer"));
GtkBox *XYZ_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2)); // spacing = 2 GtkBox *XYZ_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2)); // spacing = 2
// GtkWidget *X_bar = gtk_action_bar_new(); gtk_action_bar_set_revealed (GTK_ACTION_BAR(X_bar), TRUE); // GtkWidget *scale_X = gtk_scale_button_new (0, 360, 10, NULL); < à étudier
// GtkWidget* X_reveal = gtk_revealer_new (); gtk_revealer_set_child (X_reveal, X_bar); // (double min, double max, double step, const char** icons)
// gtk_box_append (XYZ_box, X_bar); GtkAdjustment *X_adjust = gtk_adjustment_new (0, 0, 380, 10, 0, 0);
gtk_box_append (XYZ_box, gtk_button_new_with_label ("X")); GtkAdjustment *Y_adjust = gtk_adjustment_new (0, 0, 380, 10, 0, 0);
gtk_box_append (XYZ_box, gtk_button_new_with_label ("Y")); GtkAdjustment *Z_adjust = gtk_adjustment_new (0, 0, 380, 10, 0, 0);
gtk_box_append (XYZ_box, gtk_button_new_with_label ("Z")); GtkWidget *scroll_X = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, X_adjust);
gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(XYZ_box), 1, 0, 1, 1); GtkWidget *scroll_Y = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, Y_adjust);
GtkWidget *scroll_Z = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, Z_adjust);
gtk_grid_attach (GTK_GRID(space_grid), gtk_button_new_with_label ("RUN / STOP (all that stuff...)"), 0, 1, 2, 1); gtk_box_append (XYZ_box, scroll_X);
gtk_grid_attach (GTK_GRID(space_grid), gtk_button_new_with_label ("Objects / Situations (transparences, style)"), 0, 2, 2, 1); gtk_box_append (XYZ_box, scroll_Y);
gtk_grid_attach (GTK_GRID(space_grid), gtk_button_new_with_label ("zoom,...\n+/- grid"), 1, 1, 2, 3); gtk_box_append (XYZ_box, scroll_Z);
gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(scrolled), 0, 0, 2, 1);
gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(controls_box), 0, 1, 1, 1);
gtk_grid_attach (GTK_GRID(space_grid), gtk_button_new_with_label ("Objects / Situations (transparences, styles)"), 0, 2, 1, 1);
gtk_grid_attach (GTK_GRID(space_grid), gtk_button_new_with_label ("zoom, +/- grid,\npresentation,\nstyles,..."), 1, 1, 1, 2);
gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(XYZ_box), 2, 0, 1, 3);
return space_grid; return space_grid;
} }

2
warm.c
View File

@ -46,7 +46,7 @@ GtkWidget *get_rules_page_new(){
gtk_paned_set_start_child (GTK_PANED(hpaned), GTK_WIDGET (frame1)); gtk_paned_set_start_child (GTK_PANED(hpaned), GTK_WIDGET (frame1));
gtk_paned_set_end_child (GTK_PANED(hpaned), GTK_WIDGET (frame2)); gtk_paned_set_end_child (GTK_PANED(hpaned), GTK_WIDGET (frame2));
gtk_widget_set_size_request (hpaned, 800, 600); gtk_widget_set_size_request (hpaned, 600, 600);
gtk_widget_set_size_request (frame1, 300, 0); // < utile seulement pour la largeur min/max gtk_widget_set_size_request (frame1, 300, 0); // < utile seulement pour la largeur min/max
// gtk_widget_set_size_request (frame2, 50, 100); // gtk_widget_set_size_request (frame2, 50, 100);