<AWT Dev> [9] Review Request: 8151773 [macosx] TrayIcon.imageAutoSize property is ignored

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Wed Mar 23 12:10:14 UTC 2016


On 23.03.16 11:09, Semyon Sadetsky wrote:
>> What do you mean by "by selection of the image dimensions and
>> content"? The user cannot select the size of the resulted image
>> because the image occupy the whole tray and scales if necessary, and
>> the color is defined already as "white rectangle in a blue mount".
> But author of the test can set the size.
> " image occupy the whole tray and scales if necessary"
> That is what need to be tested. It is not a predetermined result, isn't it?

The test creates two images with different size(one image uses size of 
the tray and another image is two times smaller), then the test sets the 
imageAutoSize property. And the test expects that the second image will 
be the same size as the first, because it should rescaled. Currently the 
smaller image appears smaller.

>>
>> The tester will get two icons and he should check that they have same
>> size and have "the same colouring (white rectangle in a blue mount)".
>> I doubt that he will be able to check the size of the image in pixels
>> and the resulted color seems described clearly.
>>
>>>
>>> On 3/15/2016 3:54 AM, Sergey Bylokhov wrote:
>>>> Hello,
>>>> Please review the small fix for jdk9.
>>>>
>>>> According to specification if imageAutoSize property was set to true
>>>> the image should be the stretched or shrunk to fit the tray icon
>>>> space. But on OSX this flag is ignored in the native code.
>>>>
>>>> In the fix this flag is taken into account, if it was set to true.
>>>> otherwise the previous logic is executed:
>>>> - Small images are placed as is.
>>>> - Big images are proportionally down-scaled(I suppose this is done for
>>>> some usability issue)
>>>>
>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8151773
>>>> Webrev can be found at:
>>>> http://cr.openjdk.java.net/~serb/8151773/webrev.00
>>>>
>>>
>>
>>
>


-- 
Best regards, Sergey.


More information about the awt-dev mailing list