It is currently April 26th, 2024, 4:47 pm

[Feature] ClipString beginning and middle

Report bugs with the Rainmeter application and suggest features.
User avatar
Active Colors
Moderator
Posts: 1255
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

[Feature] ClipString beginning and middle

Post by Active Colors »

When you use ClipString=1 on a String meter it cuts out letters that do not fit W and adds three ellipses like this:

Code: Select all

[String]
Meter=String
W=30
ClipString=1
Text=Rainmeter
result:
Rainm...

I would like to have an option where I could choose which side to clip.
By default it clips the ending part of a string, like in the result above.
I would like to choose either beginning part, or the middle part, so the results are:
...eter
Ra...er


There could be a new option introduced and called for example ClipSide.
By default the value is Ending, which clips the ending part as per usual.
And the new values can be Beginning and Middle to achieve what I am explaining.

Code: Select all

[String]
Meter=String
W=60
ClipString=1
ClipSide=Middle
Text=Adobe Photoshop
result:
Adob...shop


I don't know technical peculiarities, so I would like to hear your opinion whether this is feasible.
User avatar
Brian
Developer
Posts: 2685
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: [Feature] ClipString beginning and middle

Post by Brian »

Unfortunately, I do not believe this is possible with our current text rendering system (DIrectWrite).

:(

-Brian