It is currently April 27th, 2024, 6:38 pm

Cut-Off Strings -- Dynamic Resizing?

Get help with creating, editing & fixing problems with skins
emotiondetector
Posts: 2
Joined: May 29th, 2012, 11:46 pm

Cut-Off Strings -- Dynamic Resizing?

Post by emotiondetector »

Simple question, probably not-so-simple solution.

Is it possible to have text resized based on the dimensions of a skin? For instance I have a music player that displays the artist and song. However I have many titles that get cut off no matter how large I make the skin. So I'm thinking that my OCD would be at bay if the text that would get cut off could somehow shrink (or enlarge I suppose) to fill the space?
Last edited by emotiondetector on May 30th, 2012, 3:27 am, edited 1 time in total.
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Cut-Off Strings

Post by Mordasius »

emotiondetector wrote:Any help you guys could offer would be much appreciated. Thanks!
Try adding a background by inserting an image meter before the string meters. Something like this:

Code: Select all

; =======================================
; INFORMATION

[Background]
Meter=IMAGE
W=700
H=700
SolidColor=00000088

[Track]
Meter=STRING
MeasureName=mPlayer
W=500
X=500
Y=50
FontFace=PlazaDReg
etc.  etc. 
Once you've got it looking how you want it, you can set SolidColor=00000001 so you don't see the background anymore.

UPDATE....Duh! Where have you moved the goal posts to emotiondetector ?
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: Cut-Off Strings -- Dynamic Resizing?

Post by poiru »

emotiondetector wrote:Simple question, probably not-so-simple solution.
It's pretty simple ;-) Just add DynamicWindowSize=1 under [Rainmeter].
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Cut-Off Strings -- Dynamic Resizing?

Post by Mordasius »

poiru wrote:It's pretty simple ;-) Just add DynamicWindowSize=1 under [Rainmeter].
Oddly enough, DynamicWindowSize=1 was in the code originaly posted by emotiondetector but it didn't seem to solve the problem:

Code: Select all

[Rainmeter]
Author=poiru
Update=1000
DynamicWindowSize=1

[Metadata]
Name=Soita
Description=Displays track information from various media players.
Version=1.0.0
License=Creative Commons BY-NC-SA 3.0

[Variables]
; For a list of valid Player= values, check: http://rainmeter.net/RainCMS/?q=NowPlaying_beta#playerlist
Player=WMP

; NOTE!
; If you're using foobar2000, you must download the foo_rainmeter.dll plugin for foobar2000
; from http://rainmeter.net/RainCMS/?q=NowPlaying_beta (under 'Supported players').

; ================================================
; MEASURES

[mPlayer]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=#Player#
PlayerType=TITLE
PlayerPath=
DisableLeadingZero=0
Substitute="":"N\A"
; Return value is 1 on error
IfEqualValue=1
IfEqualAction=!Execute [!RainmeterShowMeter ErrorMessage][!RainmeterRedraw]

[mArtist]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[mPlayer]
PlayerType=ARTIST
Substitute="":"N\A"

[mAlbum]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[mPlayer]
PlayerType=ALBUM
Substitute="":"N\A"

; =======================================
; INFORMATION

[Track]
Meter=STRING
MeasureName=mPlayer
W=500
X=500
Y=50
FontFace=PlazaDReg
FontColor=FFFFFFFF
AntiAlias=1
FontSize=60
Angle=-0.75
StringAlign=RIGHT

[Artist]
Meter=STRING
MeasureName=mArtist
X=r
Y=100r
FontFace=PlazaDReg
FontColor=FFFFFFFF
AntiAlias=1
FontSize=60
Angle=-0.75
StringAlign=RIGHT

[Album]
Meter=STRING
MeasureName=mAlbum
X=r
Y=100r
FontFace=PlazaDReg
FontColor=FFFFFFFF
AntiAlias=1
FontSize=60
Angle=-0.75
StringAlign=RIGHT
Throwing in a background was the best way I could come up with to show the full text without it being cut off.
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Cut-Off Strings -- Dynamic Resizing?

Post by smurfier »

The issue is that when you use angle on a string meter, the actual angled text does not force the window to grow. The window grows as if the text is not angled. You then need to force the window to change it's size by the use of another meter.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Cut-Off Strings -- Dynamic Resizing?

Post by Mordasius »

smurfier wrote:The issue is that when you use angle on a string meter, the actual angled text does not force the window to grow. The window grows as if the text is not angled. You then need to force the window to change it's size by the use of another meter.
Thanks for that smurfier, is there any way this could be incorporated in the http://rainmeter.net/cms/Meters-String section of the Rainmeter Manual?