I've got this little Now Playing widget and it's set do dynamically resize its content whilst being aligned to the right. It doesn't top over the volume icon and the percentage value on the right (which are static) but I want to put a "track" icon to the left of the Artist/Track and make them dynamically resize together, otherwise if I just align the icon to the left of the now playing info it'll just top over it if the track name is way too long, or leave an entire blank space if it's too short. Here are some images as an example:
The way it is:
The way I'd like it to be, if possible:
Thanks in advance!
It is currently April 23rd, 2024, 6:35 pm
Dynamic resize both image and string
-
- Posts: 11
- Joined: January 12th, 2018, 5:39 am
-
- Posts: 1173
- Joined: January 22nd, 2011, 4:23 pm
- Location: GMT +8
Re: Dynamic resize both image and string
The following will put a music icon along with the track name and artist in a single meter aligned to the right. You can just add your volume icon and the percentage value right after the string meter. Can't really do much more without knowing how you are positioning things.
Code: Select all
[MtIcon-Title-Artist]
Meter=String
MeasureName=mPlayer
MeasureName2=mArtist
FontSize=14
FontColor=111111
StringAlign=RightCenter
SolidColor=eeeeee
W=400
H=30
X=400
Y=30
;--[ music note ( ♫ ) is unicode U+266B
Text="[\x266B] %1 - %2"
InlineSetting=Color | 00aaff
InlinePattern=[\x266B]
InlineSetting2=Size | 18
InlinePattern2=\W
AntiAlias=1
You do not have the required permissions to view the files attached to this post.
-
- Posts: 11
- Joined: January 12th, 2018, 5:39 am
Re: Dynamic resize both image and string
Oh that seems to work! Although it's limited to text, specifically, and wouldn't be compatible with any other icon I might want to try, but that it's a smart solution, thank you!Mordasius wrote: ↑March 3rd, 2019, 9:14 am The following will put a music icon along with the track name and artist in a single meter aligned to the right. You can just add your volume icon and the percentage value right after the string meter. Can't really do much more without knowing how you are positioning things.Untitled-1.jpgCode: Select all
[MtIcon-Title-Artist] Meter=String MeasureName=mPlayer MeasureName2=mArtist FontSize=14 FontColor=111111 StringAlign=RightCenter SolidColor=eeeeee W=400 H=30 X=400 Y=30 ;--[ music note ( ♫ ) is unicode U+266B Text="[\x266B] %1 - %2" InlineSetting=Color | 00aaff InlinePattern=[\x266B] InlineSetting2=Size | 18 InlinePattern2=\W AntiAlias=1
And here's how it's currently coded
Code: Select all
[MeasurePlayer]
Measure=NowPlaying
PlayerName=CAD
PlayerType=TITLE
[MeasureArtist]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=ARTIST
[MeasureCover]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=COVER
[Background]
Meter=Image
ImageName=bar.png
H=30
X=0
Y=0
[MusicIcon]
Meter=Image
ImageName=track.png
H=30
W=30
X=1560
[MeterString]
Meter=STRING
MeasureName=MeasurePlayer
MeasureName2=MeasureArtist
X=1800
Y=-6
FontColor=100,100,100
FontSize=11
FontFace=Gotham Rounded
StringAlign=Right
AntiAlias=1
Text="[\x266B] %2 - %1"
;--[ music note ( ♫ ) is unicode U+266B
InlineSetting=Color | 00aaff
InlinePattern=[\x266B]
InlineSetting2=Size | 18
InlinePattern2=\W
AntiAlias=1