PDA

View Full Version : [4.2.1.881]Large menu icon can not resize to show!



andong
30 Jun 2013, 9:41 PM
Before version 4.2, I can use a large icon (48*48) file in the menu item by added an extra css, but now it can not work in version 4.2. I noticed 4.2 have changed the menu icon to background-image mode.

What can I do for the large icon?

slemmon
2 Jul 2013, 2:04 PM
Can you post an example of what you were doing before?

andong
2 Jul 2013, 7:38 PM
Here are some examples.

CSS:

.start-menu-item-icon
{
height: 18px;
width: 18px;
}

JS:


startMenu.add({text: 'Wallpaper', icon: '../image/picture.png', minWidth: 200, margins: '2 0 2 0', iconCls: 'start-menu-item-icon', handler: changeWallPaper});


I use the start-menu-item-icon css to control the menu item's icon size of picture.png, the size of picture.png is 48*48 px. I can do this before version 4.2 and the picture.png is reized to 18*18 px. But the icon can not be showed well at version 4.2, only a part of the icon was showed.

slemmon
3 Jul 2013, 2:24 PM
I see. Looks like you'll have to tinker a bit with the CSS applied to the menu items and possibly the height of the menu item itself to get the layout just like you want.

andong
3 Jul 2013, 5:53 PM
I have added CSS3 property:background-size, but this property is not surportted by all the traditional browser:


.start-menu-item-icon
{
height: 18px;
width: 18px;
background-size: 100%;
}



What's your suggestion? Why changed the menu's img tag to the background-image mode? The background-image mode is hard to control.

The same issue is found in the tree node icon. The best way for the icon is not limit its actual size, the same icon file may be used in different place, so we just need one large size file instead of more size file.

andong
7 Jul 2013, 7:14 PM
Any suggestions?

Gary Schlosberg
22 Aug 2013, 9:24 AM
Bug filed: http://www.sencha.com/forum/showthread.php?270496