It is currently April 18th, 2024, 11:46 pm

Image with dynamic position change

Get help with creating, editing & fixing problems with skins
User avatar
xenium
Posts: 865
Joined: January 4th, 2018, 9:52 pm

Re: Image with dynamic position change

Post by xenium »

eclectic-tech wrote:Are you sure you used all of my posted code? :x
Running it on my system works exactly as you requested...
The images are on the same line as the data values and will move vertically when any of them are not available.
On my system, the value of the humidity, is displayed over the dewpoint value :???:
Capture.PNG
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Image with dynamic position change

Post by balala »

jsmorley wrote:Do be sure to use DynamicVariables=1 on meters using [SectionVariables].
I didn't mention this, because the option was already added.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Image with dynamic position change

Post by balala »

xenium wrote:It works!
I'm glad.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5391
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Image with dynamic position change

Post by eclectic-tech »

xenium wrote:On my system, the value of the humidity, is displayed over the dewpoint value :???:
Capture.PNG
Hmm... I would check that the Humidity meters are positioned vertically relative to the previous meter. As I showed, it does not do that on my system.

Humidity Meter Group

Code: Select all

[MeterHumidity]
Meter=String
MeasureName=MeasureHumidity
X=80
Y=0R
W=270
H=30
FontSize=10
FontColor=250,250,250,250
StringStyle=Normal
StringEffect=SHADOW
FontFace=arial
StringAlign=Left
FontEffectColor=0,0,0,80
AntiAlias=1
ClipString=1
Group=Humidity


[MeterColorHumidity]
Meter=Image
ImageName=#@#image\[MeasureColorHumidity].png
X=220
Y=r
DynamicVariables=1
Group=Humidity


If it still does not work for you, please post your current code.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Image with dynamic position change

Post by balala »

eclectic-tech wrote:If it still does not work for you, please post your current code.
I don't think it would be needed.
The problem occurs when one image is hidden, but both String meters (the previous and the next) are shown. In this case, because the position of the second String meter is Y=0R and the previous Image meter is hidden (and in this case its size is set to 0), the vertical position of the String meter coincide with the vertical position of the 0 sized Image meter. The position of this one is (almost) the same as the position of the previous String meter (being positioned to Y=r)
Eg, when the image dew point image is hidden, the next String meter ([MeterHumidity]) is positioned at almost the same position as [MeterDewpoint], because the vertical position of the [MeterHumidity] meter is set to Y=0R, relatively to the previous meter ([MeterColorDewpoint]). But if this one is hidden, its size is 0, so the vertical position of the [MeterHumidity] meter (almost) coincide with the position of [MeterDewpoint]. That's why they have the same position. Once the [MeterColorDewpoint] appears, the [MeterDewpoint] will be pushed down below, getting the appropriate position.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5391
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Image with dynamic position change

Post by eclectic-tech »

:17oops Your solution to use the section variable of the previous data (not image) is the way to go. Thanks for correcting me, again.

Change [MeterDewPoint] Y value to Y=([MeterFeelsLike:Y]+[MeterFeelsLike:H])
Change [MeterHumidity] Y value to Y=([MeterDewpoint:Y]+[MeterDewpoint:H])

And make sure DynamicVariables=1 is added to both meters.

Apologies, I made a lot of changes to your original code, and in the process overlooked this property.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Image with dynamic position change

Post by balala »

eclectic-tech wrote:Apologies, I made a lot of changes to your original code, and in the process overlooked this property.
I think it doesn't matter, it happens to everyone, sometimes.