ComboBox submenus



My ComboBox submenus are working fine. There are however a couple of visual details that could be improved, in my opinion.

I am sending as attachement a small (70 lines) working example (C + makefile) showing my points:

1) Submenus should look the same in ComboBox and Popup menus. Therefore Main 1 and Main 2 (see working example or tree store below) should not appear repeated again in the submenus. Even if they were there, they should not be selectable as they are only entry points to submenus. The workaround I know is: when users select Main 1 or Main 2, just select a sensible default instead, such as the first main item, the last chosen item, the first item in the submenu.

2) All pop up menus should have the same width. Currently this deppends entirely of the size of the label strings. The submenus for Main 1 and Main 2 have entirely different widths, and I think this looks unprofessional. The workaround I know is: add whitespaces at the end of the label strings.

3) The main menu has a large space between the labels and the submenu arrows, I guess this is probably related with accelerators (which I am not using here) but it looks a bit ugly. I don't know any workaround for this. Pop up menus have the same issue.

I am planning to fill a bug report about this. If someone can prove me wrong or knows a solution for any of the three points discussed above, I would be glad to know.

Thanks!
Carlos

store = gtk_tree_store_new (1, G_TYPE_STRING);
gtk_tree_store_append (store, &iter, NULL);
gtk_tree_store_set (store, &iter, 0, "Main 0", -1);

gtk_tree_store_append (store, &iter, NULL);
gtk_tree_store_set (store, &iter, 0, "Main 1", -1);
gtk_tree_store_append (store, &child, &iter);
gtk_tree_store_set (store, &child, 0, "Short 1:0", -1);
gtk_tree_store_append (store, &child, &iter);
gtk_tree_store_set (store, &child, 0, "Short 1:1", -1);
gtk_tree_store_append (store, &child, &iter);
gtk_tree_store_set (store, &child, 0, "Short 1:2", -1);

gtk_tree_store_append (store, &iter, NULL);
gtk_tree_store_set (store, &iter, 0, "Main 2", -1);
gtk_tree_store_append (store, &child, &iter);
gtk_tree_store_set (store, &child, 0, "Very very long 2:0", -1);
gtk_tree_store_append (store, &child, &iter);
gtk_tree_store_set (store, &child, 0, "Very very long 2:1", -1);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]