Code: Select all
[Rainmeter]
Update=1000
MouseOverAction=[!ShowMeterGroup Hover][!ShowMeterGroup #stowAwayName#][!Redraw]
MouseLeaveAction=[!HideMeterGroup Hover][!HideMeterGroup #stowAwayName#][!Redraw]
AccurateText=1
DynamicWindowSize=1
SkinHeight=(#skinSize#*0.25)
ContextTitle=Open Settings panel
ContextAction=!ActivateConfig "Cleartext\Settings"
ContextTitle2=Use Cleartext Pure
ContextAction2=!ActivateConfig "Cleartext"
[Metadata]
Name=Cleartext
Author=Redsaph
Description=Displays track information from various media players.
Version=5.2
License=Creative Commons BY-NC-SA 3.0
[Variables]
@include=#@#base.ini
currentlySetAlign=right
Width=300
RegularSpeed=3
Speed=0
EatCharUpdate=150
IntegralTopTextWidth=0
IntegralBottomTextWidth=0
UpdatesAfterChangedSong=0
UpdatesUntilScroll=20
UpdatesAfterScrollEnd=0
UpdatesUntilEatChar=20
; STYLES ==========================================
[styleTextControls]
FontFace=#controlsFont#
FontSize=(#skinSize#*0.027)
AntiAlias=1
FontColor=#translucent#
StringAlign=#interfaceTextAlignment#
DynamicVariables=1
Hidden=1
Group=Hover | Visible
MouseActionCursor=1
[styleTextMini]
FontFace=#controlsFont#
FontSize=(#skinSize#*0.0175)
AntiAlias=1
FontColor=#opaque#
StringAlign=#interfaceTextAlignment#
DynamicVariables=1
Hidden=1
Group=Hover | Visible
[styleTextMajor]
H=(#skinSize#*0.085)
FontSize=(#skinSize#*0.0625)
FontColor=#opaque#
AntiAlias=1
Group=Visible
; =================================================
; Measures
[LuaSettings]
Measure=Script
ScriptFile=#@#settings.lua
[mLastTexts]
Measure=String
String=""
DynamicVariables=1
[mTexts]
Measure=String
String="[#topText##MusicSwitch#] - [#bottomText##MusicSwitch#], [mLength#MusicSwitch#]"
IfCondition=(#UpdatesAfterChangedSong#=#UpdatesUntilScroll#)
IfTrueAction=[!SetVariable Speed (#RegularSpeed#)]
IfConditionMode=1
IfMatch=^[mLastTexts:EscapeRegExp]$
IfNotMatchAction=[!SetVariable UpdatesAfterChangedSong 0][!SetVariable UpdatesAfterScrollEnd 0][!DisableMeasure "MeasureScroll"][!UpdateMeasure "MeasureScroll"][!DisableMeasure "MeasureEatTopTextChars"][!UpdateMeasure "MeasureEatTopTextChars"][!DisableMeasure "MeasureEatBottomTextChars"][!UpdateMeasure "MeasureEatBottomTextChars"][!SetOption IntegralTopText Text "[#topText##MusicSwitch#]"][!UpdateMeter IntegralTopText][!SetOption IntegralBottomText Text "[#bottomText##MusicSwitch#]"][!UpdateMeter IntegralBottomText][!SetOption TopText Text "[#topText##MusicSwitch#]"][!UpdateMeter TopText][!SetOption BottomText Text "[#bottomText##MusicSwitch#]"][!UpdateMeter BottomText][!SetOption MeasureEatTopTextChars String "[#topText##MusicSwitch#]"][!UpdateMeasure "MeasureEatTopTextChars"][!SetOption MeasureEatBottomTextChars String "[#bottomText##MusicSwitch#]"][!UpdateMeasure "MeasureEatBottomTextChars"][!SetOption mLastTexts String "[mTexts]"][!UpdateMeasure "mLastTexts"][!SetVariable Speed 0][!EnableMeasure "MeasureScroll"]
IfMatchAction=[!SetVariable UpdatesAfterChangedSong (#UpdatesAfterChangedSong#+1)]
IfMatchMode=1
DynamicVariables=1
[mTopTextWidth]
Group=AlignmentMeasure
Measure=Calc
Formula=[TopText:W]
OnChangeAction=[!WriteKeyValue Variables topTextWidth "[mTopTextWidth]" "#@#variables.inc"]
DynamicVariables=1
[mBottomTextWidth]
Group=AlignmentMeasure
Measure=Calc
Formula=[BottomText:W]
OnChangeAction=[!WriteKeyValue Variables bottomTextWidth "[mBottomTextWidth]" "#@#variables.inc"][!CommandMeasure "LuaAlign" "alignRightOnUpdate()"]
DynamicVariables=1
[LuaAlign]
Measure=Script
ScriptFile=#@#align.lua
UpdateDivider=8
DynamicVariables=1
[MeasureScroll]
Disabled=1
Measure=Calc
Formula=((MeasureScroll+#Speed#)>=(Max(#IntegralTopTextWidth#,#IntegralBottomTextWidth#)-#Width#)?(MeasureScroll):(MeasureScroll+#Speed#))
OnUpdateAction=[!SetOption TopText X "(#IntegralTopTextWidth#-[MeasureScroll])"][!UpdateMeter TopText][!SetOption BottomText X "(#IntegralBottomTextWidth#-#IntegralTopTextWidth#)r"][!UpdateMeter BottomText][!Redraw]
IfCondition=((MeasureScroll+#Speed#)>=(Max(#IntegralTopTextWidth#,#IntegralBottomTextWidth#)-#Width#))
IfTrueAction=[!SetVariable UpdatesAfterScrollEnd (#UpdatesAfterScrollEnd#+1)]
IfCondition2=(#UpdatesAfterScrollEnd#=#UpdatesUntilEatChar#)
IfTrueAction2=[!EnableMeasure "MeasureEatTopTextChars"][!EnableMeasure "MeasureEatBottomTextChars"]
IfConditionMode=1
DynamicVariables=1
[MeasureEatTopTextChars]
Disabled=1
Measure=String
String=""
UpdateDivider=(#EatCharUpdate#/50)
RegExpSubstitute=1
Substitute="^.{1}(.*)$":"\1","^\\1$":""
IfMatch=^$
IfMatchAction=[!SetOption TopText Text ""][!UpdateMeter "TopText"][!DisableMeasure "MeasureEatTopTextChars"][!UpdateMeasure "MeasureEatTopTextChars"]
IfNotMatchAction=[!SetOption MeasureEatTopTextChars String "[MeasureEatTopTextChars]"][!SetOption TopText Text "[MeasureEatTopTextChars]"][!UpdateMeter "TopText"]
IfMatchMode=1
DynamicVariables=1
[MeasureEatBottomTextChars]
Disabled=1
Measure=String
String=""
UpdateDivider=(#EatCharUpdate#/50)
RegExpSubstitute=1
Substitute="^.{1}(.*)$":"\1","^\\1$":""
IfMatch=^$
IfMatchAction=[!SetOption BottomText Text ""][!UpdateMeter "BottomText"][!DisableMeasure "MeasureEatBottomTextChars"][!UpdateMeasure "MeasureEatBottomTextChars"]
IfNotMatchAction=[!SetOption MeasureEatBottomTextChars String "[MeasureEatBottomTextChars]"][!SetOption BottomText Text "[MeasureEatBottomTextChars]"][!UpdateMeter "BottomText"]
IfMatchMode=1
DynamicVariables=1
; =================================================
; Meters
[Background]
Meter=Image
X=0
Y=0
W=((#skinSize# > #lastSetWidth#) ? (#skinSize#+(#skinSize#*0.35)) : (#lastSetWidth#+(#skinSize#*0.35)))
H=(#skinSize#*0.25)
SolidColor=0,0,0,1
DynamicVariables=1
Group=Visible
[Now]
Meter=String
Text=Now
StringCase=Upper
StringAlign=#interfaceTextAlignment#
FontSize=(#skinSize#*0.03)
FontColor=#opaque#
X=#nowTextPositionHor#
Y=(#skinSize#*0.09)
AntiAlias=1
FontFace=#controlsFont#
UpdateDivider=-1
Hidden=#stowAway#
Group=Stow | Visible
[Playing]
Meter=String
Text=Playing
StringCase=Upper
StringAlign=#interfaceTextAlignment#
FontSize=(#skinSize#*0.03)
FontColor=#opaque#
X=r
Y=(#skinSize#*0.125)
AntiAlias=1
FontFace=#controlsFont#
UpdateDivider=-1
Hidden=#stowAway#
Group=Stow | Visible
[Hairline]
Meter=Bar
MeasureName=mProgress#MusicSwitch#P
X=#hairlinePositionHor#
W=(#skinSize#*0.005)
H=(#skinSize#*0.25)
BarColor=#over#
SolidColor=#opaque#
BarOrientation=Vertical
ToolTipText="Progress Bar"
UpdateDivider=4
Hidden=#stowAway#
Group=Stow | Visible
[MeterContainer]
Meter=Image
SolidColor=0,0,0,255
X=(#topTextPositionHor#-#alignRight#*#Width#)
Y=0
W=#Width#
H=(#skinSize#*0.25)
DynamicVariables=1
[IntegralTopText]
Container=MeterContainer
Meter=String
MeterStyle=styleTextMajor
FontFace=#thinFont#
FontColor=0,0,0,0
StringAlign=Left
X=0
Y=0
Text="[#topText##MusicSwitch#]"
OnUpdateAction=[!SetVariable IntegralTopTextWidth [IntegralTopText:W]]
DynamicVariables=1
[IntegralBottomText]
Container=MeterContainer
Meter=String
MeterStyle=styleTextMajor
FontFace=#thickFont#
FontColor=0,0,0,0
StringAlign=Left
X=0
Y=R
Text="[#bottomText##MusicSwitch#]"
OnUpdateAction=[!SetVariable IntegralBottomTextWidth [IntegralBottomText:W]]
DynamicVariables=1
[TopText]
Meter=String
MeterStyle=styleTextMajor
X=(#IntegralTopTextWidth#-[MeasureScroll])
Y=[IntegralTopText:Y]
FontFace=#thinFont#
Text="[#topText##MusicSwitch#]"
StringAlign=Right
Container=MeterContainer
OnUpdateAction=[!SetVariable TopTextWidth [TopText:W]]
DynamicVariables=1
[BottomText]
Meter=String
MeterStyle=styleTextMajor
X=(#IntegralBottomTextWidth#-#IntegralTopTextWidth#)r
Y=R
FontFace=#thickFont#
Text="[#bottomText##MusicSwitch#]"
StringAlign=Right
Container=MeterContainer
OnUpdateAction=[!SetVariable BottomTextWidth [BottomText:W]]
DynamicVariables=1
[Time]
Meter=STRING
MeterStyle=styleTextMini
MeasureName=mPosition#MusicSwitch#
MeasureName2=mLength#MusicSwitch#
X=#nowTextPositionHor#
Y=(#skinSize#*0.02)
Text="%1/%2"
UpdateDivider=4
[Progress]
Meter=String
MeterStyle=styleTextMini
MeasureName=mProgress#MusicSwitch#W
X=r
Y=(#skinSize#*0.0465)
Text="%1%"
[Play]
MeterStyle=styleTextControls
Meter=String
MeasureName=mStateButton#MusicSwitch#
X=#playCtrlPositionHor#
Y=(#skinSize#*0.2)
Text="%1"
LeftMouseUpAction=!CommandMeasure "m#playerController#" "PlayPause"
UpdateDivider=4
SolidColor=0,0,0,1
[Previous]
MeterStyle=styleTextControls
Meter=String
X=#nowTextPositionHor#
Y=(#skinSize#*0.17)
Text="previous"
LeftMouseUpAction=!CommandMeasure "m#playerController#" "Previous"
UpdateDivider=-1
[Next]
MeterStyle=styleTextControls
Meter=String
X=#nowTextPositionHor#
Y=(#skinSize#*0.2)
Text="next"
LeftMouseUpAction=!CommandMeasure "m#playerController#" "Next"
UpdateDivider=-1
SolidColor=0,0,0,1
[Settings]
Meter=String
MeterStyle=styleTextMini
FontColor=#translucent#
X=#settingsTextPositionHor#
Y=(#skinSize#*0.0465)
Text="settings"
MouseActionCursor=1
LeftMouseUpAction=!ActivateConfig "Cleartext\Settings"
UpdateDivider=-1
I think you're right - very good catch. I modified the container position and height accordingly, it should work now - let me know if it does (or doesn't).
One other thing that should be corrected is the width of the whole skin. It is way too wide (you can see when hovering with the mouse over the area around the texts), and I guess it has something to do with the W formula in the [Background] meter above, but also (and this is way more problematic), with the processes happening in the align.lua file from the package. Maybe balala can help with that better than I do, as Lua is not exactly my field of "expertise".
EDIT: If (and when) the exaggerated width of the skin (probably due to the .lua files setting it according to the maximum width between the full artist and title texts) is corrected, the X of [MeterContainer] should be set to X=((1-#alignRight#)*#topTextPositionHor#). In that hypothetical case, the width of the skin should be (#topTextPositionHor#+#Width#) (where #topTextPositionHor# is the width of the little NOW PLAYING panel that reacts on hover and #Width# is the width of the container where the artist and title are scrolling). This is because the skin was originally made to adapt itself to the width of the entire content of both the artist and the title, but after the implementation of scrolling / char eating, the visible content of artist and title is restricted to the container's width.