It is currently May 24th, 2024, 3:11 am

Help | Resizable Skin

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16260
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help | Resizable Skin

Post by balala »

RicardoTM wrote: December 30th, 2022, 8:47 pm Here's the package if you want to take a look. Only load the gauge and double click it to load the list.
Complete the LeftMouseDoubleClickAction option of the [MeterGauge0] meter as it follows:
LeftMouseDoubleClickAction=[!ToggleConfig "RTM Skin VERSION 2\GPU Full Sensor List" "FullSensorList.ini"][!SetWindowPosition "(#CURRENTCONFIGX#+#CURRENTCONFIGWIDTH#/2)" "(#CURRENTCONFIGY#+#CURRENTCONFIGHEIGHT#)" "50%" "0%" "RTM Skin VERSION 2\GPU Full Sensor List"].
Note that the FullSensorList.ini skin follows the other one only if it is activated on the double click. This means that if you have both skins activated and you drag the GPU.ini skin, the FullSensorList.ini doesn't follow it. In order to get this, you have to deactivate and reactivate FullSensorList.ini.
RicardoTM
Posts: 279
Joined: December 28th, 2022, 9:30 pm
Location: México

Re: Help | Resizable Skin

Post by RicardoTM »

That works! It's sad there's no way I can't make them move together, but this is good enough. I only don't understand one part of the code you added.
(in red)
balala wrote: December 30th, 2022, 9:03 pm LeftMouseDoubleClickAction=[!ToggleConfig "RTM Skin VERSION 2\GPU Full Sensor List" "FullSensorList.ini"][!SetWindowPosition "(#CURRENTCONFIGX#+#CURRENTCONFIGWIDTH#/2)" "(#CURRENTCONFIGY#+#CURRENTCONFIGHEIGHT#)" "50%" "0%" "RTM Skin VERSION 2\GPU Full Sensor List"].
are those X and Y? and why "%"?

Thank you Balala!
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5417
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Help | Resizable Skin

Post by eclectic-tech »

Thanks for jumping in Balala, I don't mind and appreciate the help :thumbup:

Balala offered a solution to have separate skins 'follow' each other when re-positioned.

There is another method to have skins move together when dragged to a new position: DragGroup

By adding DragGroup=MyGroupName to the [Rainmeter] section of the skins you want to move together, you can select any of them, using 'Ctrl+Alt+Left-click' and all of them will be selected and move as if they were one skin.

This has the limitation that all skins in the group must be active to be selected and moved to a new position.
RicardoTM
Posts: 279
Joined: December 28th, 2022, 9:30 pm
Location: México

Re: Help | Resizable Skin

Post by RicardoTM »

eclectic-tech wrote: December 31st, 2022, 2:15 am Thanks for jumping in Balala, I don't mind and appreciate the help :thumbup:
Both of you have been really helpful! I didn't expect such a good community here tbh. Thank you both!
eclectic-tech wrote: December 31st, 2022, 2:15 am Balala offered a solution to have separate skins 'follow' each other when re-positioned.

There is another method to have skins move together when dragged to a new position: DragGroup

By adding DragGroup=MyGroupName to the [Rainmeter] section of the skins you want to move together, you can select any of them, using 'Ctrl+Alt+Left-click' and all of them will be selected and move as if they were one skin.

This has the limitation that all skins in the group must be active to be selected and moved to a new position.
Yes I know, I commented about it here
RicardoTM wrote: December 30th, 2022, 5:41 pm Is it possible to make two or more skins move together? I know ctrl + alt + click will do, but I want them to always move together
I just wanted to make sure there wasn't another way, I spend quite some time looking around for information about it but nothing came up.

Thank you anyway!

I don't really want to abuse your kindness guys.. but now another thing came up... I tried the same code for the resizable gauge in the list and it's not working as it should... the text resizes correctly but the shapes don't, I may be doing something wrong that I cannot see, I've checked a lot of times but everything seems fine to me, even the log is clear.. My bet is that the shapes aren't doing what I thought they would do.

here's the new code

Code: Select all

[Rainmeter]
Update=100
AccurateText=1
DynamicWindowSize=1
Group=GPU

[Metadata]
Name=GPUFullSensorList
Author=RicardoTM
Information= A list that follows a gauge
Version=0.1
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0


[Variables]
GpuNameIndex=9
GPUTempIndex=9
GPUFanSpeedIndex=11
GPUClockSpeedIndex=13
GPUCoreVoltageIndex=10
GpuPowerDrawIndex=12
GpuCoreLoadIndex=14

HWINFO64=["C:\Program Files\HWiNFO64\HWiNFO64.exe"]

StrokeGradient=90 | 255,255,255,200 ; 0.2 | 0,0,0,0 ; 1.0 
StrokeGradient2=270 | 255,255,255,145 ; 0.0 | 0,0,0,0 ; 5.0

ListSize=150

ScrollMouseIncrement=5

[MeasureGPUSensorName]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=SOFTWARE\HWINFO64\VSB
RegValue=Sensor#GPUNameIndex#
UpdateDivider=-1
RegExpSubstitute=1
Substitute="^.*]:":""

[MeasureGPUTempValue]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=SOFTWARE\HWINFO64\VSB
RegValue=Value#GPUTempIndex#

[MeasureGPUFanSpeedValue]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=SOFTWARE\HWINFO64\VSB
RegValue=Value#GPUFanSpeedIndex#

[MeasureGPUClockSpeedValue]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=SOFTWARE\HWINFO64\VSB
RegValue=Value#GPUClockSpeedIndex#

[MeasureGPUCoreVoltageValue]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=SOFTWARE\HWINFO64\VSB
RegValue=Value#GPUCoreVoltageIndex#

[MeasureGPUPowerDrawValue]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=SOFTWARE\HWINFO64\VSB
RegValue=Value#GpuPowerDrawIndex#

[MeasureGPUCoreLoadValue]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=SOFTWARE\HWINFO64\VSB
RegValue=Value#GpuCoreLoadIndex#

[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
InLineSetting=Shadow | 2 | 2 | 0 | 0,0,0,100
FontColor=225,225,225
fontName=HelveticaNeueLT Std
FontSize=(#ListSize#)*0.1
AntiAlias=1

[styleTitle2]
StringAlign=Center
StringStyle=Bold
InLineSetting=Shadow | 2 | 2 | 0 | 0,0,0,100
FontColor=225,225,225
fontName=HelveticaNeueLT Std
FontSize=(#ListSize#)*0.08
AntiAlias=1

[MeterBG]
Meter=Shape
Shape=Rectangle 20,0,300,300,16 | Fill RadialGradient Gradient2 | StrokeWidth 0.3 | Stroke LinearGradient StrokeGradient
StrokeGradient=#StrokeGradient#
Gradient2=0,-150 | 50,59,66,80 ; 0.0| 0,0,0,200 ; 1.2
Shape2=Rectangle 0,0,340,62,5 | Fill LinearGradient MyFillGradient | StrokeWidth 0.3 | Stroke LinearGradient StrokeGradient2
StrokeGradient2=#StrokeGradient2#
MyFillGradient=270 | 67,67,67,225 ; 0.5 | 0,0,0,0 ; 1.0 
Shape3=Rectangle 1.5,1.5,337,60,3 | Fill RadialGradient MyRadialGradient | StrokeWidth 0
MyRadialGradient=0,-25 | 41,49,55,255 ; 0.0| 24,24,24,255 ; 1.0
Shape4=Rectangle 2,2,335,58,3 | Fill LinearGradient Gradient1 | StrokeWidth 0
Gradient1=270 | 255,255,255,75 ; 0.0 | 255,255,255,35 ; 1.0
Shape5=Rectangle 3,3,333,56,0 | Fill RadialGradient MyRadialGradient2 | StrokeWidth 0
MyRadialGradient2=0,-30 | 41,49,55,255 ; 0.0| 5,5,5,255 ; 1.5
MouseOverAction=[!ShowMeter "MeterHWINFO64"] 
MouseLeaveAction=[!HideMeter "MeterHWINFO64"]
W=(#ListSize#)*2.28
H=(#ListSize#)*2.1
x=0
y=0
MouseScrollDownAction=[!SetVariable ListSize "(#ListSize#-#ScrollMouseIncrement# < 80 ? 80 : #ListSize#-#ScrollMouseIncrement#)"][!WriteKeyValue Variables ListSize "(#ListSize#-#ScrollMouseIncrement# < 0 ? 80 : #ListSize#-#ScrollMouseIncrement#)"][!UpdateMeter *][!UpdateMeasure *][!Redraw]
MouseScrollUpAction=[!SetVariable ListSize "(#ListSize#+#ScrollMouseIncrement# > 150 ? 150 : #ListSize#+#ScrollMouseIncrement#)"] [!WriteKeyValue Variables ListSize "(#ListSize#+#ScrollMouseIncrement# > 150 ? 150 : #ListSize#+#ScrollMouseIncrement#)"][!UpdateMeasure *][!UpdateMeter *][!Redraw]
DynamicVariables=1

[MeterHWINFO64]
Meter=String
StringAlign=Center
hidden=1
SolidColor=0,0,0,1
x=([MeterBG:W])*0.492
y=([MeterBG:H])*0.135
FontSize=(#ListSize#)*0.065
FontColor=35,150,225,200
Text=Double Click Me to Open HWINFO64!
AntiAlias=1
MouseOverAction=!SetOption MeterHWINFO64 FontColor f72f2f
MouseLeaveAction=!SetOption MeterHWINFO64 FontColor 35,150,225,200
LeftMouseDownAction=[#HWINFO64][!SetOption MeterHWINFO64 FontColor 255,255,200]
DynamicVariables=1
[MeterGpuName]
Meter=String
StringStyle=Bold
MeasureName=MeasureGPUSensorName
Text=%1
MeterStyle=StyleTitle
x=([MeterBG:W])*0.492
y=([MeterBG:H])*0.062
DynamicVariables=1
InlineSetting2=Color | 0,0,0,0
InlinePattern2=:
[MeterGpuTemp]
Meter=String
MeasureName=MeasureGPUTempValue
Text=Temperature = %1
MeterStyle=StyleTitle2
x=([MeterBG:W])*0.492
y=([MeterBG:H])*0.23
DynamicVariables=1
[MeterLine]
Meter=Shape
Shape=Rectangle 0,0,300,0.5 | Fill RadialGradient Gradient3 | StrokeWidth 0
Gradient3=0,0.2 | 255,255,255,200 ; 0 | 255,255,255,45 ; 1
x=([MeterBG:W])*0.06
y=([MeterBG:H])*0.315
DynamicVariables=1
[MeterGpuClockSpeed]
Meter=String
MeasureName=MeasureGPUClockSpeedValue
Text=Clock Speed = %1
MeterStyle=StyleTitle2
x=([MeterBG:W])*0.492
y=([MeterBG:H])*0.358
DynamicVariables=1
[MeterLine2]
Meter=Shape
Shape=Rectangle 0,0,300,0.5 | Fill RadialGradient Gradient3 | StrokeWidth 0
Gradient3=0,0.2 | 255,255,255,200 ; 0 | 255,255,255,45 ; 1
x=([MeterBG:W])*0.06
y=([MeterBG:H])*0.443
DynamicVariables=1
[MeterGpuFanSpeed]
Meter=String
MeasureName=MeasureGPUFanSpeedValue
Text=Fan Speed = %1
MeterStyle=StyleTitle2
x=([MeterBG:W])*0.492
y=([MeterBG:H])*0.485
DynamicVariables=1
[MeterLine3]
Meter=Shape
Shape=Rectangle 0,0,300,0.5 | Fill RadialGradient Gradient3 | StrokeWidth 0
Gradient3=0,0.2 | 255,255,255,200 ; 0 | 255,255,255,45 ; 1
x=([MeterBG:W])*0.06
y=([MeterBG:H])*0.57
DynamicVariables=1
[MeterGpuCoreLoad]
Meter=String
MeasureName=MeasureGPUCoreLoadValue
Text=Core Load = %1
MeterStyle=StyleTitle2
x=([MeterBG:W])*0.492
y=([MeterBG:H])*0.612
DynamicVariables=1
[MeterLine4]
Meter=Shape
Shape=Rectangle 0,0,300,0.5 | Fill RadialGradient Gradient3 | StrokeWidth 0
Gradient3=0,0.2 | 255,255,255,200 ; 0 | 255,255,255,45 ; 1
x=([MeterBG:W])*0.06
y=([MeterBG:H])*0.698
DynamicVariables=1
[MeterGpuCoreVoltage]
Meter=String
MeasureName=MeasureGPUCoreVoltageValue
Text=Core Voltage = %1
MeterStyle=StyleTitle2
x=([MeterBG:W])*0.492
y=([MeterBG:H])*0.735
DynamicVariables=1
[MeterLine5]
Meter=Shape
Shape=Rectangle 0,0,300,0.5 | Fill RadialGradient Gradient3 | StrokeWidth 0
Gradient3=0,0.2 | 255,255,255,200 ; 0 | 255,255,255,45 ; 1
x=([MeterBG:W])*0.06
y=([MeterBG:H])*0.823
DynamicVariables=1
[MeterGpuPowerDraw]
Meter=String
MeasureName=MeasureGPUPowerDrawValue
Text=Power Draw = %1
MeterStyle=StyleTitle2
x=([MeterBG:W])*0.492
y=([MeterBG:H])*0.865
DynamicVariables=1
[MeterCloseList]
Meter=Shape
Shape=Ellipse 0,0,7, | Fill Color f72f2f | StrokeWidth 1.6 | Stroke LinearGradient StrokeGradientt
StrokeGradientt=270 | 255,255,255,85 ; 0.0 | 0,0,0,0 ; 1.0
LeftMouseUpAction=[!DeactivateConfig "RTM Skin VERSION 2\GPU Full Sensor List" "FullSensorList.ini"]
x=([MeterBG:W])*0.95
y=([MeterBG:H])*0.045
DynamicVariables=1

and here's the package if you need to take a better look:
Resizable gauge + list_...rmskin

Thank you again guys, it is looking so good now thanks to you!
You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5417
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Help | Resizable Skin

Post by eclectic-tech »

Most Rainmeter meters (String, Image, etc.) are always rectangles. They are anchored, and scaled, from the upper-left corner of the meter.

Shape meters are different in many ways, especially when trying to scale them to match other Rainmeter meters.

The closest method I use is to design a skin at the size and relative positions I want, then add a SCALER variable to all X, Y, W, H values of the meters. This can be simplified in some cases using Section Variables of already scaled meter; that is what you did for your text meters.

For Shape meters, I add a Scaler multiplier formula to each dimension (e.g., Rectangle X,Y,W,H,Radius ) and Stroke parameters to control the shape size. This corresponds closely to the other meters that use the upper-left corner as the anchor for sizing.

Aside: TransformationMatrix can change the fixed point away from the upper-left corner, but also introduces mouse interaction issues.

I modified your code by changing the FontSize of String meters and the dimension and stroke size of Shape meters to use a 'SCALER' variable and modified the Mouse Scroll Up/Down actions to control the 'SCALER' variable.

The 'ListSize' and 'ScrollMouseIncrement' variables are not used and can be deleted; the 'SCALER' variable handles their function.

I would suggest using this same scaling method in your gauge skin; or combining the 2 skins into one, which would eliminate the relative positioning you asked about earlier.

Take a look at these changes to your 'FullSensorList.ini' and see if you have any questions.

Code: Select all

[Rainmeter]
Update=100
AccurateText=1
DynamicWindowSize=1
Group=GPU

[Metadata]
Name=GPUFullSensorList
Author=RicardoTM
Information= A list that follows a gauge
Version=0.1
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0


[Variables]
GpuNameIndex=9
GPUTempIndex=9
GPUFanSpeedIndex=11
GPUClockSpeedIndex=13
GPUCoreVoltageIndex=10
GpuPowerDrawIndex=12
GpuCoreLoadIndex=14

HWINFO64=["C:\Program Files\HWiNFO64\HWiNFO64.exe"]

StrokeGradient=90 | 255,255,255,200 ; 0.2 | 0,0,0,0 ; 1.0 
StrokeGradient2=270 | 255,255,255,145 ; 0.0 | 0,0,0,0 ; 5.0

; ListSize=150

; ScrollMouseIncrement=5

Scaler=1

[MeasureGPUSensorName]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=SOFTWARE\HWINFO64\VSB
RegValue=Sensor#GPUNameIndex#
UpdateDivider=-1
RegExpSubstitute=1
Substitute="^.*]:":""

[MeasureGPUTempValue]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=SOFTWARE\HWINFO64\VSB
RegValue=Value#GPUTempIndex#

[MeasureGPUFanSpeedValue]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=SOFTWARE\HWINFO64\VSB
RegValue=Value#GPUFanSpeedIndex#

[MeasureGPUClockSpeedValue]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=SOFTWARE\HWINFO64\VSB
RegValue=Value#GPUClockSpeedIndex#

[MeasureGPUCoreVoltageValue]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=SOFTWARE\HWINFO64\VSB
RegValue=Value#GPUCoreVoltageIndex#

[MeasureGPUPowerDrawValue]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=SOFTWARE\HWINFO64\VSB
RegValue=Value#GpuPowerDrawIndex#

[MeasureGPUCoreLoadValue]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=SOFTWARE\HWINFO64\VSB
RegValue=Value#GpuCoreLoadIndex#

[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
InLineSetting=Shadow | 2 | 2 | 0 | 0,0,0,100
FontColor=225,225,225
fontName=HelveticaNeueLT Std
FontSize=(15*#Scaler#)
AntiAlias=1

[styleTitle2]
StringAlign=Center
StringStyle=Bold
InLineSetting=Shadow | 2 | 2 | 0 | 0,0,0,100
FontColor=225,225,225
fontName=HelveticaNeueLT Std
FontSize=(12*#Scaler#)
AntiAlias=1

[MeterBG]
Meter=Shape
Shape=Rectangle (20*#Scaler#),0,(300*#Scaler#),(300*#Scaler#),(16*#Scaler#) | Fill RadialGradient Gradient2 | StrokeWidth (0.3*#Scaler#) | Stroke LinearGradient StrokeGradient
StrokeGradient=#StrokeGradient#
Gradient2=0,-150 | 50,59,66,80 ; 0.0| 0,0,0,200 ; 1.2

Shape2=Rectangle 0,0,(340*#Scaler#),(62*#Scaler#),(5*#Scaler#) | Fill LinearGradient MyFillGradient | StrokeWidth (0.3*#Scaler#) | Stroke LinearGradient StrokeGradient2
StrokeGradient2=#StrokeGradient2#
MyFillGradient=270 | 67,67,67,225 ; 0.5 | 0,0,0,0 ; 1.0 

Shape3=Rectangle (1.5*#Scaler#),(1.5*#Scaler#),(337*#Scaler#),(60*#Scaler#),(3*#Scaler#) | Fill RadialGradient MyRadialGradient | StrokeWidth 0
MyRadialGradient=0,-25 | 41,49,55,255 ; 0.0| 24,24,24,255 ; 1.0

Shape4=Rectangle (2*#Scaler#),(2*#Scaler#),(335*#Scaler#),(58*#Scaler#),(3*#Scaler#) | Fill LinearGradient Gradient1 | StrokeWidth 0
Gradient1=270 | 255,255,255,75 ; 0.0 | 255,255,255,35 ; 1.0

Shape5=Rectangle (3*#Scaler#),(3*#Scaler#),(333*#Scaler#),(56*#Scaler#),0 | Fill RadialGradient MyRadialGradient2 | StrokeWidth 0
MyRadialGradient2=0,-30 | 41,49,55,255 ; 0.0| 5,5,5,255 ; 1.5

MouseOverAction=[!ShowMeter "MeterHWINFO64"] 
MouseLeaveAction=[!HideMeter "MeterHWINFO64"]
W=(342*#Scaler#)
H=(315*#Scaler#)
x=0
y=0
MouseScrollDownAction=[!SetVariable Scaler (Clamp(#Scaler#-0.1,0.6,1))][!WriteKeyValue Variables Scaler (Clamp(#Scaler#-0.1,0.6,1))]

; [!SetVariable ListSize "(#ListSize#-#ScrollMouseIncrement# < 80 ? 80 : #ListSize#-#ScrollMouseIncrement#)"][!WriteKeyValue Variables ListSize "(#ListSize#-#ScrollMouseIncrement# < 0 ? 80 : #ListSize#-#ScrollMouseIncrement#)"][!UpdateMeter *][!UpdateMeasure *][!Redraw]

MouseScrollUpAction=[!SetVariable Scaler (Clamp(#Scaler#+0.1,0.6,1))][!WriteKeyValue Variables Scaler (Clamp(#Scaler#+0.1,0.6,1))]

; [!SetVariable ListSize "(#ListSize#+#ScrollMouseIncrement# > 150 ? 150 : #ListSize#+#ScrollMouseIncrement#)"] [!WriteKeyValue Variables ListSize "(#ListSize#+#ScrollMouseIncrement# > 150 ? 150 : #ListSize#+#ScrollMouseIncrement#)"][!UpdateMeasure *][!UpdateMeter *][!Redraw]
DynamicVariables=1

[MeterHWINFO64]
Meter=String
StringAlign=Center
hidden=1
SolidColor=0,0,0,1
x=([MeterBG:W])*0.492
y=([MeterBG:H])*0.135
FontSize=(10*#Scaler#)
FontColor=35,150,225,200
Text=Double Click Me to Open HWINFO64!
AntiAlias=1
MouseOverAction=!SetOption MeterHWINFO64 FontColor f72f2f
MouseLeaveAction=!SetOption MeterHWINFO64 FontColor 35,150,225,200
LeftMouseDownAction=[#HWINFO64][!SetOption MeterHWINFO64 FontColor 255,255,200]
DynamicVariables=1

[MeterGpuName]
Meter=String
StringStyle=Bold
MeasureName=MeasureGPUSensorName
Text=%1
MeterStyle=StyleTitle
x=([MeterBG:W])*0.492
y=([MeterBG:H])*0.062
DynamicVariables=1
InlineSetting2=Color | 0,0,0,0
InlinePattern2=:

[MeterGpuTemp]
Meter=String
MeasureName=MeasureGPUTempValue
Text=Temperature = %1
MeterStyle=StyleTitle2
x=([MeterBG:W])*0.492
y=([MeterBG:H])*0.23
DynamicVariables=1

[MeterLine]
Meter=Shape
Shape=Rectangle 0,0,(300*#Scaler#),(0.5*#Scaler#) | Fill RadialGradient Gradient3 | StrokeWidth 0
Gradient3=0,0.2 | 255,255,255,200 ; 0 | 255,255,255,45 ; 1
x=([MeterBG:W])*0.06
y=([MeterBG:H])*0.315
DynamicVariables=1

[MeterGpuClockSpeed]
Meter=String
MeasureName=MeasureGPUClockSpeedValue
Text=Clock Speed = %1
MeterStyle=StyleTitle2
x=([MeterBG:W])*0.492
y=([MeterBG:H])*0.358
DynamicVariables=1

[MeterLine2]
Meter=Shape
Shape=Rectangle 0,0,(300*#Scaler#),(0.5*#Scaler#) | Fill RadialGradient Gradient3 | StrokeWidth 0
Gradient3=0,0.2 | 255,255,255,200 ; 0 | 255,255,255,45 ; 1
x=([MeterBG:W])*0.06
y=([MeterBG:H])*0.443
DynamicVariables=1

[MeterGpuFanSpeed]
Meter=String
MeasureName=MeasureGPUFanSpeedValue
Text=Fan Speed = %1
MeterStyle=StyleTitle2
x=([MeterBG:W])*0.492
y=([MeterBG:H])*0.485
DynamicVariables=1

[MeterLine3]
Meter=Shape
Shape=Rectangle 0,0,(300*#Scaler#),(0.5*#Scaler#) | Fill RadialGradient Gradient3 | StrokeWidth 0
Gradient3=0,0.2 | 255,255,255,200 ; 0 | 255,255,255,45 ; 1
x=([MeterBG:W])*0.06
y=([MeterBG:H])*0.57
DynamicVariables=1

[MeterGpuCoreLoad]
Meter=String
MeasureName=MeasureGPUCoreLoadValue
Text=Core Load = %1
MeterStyle=StyleTitle2
x=([MeterBG:W])*0.492
y=([MeterBG:H])*0.612
DynamicVariables=1

[MeterLine4]
Meter=Shape
Shape=Rectangle 0,0,(300*#Scaler#),(0.5*#Scaler#) | Fill RadialGradient Gradient3 | StrokeWidth 0
Gradient3=0,0.2 | 255,255,255,200 ; 0 | 255,255,255,45 ; 1
x=([MeterBG:W])*0.06
y=([MeterBG:H])*0.698
DynamicVariables=1

[MeterGpuCoreVoltage]
Meter=String
MeasureName=MeasureGPUCoreVoltageValue
Text=Core Voltage = %1
MeterStyle=StyleTitle2
x=([MeterBG:W])*0.492
y=([MeterBG:H])*0.735
DynamicVariables=1

[MeterLine5]
Meter=Shape
Shape=Rectangle 0,0,(300*#Scaler#),(0.5*#Scaler#) | Fill RadialGradient Gradient3 | StrokeWidth 0
Gradient3=0,0.2 | 255,255,255,200 ; 0 | 255,255,255,45 ; 1
x=([MeterBG:W])*0.06
y=([MeterBG:H])*0.823
DynamicVariables=1

[MeterGpuPowerDraw]
Meter=String
MeasureName=MeasureGPUPowerDrawValue
Text=Power Draw = %1
MeterStyle=StyleTitle2
x=([MeterBG:W])*0.492
y=([MeterBG:H])*0.865
DynamicVariables=1

[MeterCloseList]
Meter=Shape
Shape=Ellipse 0,0,(7*#Scaler#), | Fill Color f72f2f | StrokeWidth (1.6*#Scaler#) | Stroke LinearGradient StrokeGradientt
StrokeGradientt=270 | 255,255,255,85 ; 0.0 | 0,0,0,0 ; 1.0
LeftMouseUpAction=[!DeactivateConfig "RTM Skin VERSION 2\GPU Full Sensor List" "FullSensorList.ini"]
x=([MeterBG:W])*0.95
y=([MeterBG:H])*0.045
DynamicVariables=1

scale2.gif
You do not have the required permissions to view the files attached to this post.
RicardoTM
Posts: 279
Joined: December 28th, 2022, 9:30 pm
Location: México

Re: Help | Resizable Skin

Post by RicardoTM »

Thank you E.T.! (It should not, but the extra-terrestrial comes into my mind lol) this actually gives me much more control over the overall size and makes it less complicated! also thank you for the overall explanations.
eclectic-tech wrote: December 31st, 2022, 4:10 am Most Rainmeter meters (String, Image, etc.) are always rectangles. They are anchored, and scaled, from the upper-left corner of the meter.
Image
This got me thinking about AnchorX and Y in the rainmeter settings file, I currently use it to change the anchor point to the center, but the only problem I found is that Rainmeter won't save those values when exporting the skins, is there a workaround to that?
eclectic-tech wrote: December 31st, 2022, 4:10 am Aside: TransformationMatrix can change the fixed point away from the upper-left corner, but also introduces mouse interaction issues.
I read about it in the documentation and seems hell complicated lol but I'll give it a try later on to see what can it really do for my needs, seems really useful.
eclectic-tech wrote: December 31st, 2022, 4:10 am I would suggest using this same scaling method in your gauge skin; or combining the 2 skins into one, which would eliminate the relative positioning you asked about earlier.
Sure I'll use it, I'm also planning to use more variables and formulas so I can have much better control at the end. I was actually going to combine them but I realized it's way more useful to have the option to move the skins independently.
eclectic-tech wrote: December 31st, 2022, 4:10 am Take a look at these changes to your 'FullSensorList.ini' and see if you have any questions.
I see you used the Clamp Snippet Clamp(num, lower, upper) which I didn't know about (as everything else lol) and I can think of some more things to use it for. But I don't fully understand it tbh.. The documentation says
The argument num is the number or formula to test. lower is the lowest value it can be, and upper is the highest value it can be.
you used it like this

Code: Select all

MouseScrollDownAction=[!SetVariable Scaler (Clamp(#Scaler#-0.1,0.6,1))][!WriteKeyValue Variables Scaler (Clamp(#Scaler#-0.1,0.6,1))]
I completely understand the lower(0.6) and upper(1) values you used, but I don't really understand the i value (0.1). I know that's the
Number to test
but I don't know how you get to that number.

I converted it to Clamp(#Scaler#-0.1,#MinSize#,#MaxSize#) and I need to know where that comes from to make a proper variable.

Also, you took out

Code: Select all

ScrollMouseIncrement
, but how can I control the mouse increments now?

Nevermind, that's the Mouse Increment value lol

Thank you very much once again E.T! (I thought your nickname was Electric-Tech, now I see it's Eclectic, I need glasses...)
Last edited by RicardoTM on December 31st, 2022, 8:18 pm, edited 2 times in total.
User avatar
balala
Rainmeter Sage
Posts: 16260
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help | Resizable Skin

Post by balala »

RicardoTM wrote: December 30th, 2022, 10:30 pm I only don't understand one part of the code you added.
(in red)


are those X and Y? and why "%"?
I tried to explain here a few things. The first two parameters of the !SetWindowPosition bang are the horizontal and vertical position you want to set the skin to. These have been set to (#CURRENTCONFIGX#+#CURRENTCONFIGWIDTH#/2) and (#CURRENTCONFIGY#+#CURRENTCONFIGHEIGHT#):
  • The first parameter is the horizontal position. It is set to half of the width of skin: #CURRENTCONFIGX# is the horizontal position of the skin itself and #CURRENTCONFIGWIDTH#/2 is the half of its width. Added together, these two parameters gives horizontally the middle of the skin
  • The second parameter ((#CURRENTCONFIGY#+#CURRENTCONFIGHEIGHT#)) represents where vertically the follower skin will be placed. It is set to the vertical position of the current skin (#CURRENTCONFIGY#) added with its height (#CURRENTCONFIGHEIGHT#). This way we get the bottom part of the skin.
.
The last two parameters (50% and 0%) are the anchor point of the skin, so the point of skin which is placed to the previously set position. 50% means the first parameter of all four ((#CURRENTCONFIGX#+#CURRENTCONFIGWIDTH#/2)) is set to 50% of the width of follower skin (so to its horizontal middle), while 0% (the fourth parameter) means that the upper side of the follower skin is set exactly to the post set by the second parameter (in this case (#CURRENTCONFIGY#+#CURRENTCONFIGHEIGHT#)).
Hope this makes sense...
RicardoTM wrote: December 31st, 2022, 3:00 am I just wanted to make sure there wasn't another way, I spend quite some time looking around for information about it but nothing came up.
Actually this is not impossible at all either. Here is a workaround.
You have to add one single measure to the followed skin (in this case to GPU.ini), this one:

Code: Select all

[MeasurePosition]
Measure=Calc
Formula=( #CURRENTCONFIGX# + #CURRENTCONFIGY# )
OnChangeAction=[!SetWindowPosition "(#CURRENTCONFIGX#+#CURRENTCONFIGWIDTH#/2)" "(#CURRENTCONFIGY#+#CURRENTCONFIGHEIGHT#)" "50%" "0%" "RTM Skin VERSION 2\GPU Full Sensor List"]
DynamicVariables=1
As you can see the measure is returning the sum of horizontal and vertical position of the skin in which it is placed (GPU.ini). When this sum is changing, you get the OnChangeAction option executed and accordingly the !SetWindowPosition sets the new position of the follower skin (FullSensorList.ini).
The above sum practically is changing whenever are you moving this skin away, even if theoretically there might be cases when you move the skin, both parameters of the sum are changing, however their sum doesn't. This practically is an extremely unlikely case.
RicardoTM
Posts: 279
Joined: December 28th, 2022, 9:30 pm
Location: México

Re: Help | Resizable Skin

Post by RicardoTM »

balala wrote: December 31st, 2022, 6:54 pm The last two parameters (50% and 0%) are the anchor point of the skin, so the point of skin which is placed to the previously set position. 50% means the first parameter of all four
Yeah I figured it out after playing around with it, I changed 0% to 19% to adjust it to where I wanted it to be.
I was confused because % is used to something else that I didn't fully understand until a little while ago that I was playing with formulas, then I read

Code: Select all

 MeasureName=SomeMeasure
MeasureName2=SomeMeasure2
Text=This is text containing %1 and %2.
; %1 and %2 will be replaced by the string values of SomeMeasure and
; SomeMeasure2, respectively.
and (%n) finally made sense to me 😅
balala wrote: December 31st, 2022, 6:54 pm Actually this is not impossible at all either. Here is a workaround.
You have to add one single measure to the followed skin (in this case to GPU.ini), this one:

Code: Select all

[MeasurePosition]
Measure=Calc
Formula=( #CURRENTCONFIGX# + #CURRENTCONFIGY# )
OnChangeAction=[!SetWindowPosition "(#CURRENTCONFIGX#+#CURRENTCONFIGWIDTH#/2)" "(#CURRENTCONFIGY#+#CURRENTCONFIGHEIGHT#)" "50%" "0%" "RTM Skin VERSION 2\GPU Full Sensor List"]
DynamicVariables=1
As you can see the measure is returning the sum of horizontal and vertical position of the skin in which it is placed (GPU.ini). When this sum is changing, you get the OnChangeAction option executed and accordingly the !SetWindowPosition sets the new position of the follower skin (FullSensorList.ini).
The above sum practically is changing whenever are you moving this skin away, even if theoretically there might be cases when you move the skin, both parameters of the sum are changing, however their sum doesn't. This practically is an extremely unlikely case.
Man you are a genius! This works amazingly! Kinna roughly tho but it does exactly what I wanted it to do!!! Thank you!! I feel overwhelmed, there's a lot to learn 😅😅

Edit: I changed the update to 16 and it moves way more fluent, but idk if it's worth the extra resources (because both are already getting info from hwinfo64)
nice.gif
Edit. I changed the Update to 20ms and added an UpdateDivider=50 to every measure. If I'm correct, this makes the movement fluent while keeping the sensor information updating every 1000ms
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16260
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help | Resizable Skin

Post by balala »

RicardoTM wrote: December 31st, 2022, 7:22 pm Yeah I figured it out after playing around with it, I changed 0% to 19% to adjust it to where I wanted it to be.
I was confused because % is used to something else that I didn't fully understand until a little while ago that I was playing with formulas, then I read

Code: Select all

 MeasureName=SomeMeasure
MeasureName2=SomeMeasure2
Text=This is text containing %1 and %2.
; %1 and %2 will be replaced by the string values of SomeMeasure and
; SomeMeasure2, respectively.
and (%n) finally made sense to me 😅
The % sign is representing something completely different in these two cases. When used into a Text option of a String meter, it represents the text value of the appropriate measure, set into the MeasureNameX option of the meter. As you saw, in the above meter %1 is equal to [SomeMeasure] (due to the MeasureName=SomeMeasure option, because the not-numbered MeasureName should be in fact MeasureName1), while %2 is [SomeMeasure2] (set by the MeasureName2=SomeMeasure2 option).
In the parameters of the !SetWindowPosition bang, as I posted it, % is effectively a percent sign. 50% represents the middle of width of the skin, while 0% is representing its upper edge.
Another example here (assuming you are interested): to set ta skin exactly to the center of screen, no matter of the resolution of screen or the size of skin, you can use the following bang: [!SetWindowPosition "50%" "50%" "50%" "50%"]. The first two parameters are representing the place on the screen where the skin will be moved. Both being 50% means that the skin will be moved to half of width and half of height of screen (50% is half, right?). But which point of the skin will be set to this position? The point set up by the last two parameters. These being also set to 50%, means that the center of the skin will be placed there. This way you got the skin right in the center, as said, doesn't matter nor the resolution of screen, nor the size of skin.
RicardoTM wrote: December 31st, 2022, 7:22 pm Man you are a genius! This works amazingly! Kinna roughly tho but it does exactly what I wanted it to do!!! Thank you!! I feel overwhelmed, there's a lot to learn 😅😅
No, I'm not at all. And yep, you're perfectly right: there always is a lot to learn. As otherwise with anything you're working with.
But thanks for the appreciations.
RicardoTM wrote: December 31st, 2022, 7:22 pm Edit: I changed the update to 16 and it moves way more fluent, but idk if it's worth the extra resources (because both are already getting info from hwinfo64)
You have to decide what is more important to you: the loading of your computer or the fast following of the first skin. I probably would be tempted to get a "middle" solution: probably would set an Update lower than the default 1000, however not even the lowest possible value (16). I think Update=100 would be a better solution, which would do the job much better than the Update=1000, but wouldn't load the CPU as much as the Update=16. It's up to you (and up to your computer) what do you prefere.
RicardoTM
Posts: 279
Joined: December 28th, 2022, 9:30 pm
Location: México

Re: Help | Resizable Skin

Post by RicardoTM »

balala wrote: December 31st, 2022, 8:49 pm The % sign is representing something completely different in these two cases. When used into a Text option of a String meter, it represents the text value of the appropriate measure, set into the MeasureNameX option of the meter. As you saw, in the above meter %1 is equal to [SomeMeasure] (due to the MeasureName=SomeMeasure option, because the not-numbered MeasureName should be in fact MeasureName1), while %2 is [SomeMeasure2] (set by the MeasureName2=SomeMeasure2 option).
In the parameters of the !SetWindowPosition bang, as I posted it, % is effectively a percent sign. 50% represents the middle of width of the skin, while 0% is representing its upper edge.
Yup, and I don't even know how I got them mixed up given than one is %n and the other n% lol, again, I guess I overloaded myself with too much information... Rainmeter has been around more than 10 years and I just discovered it 4 days ago 😅
balala wrote: December 31st, 2022, 8:49 pm Another example here (assuming you are interested): to set ta skin exactly to the center of screen, no matter of the resolution of screen or the size of skin, you can use the following bang: [!SetWindowPosition "50%" "50%" "50%" "50%"]. The first two parameters are representing the place on the screen where the skin will be moved. Both being 50% means that the skin will be moved to half of width and half of height of screen (50% is half, right?). But which point of the skin will be set to this position? The point set up by the last two parameters. These being also set to 50%, means that the center of the skin will be placed there. This way you got the skin right in the center, as said, doesn't matter nor the resolution of screen, nor the size of skin.
Can this be applied to [rainmeter] so it actually affects all the meters? Or how does it work exactly? According to what I know so far (not much as you can tell lol) the !bangs are mostly applied to mouse actions , is that right?
balala wrote: December 31st, 2022, 8:49 pm But thanks for the appreciations.
Thank you for sharing your knowledge.
balala wrote: December 31st, 2022, 8:49 pm You have to decide what is more important to you: the loading of your computer or the fast following of the first skin. I probably would be tempted to get a "middle" solution: probably would set an Update lower than the default 1000, however not even the lowest possible value (16). I think Update=100 would be a better solution, which would do the job much better than the Update=1000, but wouldn't load the CPU as much as the Update=16. It's up to you (and up to your computer) what do you prefere.
I edited my last post but you may have missed it, I changed the update to 20ms and put an UpdateDivider=50 in every measure, this way, I conserve the fast input while keeping the mesures updating at 1000ms. According to what I understood, that's how UpdateDivider works, right?