It is currently May 19th, 2024, 12:23 pm

[Bug?] Blank SolidColor= makes meters have white background

Report bugs with the Rainmeter application and suggest features.
User avatar
killall-q
Posts: 305
Joined: August 14th, 2009, 8:04 am

[Bug?] Blank SolidColor= makes meters have white background

Post by killall-q »

The documentation says that SolidColor/SolidColor2 default to 0,0,0,0. Yet, when either SolidColor or SolidColor2 are set to blank, they become 255,255,255,255.

Code: Select all

[Meter]
Meter=Image
W=100
H=100

; Test 1
SolidColor=

; Test 2
; SolidColor=
; SolidColor2=

; Test 3
; SolidColor=FF00FF
; SolidColor2=

; Test 4
; SolidColor=
; SolidColor2=FF00FF
Last edited by killall-q on October 9th, 2022, 6:10 pm, edited 1 time in total.
User avatar
Brian
Developer
Posts: 2695
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: [Bug?] Blank SolidColor= makes meters have white background

Post by Brian »

Thanks for the bug report. This should be fixed for the next release.

This issue has been around for a very long time, maybe from the beginning. It also affected every color option (not just SolidColor). The issue is tricky since Rainmeter parses things differently depending on if the "option exists" versus the "option exists, but is empty". To the user, both of those should result in the same "default" setting. But in this case, colors are parsed a little differently mainly because each color channel is defaulted to 255. I believe the original thought was each color channel needed to be "something" rather than "nothing". Especially for the alpha color channel. If that defaulted to 0, no color would show at all.

Anyway, the fix was simple. Before going to the color parser, we simply check if the option is empty and return the default value.

-Brian