It is currently April 26th, 2024, 8:36 am

How do I resize UI White's Clock?

Get help with creating, editing & fixing problems with skins
RANDOMDUDE
Posts: 4
Joined: June 30th, 2019, 12:38 am

How do I resize UI White's Clock?

Post by RANDOMDUDE »

I've been trying to change the width and height of the clock but then they just disappear. How do I make them 5 times bigger? Here is the skin: https://visualskins.com/media/p/645/ui-white.rmskin

Code: Select all

[Rainmeter]
Update=1000
[Metadata]
Author=DD.921 (???)
Version=1.3f
Description=[EN]Displays time / [FR]Affiche l'heure / [ES]Muestra la hora
Instructions=/!\ The skin is a modified version of the original skin that is ???

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VARIABLES

[Variables]
Image Location1=#SKINSPATH#UI White\@Resources\Images\Background.png
Image Location2=#SKINSPATH#UI White\@Resources\Images\O.png

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
BACKGROUND METER

[Background]
Meter=BUTTON
ButtonImage=#Image Location1#
X=0
Y=0

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CLOCK MEASURE

[MeasureTime]
Measure=Time

[MeasureTime]
Measure=Time

----------------------------------
CLOCK METER 

[Seconds]
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=0
W=100
H=100
LineWidth=0
StartAngle=4.7123889
RotationAngle=6.2831853
LineLength=40
LineStart=0
AntiAlias=1
LineColor=255, 255, 255, 0
ValueReminder=60

[Hours]
Meter=ROUNDLINE
MeterStyle=Seconds
LineWidth=3
LineLength=30
LineColor=ffffff75
ValueReminder=43200

[Minutes]
Meter=ROUNDLINE
MeterStyle=Seconds
LineWidth=3
LineLength=40
LineColor=ffffff25
ValueReminder=3600

[O]
Meter=BUTTON
ButtonImage=#Image Location2#
X=45
Y=45
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: How do I resize UI White's Clock?

Post by eclectic-tech »

The easiest way is to use a TransformationMatrix formula on each meter and a scale variable. When using TransformationMatrix, you need to set the overall skin height and width in the [Rainmeter] section so the transformed meters are not clipped.

I added SkinWidth and SkinHeight to the [Rainmeter] s4ection based on the original circle size of 100 times the scale. A "Scale" variable was added and a standard resizeTrandformationMatrix formula was added to each meter.

To change the size simply change the "Scale" variable value; you do not need to change anything else or mess with the TransformationMatrix values.

Code: Select all

[Rainmeter]
Update=1000
SkinWidth=(100*#Scale#)
SkinHeight=(100*#Scale#)

[Metadata]
Author=DD.921 (???)
Version=1.3f
Description=[EN]Displays time / [FR]Affiche l'heure / [ES]Muestra la hora
Instructions=/!\ The skin is a modified version of the original skin that is ???

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VARIABLES

[Variables]
Scale=5
Image Location1=#SKINSPATH#UI White\@Resources\Images\Background.png
Image Location2=#SKINSPATH#UI White\@Resources\Images\O.png

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
BACKGROUND METER

[Background]
Meter=BUTTON
ButtonImage=#Image Location1#
X=0
Y=0
TransformationMatrix=#Scale#;0;0;#Scale#;0;0

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CLOCK MEASURE

[MeasureTime]
Measure=Time

[MeasureTime]
Measure=Time

----------------------------------
CLOCK METER 

[Seconds]
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=0
W=100
H=100
LineWidth=0
StartAngle=4.7123889
RotationAngle=6.2831853
LineLength=40
LineStart=0
AntiAlias=1
LineColor=255, 255, 255, 0
ValueReminder=60
TransformationMatrix=#Scale#;0;0;#Scale#;0;0

[Hours]
Meter=ROUNDLINE
MeterStyle=Seconds
LineWidth=3
LineLength=30
LineColor=ffffff75
ValueReminder=43200
TransformationMatrix=#Scale#;0;0;#Scale#;0;0

[Minutes]
Meter=ROUNDLINE
MeterStyle=Seconds
LineWidth=3
LineLength=40
LineColor=ffffff25
ValueReminder=3600
TransformationMatrix=#Scale#;0;0;#Scale#;0;0

[O]
Meter=BUTTON
ButtonImage=#Image Location2#
X=45
Y=45
TransformationMatrix=#Scale#;0;0;#Scale#;0;0