It is currently March 28th, 2024, 4:02 pm

Formatting the seconds to be smaller in a RM clock

Get help with creating, editing & fixing problems with skins
Post Reply
MC-TEF
Posts: 6
Joined: September 19th, 2017, 8:32 pm

Formatting the seconds to be smaller in a RM clock

Post by MC-TEF »

I can't figure out how to format the font size to be half the size of the actual hour and minutes font size in the clock I am using.

I was able to add the seconds to the clock and fix the position, but can't format the seconds, here is the ini code, if someone can help me to figure it out, I would greatly appreciate it. I have also included a screen shot of the clock.

Code: Select all

[Rainmeter]
Author=Wyzzymoon.Deviantart.com

[Variables]
Size=10

[Metadata]
Name= Color Flow Time
Description= Patrick Muff's Color Flow for Rainmeter
Version=1.8.2
Tags= Patrick Muff | Rainmeter | Cydia | WyzzyMoon
Variant=1

[MeasureTime]
Measure=Time
Format=%I  %M %S

[MeasureHours]
Measure=Time
Format=%I


[MeasureMin]
Measure=Time
Format=%M


[MeasureHours-1]
Measure=Calc
Formula=MeasureHours - 1
RegExpSubstitute=1
Substitute="^(\d)$":"0\0","00":"12"

[MeasureHours+1]
Measure=Calc
Formula=MeasureHours + 1
RegExpSubstitute=1
Substitute="^(\d)$":"0\0","13":"01"



[MeasureMin-1]
Measure=Calc
Formula=MeasureMin - 1
RegExpSubstitute=1
Substitute="^(\d)$":"0\0","-1":"59"

[MeasureMin+1]
Measure=Calc
Formula=MeasureMin + 1
RegExpSubstitute=1
Substitute="^(\d)$":"0\0","60":"00"


[Measure1]
Measure=Calc
Formula=1

[MeterTime]
Hidden=0
Meter=String
MeasureName=MeasureTime
FontFace=GeosansLight
FontSize=(#Size#*3)
FontColor=64,134,250
FontWeight=700
StringAlign=CenterCenter
X=((#Size#/10)*88)
Y=((#Size#/10)*95)
AntiAlias=1


[MeterTime-1]
Hidden=0
Meter=String
MeasureName=MeasureHours-1
MeasureName2=MeasureMin-1
Text=%1  %2
FontFace=GeosansLight
FontSize=(#Size#*3)
FontColor=255,255,255,71
StringAlign=CenterCenter
X=((#Size#/10)*60)
Y=((#Size#/10)*45)
AntiAlias=1

[MeterTime+1]
Hidden=0
Meter=String
MeasureName=MeasureHours+1
MeasureName2=MeasureMin+1
Text=%1  %2
FontFace=GeosansLight
FontSize=(#Size#*3)
FontColor=255,255,255,71
StringAlign=CenterCenter
X=((#Size#/10)*60)
Y=((#Size#/10)*145)
AntiAlias=1

[MeterLine]
Meter=bar
MeasureName=Measure1
X=((#Size#/10)*62)
Y=((#Size#/10)*10)
W=((#Size#/10)*1)
H=((#Size#/10)*155)
BarOrientation=Vertical
BarColor=255,255,255,200
clock.png
Last edited by Brian on September 19th, 2017, 8:49 pm, edited 1 time in total.
Reason: Please use [code] tags.
User avatar
Brian
Developer
Posts: 2673
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Formatting the seconds to be smaller in a RM clock

Post by Brian »

You could add the following to [MeterTime] :

Code: Select all

InlineSetting=Size | (#Size# * 2)
InlinePattern=..$
That will use regular expression to format just the last 2 characters of the string and change the size to (#Size# * 2). Feel free to edit the formula (or use a raw value) to get it exactly how you want it.

You may need to edit X of the meter as well to make things line up a bit better.

-Brian
MC-TEF
Posts: 6
Joined: September 19th, 2017, 8:32 pm

Re: Formatting the seconds to be smaller in a RM clock

Post by MC-TEF »

Sorry brother, I don't understand what you mean by code tag
MC-TEF
Posts: 6
Joined: September 19th, 2017, 8:32 pm

Re: Formatting the seconds to be smaller in a RM clock

Post by MC-TEF »

Brian I did what you said worked perfect, thanks for the quick reply and fix, your awesome...
User avatar
Brian
Developer
Posts: 2673
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Formatting the seconds to be smaller in a RM clock

Post by Brian »

MC-TEF wrote:Sorry brother, I don't understand what you mean by code tag
When posting skin code, highlight the skin code and press the

Code: Select all

 button. Then when the post is submitted, it will have a nice box with scrollbars and a "Select All" button.

[attachment=0]Code.png[/attachment]

-Brian
Attachments
Code.png
User avatar
Brian
Developer
Posts: 2673
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Formatting the seconds to be smaller in a RM clock

Post by Brian »

MC-TEF wrote:Brian I did what you said worked perfect, thanks for the quick reply and fix, your awesome...
Glad to help!

-Brian
MC-TEF
Posts: 6
Joined: September 19th, 2017, 8:32 pm

Re: Formatting the seconds to be smaller in a RM clock

Post by MC-TEF »

Again thanks, and understand what you mean on the code tag... Have a good one brother.
MC-TEF
Posts: 6
Joined: September 19th, 2017, 8:32 pm

Re: Formatting the seconds to be smaller in a RM clock

Post by MC-TEF »

Brian you helped me earlier, sorry to bother you , but I have another question on the same topic...

I got everything the way I want it almost, here is my question, the seconds I want CenterCenter and the spacing between the minute & secs, how can I close the spacing, from like 1 to a .5

Code: Select all


[Rainmeter]
Author=Wyzzymoon.Deviantart.com

[Variables]
Size=10

[Metadata]
Name= Color Flow Time
Description= Patrick Muff's Color Flow for Rainmeter
Version=1.8.2
Tags= Patrick Muff | Rainmeter | Cydia | WyzzyMoon
Variant=1

[MeasureTime]
Measure=Time
Format=%I  %M %S

[MeasureHours]
Measure=Time
Format=%I


[MeasureMin]
Measure=Time
Format=%M


[MeasureHours-1]
Measure=Calc
Formula=MeasureHours - 1
RegExpSubstitute=1
Substitute="^(\d)$":"0\0","00":"12"

[MeasureHours+1]
Measure=Calc
Formula=MeasureHours + 1
RegExpSubstitute=1
Substitute="^(\d)$":"0\0","13":"01"



[MeasureMin-1]
Measure=Calc
Formula=MeasureMin - 1
RegExpSubstitute=1
Substitute="^(\d)$":"0\0","-1":"59"

[MeasureMin+1]
Measure=Calc
Formula=MeasureMin + 1
RegExpSubstitute=1
Substitute="^(\d)$":"0\0","60":"00"


[Measure1]
Measure=Calc
Formula=1

[MeterTime]
Hidden=0
Meter=String
MeasureName=MeasureTime
FontFace=GeosansLight
FontSize=(#Size#*3)
FontColor=0,102,249
FontWeight=900
StringAlign=CenterCenter
InlineSetting=Size | (#Size# *1.2)
InlinePattern=..$
X=((#Size#/10)*75)
Y=((#Size#/10)*95)
AntiAlias=1


[MeterTime-1]
Hidden=0
Meter=String
MeasureName=MeasureHours-1
MeasureName2=MeasureMin-1
Text=%1  %2
FontFace=GeosansLight
FontSize=(#Size#*2.8)
FontColor=255,255,255,49
StringAlign=CenterCenter
X=((#Size#/10)*60)
Y=((#Size#/10)*45)
AntiAlias=1

[MeterTime+1]
Hidden=0
Meter=String
MeasureName=MeasureHours+1
MeasureName2=MeasureMin+1
Text=%1  %2
FontFace=GeosansLight
FontSize=(#Size#*2.8)
FontColor=255,255,255,49
StringAlign=CenterCenter
X=((#Size#/10)*60)
Y=((#Size#/10)*145)
AntiAlias=1

[MeterLine]
Meter=bar
MeasureName=Measure1
X=((#Size#/10)*62)
Y=((#Size#/10)*10)
W=((#Size#/10)*1)
H=((#Size#/10)*155)
BarOrientation=Vertical
BarColor=255,255,255,210

User avatar
Brian
Developer
Posts: 2673
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Formatting the seconds to be smaller in a RM clock

Post by Brian »

Unfortunately there is no vertical spacing control within a string using inline settings...so your best bet is just to make another string meter and position it to your liking.

Something like this:

Code: Select all

[Rainmeter]
Author=Wyzzymoon.Deviantart.com

[Variables]
Size=10

[Metadata]
Name= Color Flow Time
Description= Patrick Muff's Color Flow for Rainmeter
Version=1.8.2
Tags= Patrick Muff | Rainmeter | Cydia | WyzzyMoon
Variant=1

[MeasureTime]
Measure=Time
Format=%I  %M

[MeasureHours]
Measure=Time
Format=%I

[MeasureMin]
Measure=Time
Format=%M

[MeasureSeconds]
Measure=Time
Format=%S

[MeasureHours-1]
Measure=Calc
Formula=MeasureHours - 1
RegExpSubstitute=1
Substitute="^(\d)$":"0\0","00":"12"

[MeasureHours+1]
Measure=Calc
Formula=MeasureHours + 1
RegExpSubstitute=1
Substitute="^(\d)$":"0\0","13":"01"

[MeasureMin-1]
Measure=Calc
Formula=MeasureMin - 1
RegExpSubstitute=1
Substitute="^(\d)$":"0\0","-1":"59"

[MeasureMin+1]
Measure=Calc
Formula=MeasureMin + 1
RegExpSubstitute=1
Substitute="^(\d)$":"0\0","60":"00"

[Measure1]
Measure=Calc
Formula=1

[MeterTime]
Hidden=0
Meter=String
MeasureName=MeasureTime
FontFace=GeosansLight
FontSize=(#Size#*3)
FontColor=0,102,249
FontWeight=900
StringAlign=CenterCenter
X=((#Size#/10)*63)
Y=((#Size#/10)*95)
AntiAlias=1

[MeterSeconds]
Meter=String
MeasureName=MeasureSeconds
FontFace=GeosansLight
FontSize=(#Size#*1.2)
FontColor=0,102,249
FontWeight=900
StringAlign=CenterCenter
X=([MeterTime:X] + [MeterTime:W] + 14)
Y=4r
AntiAlias=1
DynamicVariables=1


[MeterTime-1]
Hidden=0
Meter=String
MeasureName=MeasureHours-1
MeasureName2=MeasureMin-1
Text=%1  %2
FontFace=GeosansLight
FontSize=(#Size#*2.8)
FontColor=255,255,255,49
StringAlign=CenterCenter
X=((#Size#/10)*60)
Y=((#Size#/10)*45)
AntiAlias=1

[MeterTime+1]
Hidden=0
Meter=String
MeasureName=MeasureHours+1
MeasureName2=MeasureMin+1
Text=%1  %2
FontFace=GeosansLight
FontSize=(#Size#*2.8)
FontColor=255,255,255,49
StringAlign=CenterCenter
X=((#Size#/10)*60)
Y=((#Size#/10)*145)
AntiAlias=1

[MeterLine]
Meter=bar
MeasureName=Measure1
X=((#Size#/10)*62)
Y=((#Size#/10)*10)
W=((#Size#/10)*1)
H=((#Size#/10)*155)
BarOrientation=Vertical
BarColor=255,255,255,210
As you can see, I tweaked the time measure a bit, added a new measure to get the seconds, and added a new string meter to display the seconds. There is probably more tweaks you could do, but I think this is close to what you are asking for.

-Brian
MC-TEF
Posts: 6
Joined: September 19th, 2017, 8:32 pm

Re: Formatting the seconds to be smaller in a RM clock

Post by MC-TEF »

Perfect brother...

Thanks

-MC
Post Reply