[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-user: vertical toolbox in gschem
Hi,
I switched my gschem to have a vertical toolbox on the left, rather
than a horizontal toolbox on the top of the screen.
With wide aspect-ratio screens, this is a better use of display real estate.
Patch attached.
Regards,
Mark
markrages@gmail
--
Mark Rages, Engineer
Midwest Telecine LLC
markrages@xxxxxxxxxxxxxxxxxxx
diff --git a/gschem/src/x_window.c b/gschem/src/x_window.c
index 2ee9f82..cb64301 100644
--- a/gschem/src/x_window.c
+++ b/gschem/src/x_window.c
@@ -246,6 +246,7 @@ void x_window_create_main(GSCHEM_TOPLEVEL *w_current)
GtkWidget *label=NULL;
GtkWidget *main_box=NULL;
+ GtkWidget *mid_box=NULL;
GtkWidget *menubar=NULL;
GtkWidget *drawbox=NULL;
GtkWidget *bottom_box=NULL;
@@ -295,22 +296,27 @@ void x_window_create_main(GSCHEM_TOPLEVEL *w_current)
w_current->menubar = menubar;
gtk_widget_realize (w_current->main_window);
+
+ mid_box = gtk_hbox_new(FALSE, 1);
+ gtk_container_border_width(GTK_CONTAINER(mid_box), 0);
+ gtk_container_add(GTK_CONTAINER(main_box), mid_box);
if (w_current->handleboxes && w_current->toolbars) {
handlebox = gtk_handle_box_new ();
- gtk_box_pack_start (GTK_BOX (main_box), handlebox, FALSE, FALSE, 0);
+ gtk_handle_box_set_handle_position (handlebox, GTK_POS_TOP);
+ gtk_box_pack_start (GTK_BOX (mid_box), handlebox, FALSE, FALSE, 0);
}
-
+
if (w_current->toolbars) {
toolbar = gtk_toolbar_new();
gtk_toolbar_set_orientation (GTK_TOOLBAR(toolbar),
- GTK_ORIENTATION_HORIZONTAL);
+ GTK_ORIENTATION_VERTICAL);
gtk_toolbar_set_style (GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS);
if (w_current->handleboxes) {
gtk_container_add (GTK_CONTAINER (handlebox), toolbar);
} else {
- gtk_box_pack_start(GTK_BOX(main_box), toolbar, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(mid_box), toolbar, FALSE, FALSE, 0);
}
gtk_toolbar_append_item (GTK_TOOLBAR (toolbar),
@@ -410,7 +416,7 @@ void x_window_create_main(GSCHEM_TOPLEVEL *w_current)
drawbox = gtk_hbox_new(FALSE, 0);
gtk_container_border_width(GTK_CONTAINER(drawbox), 0);
- gtk_container_add(GTK_CONTAINER(main_box), drawbox);
+ gtk_container_add(GTK_CONTAINER(mid_box), drawbox);
x_window_create_drawing(drawbox, w_current);
x_window_setup_draw_events(w_current);
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user