]> err.no Git - mapper/commitdiff
Cosmetic changes to UI
authorKaj-Michael Lang <milang@onion.tal.org>
Thu, 18 Oct 2007 16:23:28 +0000 (19:23 +0300)
committerKaj-Michael Lang <milang@onion.tal.org>
Thu, 18 Oct 2007 16:23:28 +0000 (19:23 +0300)
src/ui-common.c

index da1a9baa93c6431f17a604fb48b9d6f7a1e743b7..dfaf65a3c4c38187d8a316fa880557a7761c179f 100644 (file)
@@ -531,17 +531,6 @@ _menu_map = menu;
 #endif
 }
 
-static void 
-toolbar_progress_init(void)
-{
-GtkToolItem *item;
-
-item=gtk_tool_item_new();
-_progress_item=gtk_progress_bar_new();
-gtk_container_add(item, _progress_item);
-gtk_toolbar_insert(GTK_TOOLBAR (toolbar), item, -1);
-}
-
 void 
 mapper_init_variables(void)
 {
@@ -643,6 +632,7 @@ GtkWidget *gpsvbox, *headingvbox;
 GtkNotebook *notebook;
 GdkColor color;
 GError *error = NULL;
+GtkToolItem *item;
 
 #ifdef WITH_HILDON
 /* Initialize _program. */
@@ -690,7 +680,12 @@ g_assert(menu_bar);
 
 toolbar = gtk_ui_manager_get_widget (ui, "/ToolBar");
 g_assert(toolbar);
-toolbar_progress_init();
+
+item=gtk_tool_item_new();
+_progress_item=gtk_progress_bar_new();
+gtk_tool_item_set_expand(item, TRUE);
+gtk_container_add(item, _progress_item);
+gtk_toolbar_insert(GTK_TOOLBAR(toolbar), item, -1);
 
 /* Notebook with different views */
 notebook = gtk_notebook_new();
@@ -700,20 +695,28 @@ info_banner.container=gtk_hbox_new(FALSE, 0);
 info_banner.location=gtk_label_new("");
 info_banner.speed=gtk_label_new("");
 info_banner.distance=gtk_label_new("");
+
 gtk_label_set_max_width_chars(GTK_LABEL(info_banner.speed), 10);
 gtk_label_set_width_chars(GTK_LABEL(info_banner.speed), 14);
-gtk_box_pack_start(GTK_BOX(info_banner.container), info_banner.speed, FALSE, FALSE, 0);
+gtk_label_set_max_width_chars(GTK_LABEL(info_banner.distance), 14);
+gtk_label_set_width_chars(GTK_LABEL(info_banner.distance), 18);
+
+gtk_misc_set_alignment(GTK_MISC(info_banner.location), 0.f, 0.5f);
+gtk_misc_set_alignment(GTK_MISC(info_banner.speed), 1.f, 0.5f);
+gtk_misc_set_alignment(GTK_MISC(info_banner.distance), 1.f, 0.5f);
+
 gtk_box_pack_start(GTK_BOX(info_banner.container), info_banner.location, TRUE, TRUE, 0);
-gtk_box_pack_start(GTK_BOX(info_banner.container), info_banner.distance, FALSE, FALSE, 0);
+gtk_box_pack_end(GTK_BOX(info_banner.container), info_banner.speed, FALSE, FALSE, 0);
+gtk_box_pack_end(GTK_BOX(info_banner.container), info_banner.distance, FALSE, FALSE, 0);
 
 vbox_main = gtk_vbox_new(FALSE, 0);
 gtk_container_add(GTK_CONTAINER(_window), vbox_main);
 
 #ifdef WITH_HILDON
 /* Create and add widgets and supporting data. */
-gtk_box_pack_start(GTK_BOX(vbox_main), notebook, TRUE, TRUE, 0);
-gtk_box_pack_start(GTK_BOX(vbox_main), info_banner.container, FALSE, FALSE, 0);
-hildon_program_set_common_toolbar(_program, toolbar);
+gtk_box_pack_start(GTK_BOX(vbox_main), GTK_WIDGET(notebook), TRUE, TRUE, 0);
+gtk_box_pack_start(GTK_BOX(vbox_main), GTK_WIDGET(info_banner.container), FALSE, FALSE, 0);
+hildon_program_set_common_toolbar(_program, GTK_TOOLBAR(toolbar));
 {
        GtkMenu *hmenu;
        hmenu = GTK_MENU(gtk_menu_new());