Winstep Forums
http://forums.winstep.net/phpBB2/

Recycle Bin & Mail Desktop Module strange color behavior
http://forums.winstep.net/phpBB2/viewtopic.php?f=2&t=10760
Page 1 of 1

Author:  vectornut [ Sat Jul 21, 2018 8:37 am ]
Post subject:  Recycle Bin & Mail Desktop Module strange color behavior

Jorge, I've noticed that with my current theme (T-TEK 4D), the Recycle Bin and Mail modules aren't responding the same way to color changes as the rest of the modules. I've attached a screenshot. Any idea why?

Attachments:
Mail & Trash Don't Change Color.png
Mail & Trash Don't Change Color.png [ 319.32 KiB | Viewed 11857 times ]

Author:  winstep [ Sat Jul 21, 2018 1:45 pm ]
Post subject:  Re: Recycle Bin & Mail Desktop Module strange color behavior

Yes.

While the 'icons' in all other modules are static and part of the background image, the Email Checker and Recycler modules in KTEK-4D are set to use actual module icons (which are dynamic and change accordingly to the current state of the Recycle Bin/Number of messages pending retrieval.

So, while the desktop module background is colorized, the module icons are not.

Furthermore, because the module background is static, it only needs to be colorized once, when it is created in memory. From then on, any changes to the module contents (text, etc) will use the pre-colorized background bitmap.

Because actual module icons are dynamic, they cannot be pre-colorized. This means they must be re-colorized every time there is a change to the desktop module. This can present two problems, especially in the case of the Email Checker module icon:

First, if you are using the Hue Shift colorization method instead of the simpler Tint, the dominant color of the icon must be re-calculated every time there is a change in the desktop module. Because this implies scanning the actual bitmap, it is a time consuming operation, therefore you start running into performance issues if the module/icon is constantly being updated (as it would be the case of the animated rotating earth style).

Second, the Hue Shift method works by finding the dominant color in the affected bitmap and then shifting all colors in relation to that. The problem here is that if you are displaying the number of messages in the *red* badge at the bottom of the icon, RED is the actual dominant color. That's what gets colorized according to the tint color, and not the rest of the bitmap.

Anyway, I think I might have a way to work around these issues.

Author:  winstep [ Sat Jul 21, 2018 3:18 pm ]
Post subject:  Re: Recycle Bin & Mail Desktop Module strange color behavior

Ok, 'fixed' it.

Colorization is now also applied to the Email and Recycler icons.

Author:  vectornut [ Sat Jul 21, 2018 5:32 pm ]
Post subject:  Re: Recycle Bin & Mail Desktop Module strange color behavior

winstep wrote:
Ok, 'fixed' it.

Colorization is now also applied to the Email and Recycler icons.

Jorge, you are incredible sometimes. Thank you.

Author:  winstep [ Sat Jul 21, 2018 6:40 pm ]
Post subject:  Re: Recycle Bin & Mail Desktop Module strange color behavior

'Only' sometimes? :wink:

Author:  vectornut [ Sat Aug 11, 2018 7:54 pm ]
Post subject:  Re: Recycle Bin & Mail Desktop Module strange color behavior

winstep wrote:
'Only' sometimes? :wink:

Sometimes you have to sleep. :mrgreen:

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/