It is currently August 8th, 2020, 9:01 am

Bugs with stringalign?

Report bugs with the Rainmeter application and suggest features.
User avatar
Brian
Developer
Posts: 2044
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Bugs with stringalign?

Post by Brian »

Yincognito wrote:
May 8th, 2020, 7:43 pm
What could be the cause of that? Some rounding thing maybe? Is this the expected behavior? If not, could it be fixed or it's just something that I missed and everything should behave correctly otherwise?
This is more than likely a rounding issue when calculating the size of the meter (since no W or H is given on the string meter). If you put W=1100 on the Text meter, the movement stops.

I am not sure there is much we can due since D2D likes to work with DPI (device independent pixels), meaning fractional pixels which then get aliased by the GPU and converted to the device as "whole" pixels. We eventually want to work more with DPI's in our meters, so I am not sure we want to mess with this now.

-brian
User avatar
Yincognito
Posts: 2195
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Bugs with stringalign?

Post by Yincognito »

Brian wrote:
May 8th, 2020, 7:59 pm
This is more than likely a rounding issue when calculating the size of the meter (since no W or H is given on the string meter). If you put W=1100 on the Text meter, the movement stops.
Ah, yes - didn't thought of setting the W value (although I remember using this trick over the years). I only tried setting X and Y to hardcoded values and it didn't change anything. Thanks for pointing this out. :thumbup:
Brian wrote:
May 8th, 2020, 7:59 pm
I am not sure there is much we can due since D2D likes to work with DPI (device independent pixels), meaning fractional pixels which then get aliased by the GPU and converted to the device as "whole" pixels. We eventually want to work more with DPI's in our meters, so I am not sure we want to mess with this now.

-brian
Makes sense - no point in tweaking an "old" approach if you're going to adopt a "new" one anyway, eventually.