Hi all, I am getting some visually unpleasing results with the gtk+ 3.6.2 menu functions. In fact, menu appearance seems to have been getting steadily worse since gtk+ 2. ;-( I am using a CentOS 6.3 platform with all of the latest gtk+3-related packages installed (e.g., atk 2.6, cairo 1.12.8, gdk-pixbuf 2.26.5, glib 2.34.2, pango 1.32.3, pixman 0.28).
There are two issues: first, pullright menus (i.e., submenus attached to some menu item within a parent menu) are being rendered with no highlight or shadow around the perimeter of the menu, and second, when I desensitize a menu item to user input via gtk_widget_set_sensitive(), in addition to that menu item's text label being grayed out, I'm also getting an unsightly lighter gray rectangular shape (but darker than the menu background) being drawn beneath the menu item's text label. I don't think I am doing anything unusual in the creation or use of these menus, and can find no documentation which describes any stylistic properties or whatnot that would seem to dictate these behaviors. The item labels are all simple text strings. Menus (and submenus) are created with code such as menu= gtk_menu_new(); Menu items are created and attached to a menu with menuitem= gtk_menu_item_new_with_label(textstring); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); gtk_widget_show(menuitem); If a submenu is involved it is attached to the menu item in question with gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), submenu); I display my top-level popup menus in response to a button-press event with gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, bpevt->button, bpevt->time); According to the documentation the NULL args in the above call are typical usage. I first noticed the pullright menu border problem when switching from gtk+ 2 to gtk+ 3.4, I believe. The top-level popup menu is correctly drawn with a light-colored highlight along its left and top edges, and a dark shadow along its right and lower edges. Both highlight and shadow appear to be about 2 pixels wide. If there is a submenu attached to an item in this menu and I activate that item by mousing over it, the submenu which is then popped up is drawn with no highlighted or shadowed edges. This used to be correctly drawn in my very brief experience with gtk+ 2 before I switched over to gtk+ 3.4, but since then I have never been able to get a submenu to render with a proper border. This is pretty ugly as I am typically popping these menus up over a drawing area widget that has the same background color as the menus, so the submenu's item text labels appear to be just floating in space uncontained by anything. Yesterday I just switched over from 3.4 to 3.6.2 and now I have the new problem with desensitized menu item label rendering as described above, i.e., the menu item text is grayed out as expected but there is also an ugly dark rectangle drawn beneath that text that was not there in 3.4 or before. Can anyone shed any light on these issues? Thanks! Roger Davis Univ. of Hawaii PS: As noted above I am running on CentOS 6.3 (gtk+ 2 default environment) with gtk+ 3 packages separately installed. I have always gotten the following annoying environmental messages displayed at program startup, I don't think these have anything to do with my menu problems, but here they are just for completeness: Gtk-Message: Failed to load module "canberra-gtk-module" Gtk-Message: Failed to load module "pk-gtk-module" GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications. If anyone has any hints on making the above crap go away they would of course be appreciated. Several months ago I tried in vain to get rid of the canberra problem but was unable to find the right combination of packages that would properly configure and install. Sadly, I suppose it's going to be at least CentOS (RedHatEnterprise) 7 before gtk+ 3 becomes the default environment, if then! _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list