Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 688

Help: Rainmeter Skins • Re: Problems with minimum and dynamic width

$
0
0
Yep, I rushed to a conclusion without looking at the code, my bad. :oops:
But the poor... I mean "super" AI didn't convince me of anything, the below should be better:

Take into account that since I'm using NowPlaying + Winamp, the code will, as it is, work with those. You might want to change the ProcessName, PlayerName and PluginName variables accordingly for Spotify.exe, Winamp and WebNowPlaying and see if it'senough to fully work for you, or, if it doesn't, just replace those variables with what you had in your code. I didn't account for the padding as I removed it while testing, so you might need to add or subtract it where needed.

The key above is to first "reset" the X and W to nothing or "" (as if they were not set) and update the meters (but without redrawing the skin, to avoid visual glitches!), in order to get the unmodified width of the artist and track meters. Then, knowing those, we can safely apply the formula I mentioned earlier. We'd do this when the songs changes, but also after refreshing since, according to the manual:

This shouldn't exhibit any "transition" or visual glitches whatsoever.
Oh boy that works a lot smoother than the one I got :) you really did something great here, thank you very much
Next step: smooth sliding when the title changes :amazed
Got it updated with WebNowPlaying Plugin to work with Winamp and Spotify :) I post the Code below feel free to use it
Glad you figured it out... :thumbup:

BTW, my code changes will work... I have used that skin all day.

You misspelled the [MeasureWidth] section as [MeasrureWidth] in your posted code and if you didn't make a correction, that is why it didn't work for you.
Noted, but also corrected it since I just copy pasted, there I also noticed it :D (but guess I was still too dumb to use it correctly)

So here it is, a fully working minimal Display of what is now playing, free from graphic glitches, working for Winamp and Spotify :yahoo:

Thank you all for the help, feel free to share and use I guess (and hope) that this could be a great addition to existing skins :)

Code:

[Rainmeter]Update=100BackgroundMode=3BackgroundMargins=3,3,3,3DynamicWindowSize=1AccurateText=1OnRefreshAction=[!SetAnchor "100%" "0%"][!SetOptionGroup DynamicColors X ""][!SetOptionGroup DynamicColors W ""][!UpdateMeterGroup DynamicColors][!SetOptionGroup DynamicColors X (Max(Max([MeterArtistInfo:W],[MeterSongInfo:W]),200))][!SetOptionGroup DynamicColors W (Max(Max([MeterArtistInfo:W],[MeterSongInfo:W]),200))][!UpdateMeterGroup DynamicColors][!Redraw][Metadata]Name=WebNowPlaying Music Plugin ExamplesAuthor=keifufu, tjhrulz; since this skin is far away from the original, this ain't an example anymore; still simple and minimal.[Variables]Background=255,255,255Color=255,255,255MinWidth=200[playerstyle]SolidColor=0,0,0,190FontFace=Segoe UI Variable SmallFontSize=9AntiAlias=1StringAlign=RightDynamicVariables=1ClipString=0y=Rh=20FontColor=#Color#,255Group=DynamicColors; This measures the player, e.g. 'YouTube', 'Spotify', etc.[MeasurePlayer]Measure=PluginPlugin=WebNowPlayingPlayerType=PlayerUpdateDivider = 5Substitute="":"N/A"[MeasureState]Measure=NowPlayingPlayerName=WINAMPPlayerType=StatusIfCondition=(#CURRENTSECTION#=0)IfTrueAction=[!HideFade]IfFalseAction=[!ShowFade][MeasureProcess]Measure=PluginPlugin=ProcessProcessName=Spotify.exe; Value will be '1' when the process is running, '-1' when it is not runningIfCondition=(MeasureProcess=-1)IfTrueAction=[!HideFade]IfFalseAction=[!ShowFade][MeasureTitle]Measure=PluginPlugin=WebNowPlayingPlayerType=TitleUpdateDivider = 5Substitute="":"Currently no track playing"DynamicVariables=1; [DebugWidth]; Meter=String; Text="Measured: [MeasureTitleWidth] | Final: [MeasureFinalWidth]"; DynamicVariables=1; y=R; h=20; MeterStyle=playerstyle; W=[MeterSongInfo:W]; AntiAlias=1[MeasureArtist]Measure=PluginPlugin=WebNowPlayingPlayerType=ArtistUpdateDivider = 5Substitute="":""[MeasureInfo]Measure=StringString=[MeasureArtist] - [MeasureTitle]OnChangeAction=[!SetOptionGroup DynamicColors X ""][!SetOptionGroup DynamicColors W ""][!UpdateMeterGroup DynamicColors][!SetOptionGroup DynamicColors X (Max(Max([MeterArtistInfo:W],[MeterSongInfo:W]),200))][!SetOptionGroup DynamicColors W (Max(Max([MeterArtistInfo:W],[MeterSongInfo:W]),200))][!UpdateMeterGroup DynamicColors][!Redraw]DynamicVariables=1[MeterArtistInfo]Meter=StringMeasureName=MeasureArtistMeterStyle=playerstylePadding=-10,3,10,0[MeterSongInfo]Meter=StringMeasureName=MeasureTitleMeterStyle=playerstylePadding=10,0,10,3

Statistics: Posted by devlink — 23 minutes ago



Viewing all articles
Browse latest Browse all 688

Trending Articles