Bug 4654 - Using GtkImageManuItems together with hildon_gtk_menu_new() does not create finger friendly menu items
: Using GtkImageManuItems together with hildon_gtk_menu_new() does not create f...
Status: RESOLVED FIXED
Product: Desktop platform
hildon-widgets
: 5.0-beta
: All Maemo
: Medium normal with 1 vote (vote)
: 5.0-beta2
Assigned To: Alberto Garcia Gonzalez
: hildon-libs-bugs
:
:
:
:
  Show dependency tree
 
Reported: 2009-06-10 21:41 UTC by Cornelius Hald
Modified: 2009-07-14 13:45 UTC (History)
2 users (show)

See Also:


Attachments
Shows a GtkImageMenuItem beeing rendered too small (27.13 KB, image/png)
2009-06-10 21:42 UTC, Cornelius Hald
Details
Shows menu items without images beeing displayed correctly (25.18 KB, image/png)
2009-06-11 08:54 UTC, Cornelius Hald
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description Cornelius Hald (reporter) 2009-06-10 21:41:28 UTC
STEPS TO REPRODUCE THE PROBLEM:
Use the following code to create a popup menu.

GtkWidget *menu = hildon_gtk_menu_new();

GtkWidget *item1 = gtk_image_menu_item_new_from_stock(GTK_STOCK_COPY, NULL);
GtkWidget *item2 = gtk_image_menu_item_new_from_stock(GTK_STOCK_PASTE, NULL);

gtk_menu_shell_append(GTK_MENU_SHELL(menu), item1);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), item2);

gtk_widget_show_all(menu);
gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 0,
gtk_get_current_event_time());


EXPECTED OUTCOME:
The menu items should have big size. Like when using GtkMenuItems instead of
GtkImageMenuItems.

ACTUAL OUTCOME:
The menu items are small. See screenshot.

REPRODUCIBILITY:
always
Comment 1 Cornelius Hald (reporter) 2009-06-10 21:42:41 UTC
Created an attachment (id=1219) [details]
Shows a GtkImageMenuItem beeing rendered too small
Comment 2 Andre Klapper maemo.org 2009-06-11 04:14:19 UTC
So it has a fingerfriendly size when not using icons?
Asking because I don't see any difference in size to the non-icon menu
screenshots in http://maemo.org/development/sdks/maemo_5_examples/ .
Comment 3 Cornelius Hald (reporter) 2009-06-11 08:54:02 UTC
Created an attachment (id=1221) [details]
Shows menu items without images beeing displayed correctly
Comment 4 Cornelius Hald (reporter) 2009-06-11 08:56:25 UTC
> So it has a fingerfriendly size when not using icons?

Exactly. I created another screenshot which is showing this.

> Asking because I don't see any difference in size to the non-icon menu
> screenshots in http://maemo.org/development/sdks/maemo_5_examples/ .

Those screenshots are old and IMO quite useless.
Comment 5 Alberto Garcia Gonzalez 2009-06-11 12:09:02 UTC
I'll take a look
Comment 6 Alberto Garcia Gonzalez 2009-06-11 12:28:37 UTC
This bug has already been fixed internally.

Cornelius, if you want to see how it looks, edit the gtkrc file under
/usr/share/themes/, look for this line:

widget "*.hildon-context-sensitive-menu.GtkMenuItem" style "fremantle-menuitem"

and add this one after that:

widget "*.hildon-context-sensitive-menu.GtkImageMenuItem" style
"fremantle-menuitem"
Comment 7 Cornelius Hald (reporter) 2009-06-11 12:32:16 UTC
> Cornelius, if you want to see how it looks, edit the gtkrc file under
> /usr/share/themes/, look for this line:
> 
> widget "*.hildon-context-sensitive-menu.GtkMenuItem" style "fremantle-menuitem"
> 
> and add this one after that:
> 
> widget "*.hildon-context-sensitive-menu.GtkImageMenuItem" style
> "fremantle-menuitem"

I'll try it. Thank you!
Comment 8 Alberto Garcia Gonzalez 2009-06-11 12:46:49 UTC
(setting TM to Fremantle)
Comment 9 Andre Klapper maemo.org 2009-07-14 13:45:47 UTC
Fix should be included in Fremantle SDK beta 2 hence updating Target Milestone.
If you are the reporter of this bug: Feel free to verify the fix if possible.