Bugzilla – Bug 455927
StatusBarPanel: Icon has wrong image size
Last modified: 2009-03-04 23:50:36 UTC
PROBLEM STATEMENT: StatusBarPanel3 with Icon property which can display image in statusbar, but in accerciser, under "Image" tab, Size shows "53x22", I think that is the size of panel not the size of icon, in this example the icon's size is "32x32" REPRO: 1. run accerciser 2. run uia2atk/test/samples/statusbarpanel.py 3. in accerciser left tree, select last item "icon" with "panel" role name under statusbar, which is statusbarpanel3 with Icon property 4. see "Image" under "interface viewer" RESULTS: under "Image" tab, Size shows 53x22 that is the same as the Size showing under "Component" EXPECTED RESULTS: I think in Image tab under "interface viewer", the Size should shows icon's exact size, here in the example the icon's size is "32*32", in Component tab, the Size should shows panel's size
the test due 12/03, i give it P1 priority. thanks!
Working on this. :-)
In r120596 of UIAutomationWinforms, the size is fixed, but I need to spend some time still on the position. Is position important to your tests?
Well, closing this bug, as it's about size, not position. :-) But still I'll fix position today.
Hi Sandy, there is still a problem about size, I updated my example(samples/statusbarpanel.py) that panel1 with 16x16 size icon, panel2 with 48x48 size icon, panel3 still with 32x32 size icon. panel1 and panel3 now can get correct size showing in Image tab, but panel2(48x48) also shows 32x32 size, seems 32x32 is the maximum size for icon to show. please take look again, thanks! also thanks you are working on position issue although is hard for me to test because I am not sure the expected position(x,y) :(
My position fix wasn't entirely ready, but I committed in r120690 (UIAutomationWinforms) anyway. It works great for default alignment but if you do this, for example... self.statusbarpanel3.Alignment = HorizontalAlignment.Right ...the positioning will be off by several pixels. As for the size, well, it looks like 32x32 is the maximum icon size. If I add this line to your test... print self.statusbarpanel2.Icon.Width ...it prints "32". So to summarize: 1) 32x32 is the maximum icon size for some reason, and 2) If you don't change the alignment, positioning should now work fine. Closing bug again...but please feel free to re-open if I'm missing something else! Thanks for your thorough testing.
Sandy, sorry i reopen it again, because after I update to r120699 it's too difficult to select panel items under "status bar" roll from accerciser left tree , seems the fix affect performance, please take a look, thanks :)
Calen, you are correct. It is not consistent so I did not catch it in my tests, but I do see what the problem is, and I am working to solve it.
(In reply to comment #7 from calen chen) > Sandy, sorry i reopen it again, because after I update to r120699 it's too > difficult to select panel items under "status bar" roll from accerciser left > tree , seems the fix affect performance, please take a look, thanks :) > it's not performance problem, I just noticed if you select label items under "status bar" in accerciser left tree, you should move your mouse through application GUI window, then the label item would be selected. I didn't found any answer from MSDN why icon's maximum size is 32x32, do you think it is our program's bug?
(In reply to comment #9 from calen chen) > it's not performance problem, I just noticed if you select label items under > "status bar" in accerciser left tree, you should move your mouse through > application GUI window, then the label item would be selected. Yes, I know, it is hanging on my call to CreateGraphics, though that is supposed to be thread-safe. > I didn't found any answer from MSDN why icon's maximum size is 32x32, do you > think it is our program's bug? MSDN says it's a system-determined size, so I don't really know. The weird thing to me is that all of the icons appear to be the exact same size to me anyway (16x16) in the actual GUI.
Fixed in r120726 of UIAutomationWinforms, as far as I can tell.
Closed in trunk r121400. when I used Eye of GNOME application to view statusbarpanel2's warn.icon I got 48x48 size showing, so I misunderstand the icon is 48x48 pixel. in face the icon is 32x32 pixel showing in Vista and checking by "#file warn.icon". I updated an actual 48x48 pixel icon for statusbarpanel example.
Reopened in mono-uia-127318-257 uiaatkbridge-127363-584 uiautomationwinforms-127335-609: All images is showing with wrong (-1x-1) size in accerciser. the exactly size should be (16x16)(48x48)(32x32)
Reducing priority as it's only an image size issue.