Well, I didn't techincally move further, because I wasn't in a deadlock in the first place, but you asked for a sample skin and I provided it (though as you could see, I reused a sample from another topic regarding scaling, which explains the base code). My skins already use the method of initial invisible "template" meters to determine the maximum dimensions such meters would have, followed by subsequent visible meters that "fit" within the "template" previously set up. While eclectic-tech's solution (and your similar thoughts as well) is excellent and can be used, I still can't avoid using those "templates".Active Colors wrote: ↑February 18th, 2022, 1:58 pm Thanks eclectic-tech for kicking in and great that Yincognito managed to move further
Yincognito's case reminded me of a similar case I had before https://forum.rainmeter.net/viewtopic.php?t=35740&start=10#p180485.
Based on that, my initial idea was similar to the workaround that eclectic-tech provided. But same as Yincognito I don't like using !Update to update and redraw everything. I would simply add an extra pair of [!UpdateMeter *][!Redraw] at the end of each bang and it would make it work as intended (in the similar manner described in my post from that thread above).
MouseScrollUpAction=[!SetVariable FSZ (Clamp(#FSZ#+#Step#,7,200))][!UpdateMeter *][!Redraw][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!SetVariable FSZ (Clamp(#FSZ#-#Step#,7,200))][!UpdateMeter *][!Redraw][!UpdateMeter *][!UpdateMeter *]
If you don't like seeing that in front of your eyes you can substitute that with a variable
TwinPeaks=[!UpdateMeter *][!Redraw][!UpdateMeter *][!Redraw]
change to !UpdateMeterGroup or #CURRENTSECTION# if needed.
The following answer could also possibly bring some more light about the situation: https://forum.rainmeter.net/viewtopic.php?t=35740&start=10#p180489
P.s. Don't forget that [!UpdateMeter] does not redraw the meter(s). If you have multiple "groups of bangs" in one action sometimes you would need to put [!Redraw] after each "group of bangs" instead of simply having one [!Redraw] as the final bang in the whole action.
A much more similar example to what I have in my skins (using eclectic-tech's adjusted method in the uncommented code and my current method in the commented one) is:
Code: Select all
[Variables]
SC1=0,0,0
SC2=32,32,32
STC1=224,224,224
STC2=32,32,32
SCA=128
STA=255
STW=2
FSZ=16
Padding=#STW#
Step=1
; Additional Variables
MaxSizeTemplateW=([MaxSizeTemplate:W]-Trunc(#Padding#)*2)
MaxSizeTemplateH=([MaxSizeTemplate:H]-Trunc(#Padding#)*2)
SkinWidth=(#STW#*2+#Padding#*2+#MaxSizeTemplateW#)
SkinHeight=(#STW#*2+#Padding#*2+#MaxSizeTemplateH#)
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
---Meters---
; Eclectic-Tech's Adjusted Method (uncomment one method and comment the other to see differences and similarities)
[Background]
Meter=Shape
Shape=Rectangle (#STW#/2),(#STW#/2),(#CURRENTCONFIGWIDTH#-#STW#),(#CURRENTCONFIGHEIGHT#-#STW#) | Fill LinearGradient BackgroundGradient | StrokeWidth 0 | Stroke Color #STC#,#SCA#
Shape2=Path ULCorner | StrokeWidth #STW# | Stroke Color #STC1#,#STA#
ULCorner=(#STW#/2),(#CURRENTCONFIGHEIGHT#) | LineTo (#STW#/2),(#STW#/2) | LineTo (#CURRENTCONFIGWIDTH#),(#STW#/2)
Shape3=Path BRCorner | StrokeWidth #STW# | Stroke Color #STC2#,#STA#
BRCorner=(#CURRENTCONFIGWIDTH#-#STW#/2),(0) | LineTo (#CURRENTCONFIGWIDTH#-#STW#/2),(#CURRENTCONFIGHEIGHT#-#STW#/2) | LineTo (0),(#CURRENTCONFIGHEIGHT#-#STW#/2)
BackgroundGradient=90 | #SC1#,#SCA# ; 0.0 | #SC2#,#SCA# ; 1.0
UpdateDivider=-1
LeftMouseUpAction=[!SetVariable STC1 #STC2#][!SetVariable STC2 #STC1#][!UpdateMeter Background][!Redraw]
DynamicVariables=1
[MaxSizeTemplate]
Group=AllMetersGroup
Meter=String
FontFace=Consolas
FontColor=0,0,0,0
FontSize=#FSZ#
AntiAlias=1
Padding=#Padding#,#Padding#,#Padding#,#Padding#
X=(#STW#)
Y=(#STW#)
Text="00000"
UpdateDivider=-1
MouseScrollUpAction=[!SetVariable FSZ (Clamp(#FSZ#+#Step#,7,200))][!UpdateMeterGroup AllMetersGroup][!HideMeter Background][!Redraw][!UpdateMeter Background][!ShowMeter Background][!Redraw]
MouseScrollDownAction=[!SetVariable FSZ (Clamp(#FSZ#-#Step#,7,200))][!UpdateMeterGroup AllMetersGroup][!HideMeter Background][!Redraw][!UpdateMeter Background][!ShowMeter Background][!Redraw]
DynamicVariables=1
[ActualSizeValue]
Group=AllMetersGroup
Meter=String
FontFace=Consolas
FontColor=255,255,255,255
FontSize=#FSZ#
AntiAlias=1
Padding=#Padding#,#Padding#,#Padding#,#Padding#
StringAlign=Right
X=(#STW#+#Padding#*2+#MaxSizeTemplateW#)
Y=(#STW#)
W=(#MaxSizeTemplateW#)
H=(#MaxSizeTemplateH#)
Text="000"
UpdateDivider=-1
DynamicVariables=1
; Yincognito's Current Method (uncomment one method and comment the other to see differences and similarities)
; [MaxSizeTemplate]
; Group=AllMetersGroup
; Meter=String
; FontFace=Consolas
; FontColor=0,0,0,0
; FontSize=#FSZ#
; AntiAlias=1
; Padding=#Padding#,#Padding#,#Padding#,#Padding#
; X=(#STW#)
; Y=(#STW#)
; Text="00000"
; UpdateDivider=-1
; DynamicVariables=1
; [Background]
; Meter=Shape
; Shape=Rectangle (#STW#/2),(#STW#/2),(#SkinWidth#-#STW#),(#SkinHeight#-#STW#) | Fill LinearGradient BackgroundGradient | StrokeWidth 0 | Stroke Color #STC#,#SCA#
; Shape2=Path ULCorner | StrokeWidth #STW# | Stroke Color #STC1#,#STA#
; ULCorner=(#STW#/2),(#SkinHeight#) | LineTo (#STW#/2),(#STW#/2) | LineTo (#SkinWidth#),(#STW#/2)
; Shape3=Path BRCorner | StrokeWidth #STW# | Stroke Color #STC2#,#STA#
; BRCorner=(#SkinWidth#-#STW#/2),(0) | LineTo (#SkinWidth#-#STW#/2),(#SkinHeight#-#STW#/2) | LineTo (0),(#SkinHeight#-#STW#/2)
; BackgroundGradient=90 | #SC1#,#SCA# ; 0.0 | #SC2#,#SCA# ; 1.0
; UpdateDivider=-1
; MouseScrollUpAction=[!SetVariable FSZ (Clamp(#FSZ#+#Step#,7,200))][!UpdateMeter *][!Redraw]
; MouseScrollDownAction=[!SetVariable FSZ (Clamp(#FSZ#-#Step#,7,200))][!UpdateMeter *][!Redraw]
; LeftMouseUpAction=[!SetVariable STC1 #STC2#][!SetVariable STC2 #STC1#][!UpdateMeter *][!Redraw]
; DynamicVariables=1
; [ActualSizeValue]
; Group=AllMetersGroup
; Meter=String
; FontFace=Consolas
; FontColor=255,255,255,255
; FontSize=#FSZ#
; AntiAlias=1
; Padding=#Padding#,#Padding#,#Padding#,#Padding#
; StringAlign=Right
; X=(#STW#+#Padding#*2+#MaxSizeTemplateW#)
; Y=(#STW#)
; W=(#MaxSizeTemplateW#)
; H=(#MaxSizeTemplateH#)
; Text="000"
; UpdateDivider=-1
; DynamicVariables=1
P.S. Just in case it isnt clear, the whole template thing comes from needing to know the maximum potential size of a string meter of a certain "style" (a maximum of 5 zeros in this case, but it could be anything, including a multiline string).
P.S.S. I liked your "Twin Peaks" reference, nice one!