Yep, there is. The [Clock:W] section variable is returning the length (width as W) of the string meter.
It is currently September 29th, 2023, 2:14 pm
Round the edges of a roundline
-
- Rainmeter Sage
- Posts: 15680
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Round the edges of a roundline
-
- Posts: 110
- Joined: November 15th, 2021, 1:47 am
- Location: Brazil
Re: Round the edges of a roundline
Now it only matches the w I put in, I want the width to be justified to the size of the text on the screenbalala wrote: ↑September 11th, 2023, 8:47 pm Yep, there is. The [Clock:W] section variable is returning the length (width as W) of the string meter.
It looks like this now:

Code: Select all
[Clock]
Meter=String
MeasureName=MeasureTime
X=245
Y=38
FontSize=40
FontFace=#FONT#
AntiAlias=1
FontColor=#COLOR2#
StringAlign=CenterCenter
Text="%1"
W=120
[LineClock]
Meter=Shape
Shape=Rectangle 0,0,[Clock:W],8,4 | Extend HolderFill | Extend HolderStroke
HolderFill=Fill Color #COLOR2#
HolderStroke=Stroke Color 0,0,0,1
X=170
Y=60
;===========================================Rafamear=================================================
;=========================
========== My DeviantArt ==========
==============================
;=========================


-
- Rainmeter Sage
- Posts: 6059
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Round the edges of a roundline
Use the appropriate X, Y, W and H parameters of the Clock meter:Rafamear wrote: ↑September 11th, 2023, 8:38 pm Oh and one more thing, I'm going to ask here, I wanted to know if there is any way to calculate the width of a text on the screen, just like I want to do here where a line will have its width according to the size of the text.
I wanted to do this because some fonts that I place change in width on the screen and the line becomes smaller or larger in relation to the text
and I'm using the rectangle shape because it fits better with what I was intending
Code: Select all
[Rainmeter] Update=1000 AccurateText=1 [Metadata] Name=Mimali Author=Rafamear Version=1.0 License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0 [Variables] @include=#@#Variables.inc ;======================Measures===================== ;=================================================== [MeasureTime] Measure=Time Format=%H:%M [MeasureDate] Measure=Time Format=%A, %b %d FormatLocale=#Lang# [TranslucentSkin] Measure=Plugin Plugin=TranslucentRM Type=4 Corner=2 BorderColor=ffffff1A ;=======================Shapes====================== ;=================================================== [BackgroundBlur] Meter=Shape Shape=Rectangle 0,0,330,160,4 | Extend HolderFill | Extend HolderStroke HolderFill=Fill Color 245,245,245,25 HolderStroke=Stroke Color 0,0,0,1 X=0 Y=0 [Clock] Meter=String MeasureName=MeasureTime X=245 Y=38 FontSize=40 FontFace=#FONT# AntiAlias=1 FontColor=#COLOR2# StringAlign=CenterCenter Text="%1" [LineClock] Meter=Shape Shape=Rectangle 0,0,150,8,4 | Extend HolderFill | Extend HolderStroke HolderFill=Fill Color #COLOR2# HolderStroke=Stroke Color 0,0,0,1 X=170 Y=60
https://docs.rainmeter.net/manual/variables/section-variables/
in the position of the LineClock meter or the parameters of the Rectangle. For example:
[LineClock]
...
X=([Clock:X]-[Clock:W]/2)
...
to place LineClock at the same horizontal position as the Clock meter. Subtracting half the Clock width here is because the Clock text is centered on its X.
-
- Rainmeter Sage
- Posts: 6059
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Round the edges of a roundline
Adding DynamicVariables=1 to LineClock might help.Rafamear wrote: ↑September 11th, 2023, 9:05 pm Now it only matches the w I put in, I want the width to be justified to the size of the text on the screen
It looks like this now:
Code: Select all
[Clock] Meter=String MeasureName=MeasureTime X=245 Y=38 FontSize=40 FontFace=#FONT# AntiAlias=1 FontColor=#COLOR2# StringAlign=CenterCenter Text="%1" W=120 [LineClock] Meter=Shape Shape=Rectangle 0,0,[Clock:W],8,4 | Extend HolderFill | Extend HolderStroke HolderFill=Fill Color #COLOR2# HolderStroke=Stroke Color 0,0,0,1 X=170 Y=60
-
- Posts: 110
- Joined: November 15th, 2021, 1:47 am
- Location: Brazil
Re: Round the edges of a roundline
It's working as expected, thx y'all
;===========================================Rafamear=================================================
;=========================
========== My DeviantArt ==========
==============================
;=========================


-
- Rainmeter Sage
- Posts: 6059
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
-
- Rainmeter Sage
- Posts: 15680
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Round the edges of a roundline
I understand Yincognito has solved your request, however I wonder now why do you want to create a Shape meter to underline the time. Wouldn't be easier to apply the underline directly to the String meter? In such a case there is no problem on how the length of the underline should be.
-
- Rainmeter Sage
- Posts: 6059
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Round the edges of a roundline
There's a catch here though. Underlining the text is not available as a specific option in the String meter, it has to be added somewhat indirectly via the lesser known inline settings. This might explain why it wasn't applied in this case...

-
- Rainmeter Sage
- Posts: 15680
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Round the edges of a roundline
Right. But it's easy to be done, by adding a InlineSetting=Underline option to the String meter.Yincognito wrote: ↑September 12th, 2023, 1:25 pm Underlining the text is not available as a specific option in the String meter, it has to be added somewhat indirectly via the lesser known inline settings. This might explain why it wasn't applied in this case...![]()
-
- Rainmeter Sage
- Posts: 6059
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Round the edges of a roundline
Indeed. Not sure it will have rounded corners though, despite the fact that the font does have a rounded appearance. Might be another reason why the OP chose the Shape variant here.