Let's.

Code: Select all
[Rainmeter]
MiddleMouseUpAction=[!Refresh]
DynamicWindowSize=1
AccurateText=1
[Variables]
@includeSettings=#@#CONFIG.inc
bgWidth=210
bgHeight=80
[Styles]
@includeStyle=#@#STYLES.inc
[MeterBackground]
Meter=Shape
Shape=Rectangle 0,0,#bgWidth#,#bgHeight# | Fill Color #colorBG#,100 | StrokeWidth 0
[MeterShutdown]
Meter=Shape
Shape=Ellipse 25,25,12 | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1#
Shape2=Ellipse 25,25,10
Shape3=Rectangle 20,10,11,10
Shape5=Combine Shape | XOR Shape2 | Exclude Shape3
Shape4=Rectangle 25,11,1,10 | Fill Color #color1# | StrokeWidth 2 | StrokeColor #color1#
X=7
Y=20
LeftMouseUpAction=%systemroot%\system32\shutdown.exe -s -t 00
MouseOverAction=!execute [!ShowMeter ShutdownText][!Redraw]
MouseLeaveAction=!execute [!HideMeter ShutdownText][!Redraw]
[Sleep]
Meter=Shape
Shape=Ellipse 25,25,12 | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1#
Shape2=Ellipse 35,17,12
Shape3=Combine Shape | Exclude Shape2
X=50r
Y=20
MouseOverAction=!execute [!ShowMeter SleepText][!Redraw]
MouseLeaveAction=!execute [!HideMeter SleepText][!Redraw]
[Restart]
Meter=Shape
Shape=Ellipse 25,25,12 | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1#
Shape2=Ellipse 25,25,10
Shape3=Rectangle 10,23,20,5
Shape4=Combine Shape | XOR Shape2 | Exclude Shape3
X=50r
Y=20
Shape5=Path MyPath | StrokeWidth 2 | Stroke Color #color1# | Fill Color #color1#
MyPath=12,28 | LineTo 20,28 | LineTo 20,28 | LineTo 12,36,100,100
MouseOverAction=!execute [!ShowMeter RestartText][!Redraw]
MouseLeaveAction=!execute [!HideMeter RestartText][!Redraw]
[Lock]
Meter=Shape
Shape=Rectangle 12,21,21,16 | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1#
Shape2=Arc 15,21,30,21 | StrokeWidth 3 | StrokeColor #color1#
X=50r
Y=20
MouseOverAction=!execute [!ShowMeter LockText][!Redraw]
MouseLeaveAction=!execute [!HideMeter LockText][!Redraw]
[ShutdownText]
Meter=String
X=105
Y=5
MeterStyle=header2
Text="shutdown"
Hidden=1
[SleepText]
Meter=String
X=105
Y=5
MeterStyle=header2
Text="sleep"
Hidden=1
[RestartText]
Meter=String
X=105
Y=5
MeterStyle=header2
Text="restart"
Hidden=1
[LockText]
Meter=String
X=105
Y=5
MeterStyle=header2
Text="lock"
Hidden=1
In my opinion, this is a job for you, since you know best how the skin should look like. Don't worry though, it's not so much about Rainmeter or Rainmeter code, as it is about basic math. That being said, I'll tell you how I would do it: the key is expressing all those hardcoded values (like, say, 25, 12, 10, etc.) from your Shape meters as formulas based on an adjustable variable (let's call it "Size").Wyndia wrote: ↑November 7th, 2020, 9:58 pm Sorry for the delay! I ended up getting really frustrated at while working on it and had to walk away for a bit... I did come back to work on it after a break! Here is the skin I'm trying to make resizable/rescaleble with the middle mouse button (right now it's set to refresh because it's quicker when I want to view the changes):For context: after viewing Mii power and looking around, it looks like no one has tried to do a simple power control set up using shapes... and I realize that using ColorPickerPlus can change the color to whatever you wanted, hence the #color1# and #color2# codes (the background meter is just me testing and playing with ColorPickerPlus). I figure making it all resizable is also another benefit of using shapes vs images, since shapes wouldn't get pixelated like a image file.Code: Select all
[Rainmeter] MiddleMouseUpAction=[!Refresh] DynamicWindowSize=1 AccurateText=1 [Variables] @includeSettings=#@#CONFIG.inc bgWidth=210 bgHeight=80 [Styles] @includeStyle=#@#STYLES.inc [MeterBackground] Meter=Shape Shape=Rectangle 0,0,#bgWidth#,#bgHeight# | Fill Color #colorBG#,100 | StrokeWidth 0 [MeterShutdown] Meter=Shape Shape=Ellipse 25,25,12 | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1# Shape2=Ellipse 25,25,10 Shape3=Rectangle 20,10,11,10 Shape5=Combine Shape | XOR Shape2 | Exclude Shape3 Shape4=Rectangle 25,11,1,10 | Fill Color #color1# | StrokeWidth 2 | StrokeColor #color1# X=7 Y=20 LeftMouseUpAction=%systemroot%\system32\shutdown.exe -s -t 00 MouseOverAction=!execute [!ShowMeter ShutdownText][!Redraw] MouseLeaveAction=!execute [!HideMeter ShutdownText][!Redraw] [Sleep] Meter=Shape Shape=Ellipse 25,25,12 | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1# Shape2=Ellipse 35,17,12 Shape3=Combine Shape | Exclude Shape2 X=50r Y=20 MouseOverAction=!execute [!ShowMeter SleepText][!Redraw] MouseLeaveAction=!execute [!HideMeter SleepText][!Redraw] [Restart] Meter=Shape Shape=Ellipse 25,25,12 | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1# Shape2=Ellipse 25,25,10 Shape3=Rectangle 10,23,20,5 Shape4=Combine Shape | XOR Shape2 | Exclude Shape3 X=50r Y=20 Shape5=Path MyPath | StrokeWidth 2 | Stroke Color #color1# | Fill Color #color1# MyPath=12,28 | LineTo 20,28 | LineTo 20,28 | LineTo 12,36,100,100 MouseOverAction=!execute [!ShowMeter RestartText][!Redraw] MouseLeaveAction=!execute [!HideMeter RestartText][!Redraw] [Lock] Meter=Shape Shape=Rectangle 12,21,21,16 | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1# Shape2=Arc 15,21,30,21 | StrokeWidth 3 | StrokeColor #color1# X=50r Y=20 MouseOverAction=!execute [!ShowMeter LockText][!Redraw] MouseLeaveAction=!execute [!HideMeter LockText][!Redraw] [ShutdownText] Meter=String X=105 Y=5 MeterStyle=header2 Text="shutdown" Hidden=1 [SleepText] Meter=String X=105 Y=5 MeterStyle=header2 Text="sleep" Hidden=1 [RestartText] Meter=String X=105 Y=5 MeterStyle=header2 Text="restart" Hidden=1 [LockText] Meter=String X=105 Y=5 MeterStyle=header2 Text="lock" Hidden=1
(I also discovered while poking around ColorPickerPlus that they have a icons.inc file where they have all of the drawn shapes in a separate file that they can reference. I tried to do that too but ran into problems right away; I'm not sure if that still counts under help for the shape meter and also I figure it's better to handle things one step at a time.)
Code: Select all
[Variables]
@includeSettings=#@#CONFIG.inc
Size=12
bgWidth=210
bgHeight=80
[Rainmeter]
MiddleMouseUpAction=[!Refresh]
DynamicWindowSize=1
AccurateText=1
[Styles]
@includeStyle=#@#STYLES.inc
[MeterBackground]
Meter=Shape
Shape=Rectangle 0,0,#bgWidth#,#bgHeight# | Fill Color #colorBG#,100 | StrokeWidth 0
MouseScrollUpAction=[!SetVariable Size (Clamp((#Size#+1),5,50))][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!SetVariable Size (Clamp((#Size#-1),5,50))][!UpdateMeter *][!Redraw]
DynamicVariables=1
[MeterShutdown]
Meter=Shape
Shape=Ellipse (#Size#*2+1),(#Size#*2+1),#Size# | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1#
Shape2=Ellipse (#Size#*2+1),(#Size#*2+1),(#Size#-2)
Shape3=Rectangle ((#Size#*2+1)-(#Size#-2)/2),(#Size#-2),(#Size#-2+1),(#Size#-2)
Shape4=Combine Shape | XOR Shape2 | Exclude Shape3
Shape5=Rectangle (#Size#*2+1),(#Size#-2+1),1,(#Size#-2) | Fill Color #color1# | StrokeWidth 2 | StrokeColor #color1#
X=7
Y=20
LeftMouseUpAction=%systemroot%\system32\shutdown.exe -s -t 00
MouseOverAction=!execute [!ShowMeter ShutdownText][!Redraw]
MouseLeaveAction=!execute [!HideMeter ShutdownText][!Redraw]
DynamicVariables=1
[Sleep]
Meter=Shape
Shape=Ellipse (#Size#*2+1),(#Size#*2+1),#Size# | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1#
Shape2=Ellipse ((#Size#*2+1)+(#Size#-2)),((#Size#*2+1)*(2/3)),#Size#
Shape3=Combine Shape | Exclude Shape2
X=50r
Y=20
MouseOverAction=!execute [!ShowMeter SleepText][!Redraw]
MouseLeaveAction=!execute [!HideMeter SleepText][!Redraw]
DynamicVariables=1
[Restart]
Meter=Shape
Shape=Ellipse 25,25,12 | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1#
Shape2=Ellipse 25,25,10
Shape3=Rectangle 10,23,20,5
Shape4=Combine Shape | XOR Shape2 | Exclude Shape3
X=50r
Y=20
Shape5=Path MyPath | StrokeWidth 2 | Stroke Color #color1# | Fill Color #color1#
MyPath=12,28 | LineTo 20,28 | LineTo 20,28 | LineTo 12,36,100,100
MouseOverAction=!execute [!ShowMeter RestartText][!Redraw]
MouseLeaveAction=!execute [!HideMeter RestartText][!Redraw]
DynamicVariables=1
[Lock]
Meter=Shape
Shape=Rectangle 12,21,21,16 | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1#
Shape2=Arc 15,21,30,21 | StrokeWidth 3 | StrokeColor #color1#
X=50r
Y=20
MouseOverAction=!execute [!ShowMeter LockText][!Redraw]
MouseLeaveAction=!execute [!HideMeter LockText][!Redraw]
DynamicVariables=1
[ShutdownText]
Meter=String
X=105
Y=5
MeterStyle=header2
Text="shutdown"
Hidden=1
DynamicVariables=1
[SleepText]
Meter=String
X=105
Y=5
MeterStyle=header2
Text="sleep"
Hidden=1
DynamicVariables=1
[RestartText]
Meter=String
X=105
Y=5
MeterStyle=header2
Text="restart"
Hidden=1
DynamicVariables=1
[LockText]
Meter=String
X=105
Y=5
MeterStyle=header2
Text="lock"
Hidden=1
DynamicVariables=1
So, I just realized there's a much simpler way to achieve scaling, although it's possible (not sure yet) that this variant has some minor drawbacks as well. Shape meters can use the scale transform modifier for this, and with a little adjustment to the X and Y coordinates of the meters (the scaling and repositioning the String meters will be up to you, since you didn't post the STYLES.inc file where you defined the header2 meter style) the code becomes:Wyndia wrote: ↑November 7th, 2020, 9:58 pm Sorry for the delay! I ended up getting really frustrated at while working on it and had to walk away for a bit... I did come back to work on it after a break! Here is the skin I'm trying to make resizable/rescaleble with the middle mouse button (right now it's set to refresh because it's quicker when I want to view the changes):For context: after viewing Mii power and looking around, it looks like no one has tried to do a simple power control set up using shapes... and I realize that using ColorPickerPlus can change the color to whatever you wanted, hence the #color1# and #color2# codes (the background meter is just me testing and playing with ColorPickerPlus). I figure making it all resizable is also another benefit of using shapes vs images, since shapes wouldn't get pixelated like a image file.Code: Select all
[Rainmeter] MiddleMouseUpAction=[!Refresh] DynamicWindowSize=1 AccurateText=1 [Variables] @includeSettings=#@#CONFIG.inc bgWidth=210 bgHeight=80 [Styles] @includeStyle=#@#STYLES.inc [MeterBackground] Meter=Shape Shape=Rectangle 0,0,#bgWidth#,#bgHeight# | Fill Color #colorBG#,100 | StrokeWidth 0 [MeterShutdown] Meter=Shape Shape=Ellipse 25,25,12 | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1# Shape2=Ellipse 25,25,10 Shape3=Rectangle 20,10,11,10 Shape5=Combine Shape | XOR Shape2 | Exclude Shape3 Shape4=Rectangle 25,11,1,10 | Fill Color #color1# | StrokeWidth 2 | StrokeColor #color1# X=7 Y=20 LeftMouseUpAction=%systemroot%\system32\shutdown.exe -s -t 00 MouseOverAction=!execute [!ShowMeter ShutdownText][!Redraw] MouseLeaveAction=!execute [!HideMeter ShutdownText][!Redraw] [Sleep] Meter=Shape Shape=Ellipse 25,25,12 | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1# Shape2=Ellipse 35,17,12 Shape3=Combine Shape | Exclude Shape2 X=50r Y=20 MouseOverAction=!execute [!ShowMeter SleepText][!Redraw] MouseLeaveAction=!execute [!HideMeter SleepText][!Redraw] [Restart] Meter=Shape Shape=Ellipse 25,25,12 | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1# Shape2=Ellipse 25,25,10 Shape3=Rectangle 10,23,20,5 Shape4=Combine Shape | XOR Shape2 | Exclude Shape3 X=50r Y=20 Shape5=Path MyPath | StrokeWidth 2 | Stroke Color #color1# | Fill Color #color1# MyPath=12,28 | LineTo 20,28 | LineTo 20,28 | LineTo 12,36,100,100 MouseOverAction=!execute [!ShowMeter RestartText][!Redraw] MouseLeaveAction=!execute [!HideMeter RestartText][!Redraw] [Lock] Meter=Shape Shape=Rectangle 12,21,21,16 | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1# Shape2=Arc 15,21,30,21 | StrokeWidth 3 | StrokeColor #color1# X=50r Y=20 MouseOverAction=!execute [!ShowMeter LockText][!Redraw] MouseLeaveAction=!execute [!HideMeter LockText][!Redraw] [ShutdownText] Meter=String X=105 Y=5 MeterStyle=header2 Text="shutdown" Hidden=1 [SleepText] Meter=String X=105 Y=5 MeterStyle=header2 Text="sleep" Hidden=1 [RestartText] Meter=String X=105 Y=5 MeterStyle=header2 Text="restart" Hidden=1 [LockText] Meter=String X=105 Y=5 MeterStyle=header2 Text="lock" Hidden=1
(I also discovered while poking around ColorPickerPlus that they have a icons.inc file where they have all of the drawn shapes in a separate file that they can reference. I tried to do that too but ran into problems right away; I'm not sure if that still counts under help for the shape meter and also I figure it's better to handle things one step at a time.)
Code: Select all
[Variables]
@includeSettings=#@#CONFIG.inc
Scale=1
Change=0.05
bgWidth=210
bgHeight=80
[Rainmeter]
MiddleMouseUpAction=[!Refresh]
DynamicWindowSize=1
AccurateText=1
[Styles]
@includeStyle=#@#STYLES.inc
[MeterBackground]
Meter=Shape
Shape=Rectangle 0,0,#bgWidth#,#bgHeight# | Fill Color #colorBG#,100 | StrokeWidth 0 | Scale #Scale#,#Scale#,0,0
MouseScrollUpAction=[!SetVariable Scale (Clamp((#Scale#+#Change#),#Change#,5))][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!SetVariable Scale (Clamp((#Scale#-#Change#),#Change#,5))][!UpdateMeter *][!Redraw]
DynamicVariables=1
[MeterShutdown]
Meter=Shape
Shape=Ellipse 25,25,12 | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1#
Shape2=Ellipse 25,25,10
Shape3=Rectangle 20,10,11,10
Shape4=Rectangle 25,11,1,10 | Fill Color #color1# | StrokeWidth 2 | StrokeColor #color1#
Shape5=Combine Shape | XOR Shape2 | Exclude Shape3 | Union Shape4 | Scale #Scale#,#Scale#,0,0
X=(7*#Scale#)
Y=(20*#Scale#)
LeftMouseUpAction=%systemroot%\system32\shutdown.exe -s -t 00
MouseOverAction=!execute [!ShowMeter ShutdownText][!Redraw]
MouseLeaveAction=!execute [!HideMeter ShutdownText][!Redraw]
DynamicVariables=1
[Sleep]
Meter=Shape
Shape=Ellipse 25,25,12 | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1#
Shape2=Ellipse 35,17,12
Shape3=Combine Shape | Exclude Shape2 | Scale #Scale#,#Scale#,0,0
X=(50*#Scale#)r
Y=(20*#Scale#)
MouseOverAction=!execute [!ShowMeter SleepText][!Redraw]
MouseLeaveAction=!execute [!HideMeter SleepText][!Redraw]
DynamicVariables=1
[Restart]
Meter=Shape
Shape=Ellipse 25,25,12 | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1#
Shape2=Ellipse 25,25,10
Shape3=Rectangle 10,23,20,5
Shape4=Path MyPath | StrokeWidth 2 | Stroke Color #color1# | Fill Color #color1#
MyPath=12,28 | LineTo 20,28 | LineTo 20,28 | LineTo 12,36,100,100
Shape5=Combine Shape | XOR Shape2 | Exclude Shape3 | Union Shape4 | Scale #Scale#,#Scale#,0,0
X=(50*#Scale#)r
Y=(20*#Scale#)
MouseOverAction=!execute [!ShowMeter RestartText][!Redraw]
MouseLeaveAction=!execute [!HideMeter RestartText][!Redraw]
DynamicVariables=1
[Lock]
Meter=Shape
Shape=Rectangle 12,21,21,16 | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1#
Shape2=Arc 15,21,30,21 | StrokeWidth 3 | StrokeColor #color1#
Shape3=Combine Shape | Union Shape2 | Scale #Scale#,#Scale#,0,0
X=(50*#Scale#)r
Y=(20*#Scale#)
MouseOverAction=!execute [!ShowMeter LockText][!Redraw]
MouseLeaveAction=!execute [!HideMeter LockText][!Redraw]
DynamicVariables=1
[ShutdownText]
Meter=String
X=105
Y=5
MeterStyle=header2
Text="shutdown"
Hidden=1
[SleepText]
Meter=String
X=105
Y=5
MeterStyle=header2
Text="sleep"
Hidden=1
[RestartText]
Meter=String
X=105
Y=5
MeterStyle=header2
Text="restart"
Hidden=1
[LockText]
Meter=String
X=105
Y=5
MeterStyle=header2
Text="lock"
Hidden=1
Scaling and repositioning of the String meters is extremely simple to be done in this case with a properly written TranfromationMatrix. For instance add the follwing two options to each String meter:Yincognito wrote: ↑November 8th, 2020, 4:38 pm (the scaling and repositioning the String meters will be up to you, since you didn't post the STYLES.inc file where you defined the header2 meter style)
Code: Select all
[ShutdownText]
...
TransformationMatrix=#Scale#;0;0;#Scale#;0;0
DynamicVariables=1
[SleepText]
...
TransformationMatrix=#Scale#;0;0;#Scale#;0;0
DynamicVariables=1
[RestartText]
...
TransformationMatrix=#Scale#;0;0;#Scale#;0;0
DynamicVariables=1
[LockText]
...
TransformationMatrix=#Scale#;0;0;#Scale#;0;0
DynamicVariables=1
You're right - didn't thought of that. Using TransformationMatrix for this doesn't require one to know what font or font size is being used. Very good point.
Thanks. However it si so simple just in this case, in other cases it can be much harder. But in this case it is simple, indeed.Yincognito wrote: ↑November 8th, 2020, 11:26 pm You're right - didn't thought of that. Using TransformationMatrix for this doesn't require one to know what font or font size is being used. Very good point.![]()
Code: Select all
[Variables]
@includeSettings=#@#CONFIG.inc
Scale=1
Change=0.05
bgWidth=210
bgHeight=80
[Rainmeter]
MiddleMouseUpAction=[!Refresh]
DynamicWindowSize=1
AccurateText=1
[Styles]
@includeStyle=#@#STYLES.inc
[MeterBackground]
Meter=Shape
Shape=Rectangle 0,0,#bgWidth#,#bgHeight# | Fill Color #colorBG#,100 | StrokeWidth 1 | Scale #Scale#,#Scale#,0,0
MouseScrollUpAction=[!SetVariable Scale (Clamp((#Scale#+#Change#),#Change#,5))][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!SetVariable Scale (Clamp((#Scale#-#Change#),#Change#,5))][!UpdateMeter *][!Redraw]
DynamicVariables=1
[MeterShutdown]
Meter=Shape
Shape=Ellipse 25,25,12 | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1#
Shape2=Ellipse 25,25,10
Shape3=Rectangle 20,10,11,10
Shape4=Rectangle 25,11,1,10 | Fill Color #color1# | StrokeWidth 2 | StrokeColor #color1#
Shape5=Combine Shape | XOR Shape2 | Exclude Shape3 | Union Shape4 | Scale #Scale#,#Scale#,0,0
X=(7*#Scale#+13*(#Scale#-1))
Y=(20*#Scale#+11*(#Scale#-1))
LeftMouseUpAction=%systemroot%\system32\shutdown.exe -s -t 00
MouseOverAction=!execute [!ShowMeter ShutdownText][!Redraw]
MouseLeaveAction=!execute [!HideMeter ShutdownText][!Redraw]
DynamicVariables=1
[Sleep]
Meter=Shape
Shape=Ellipse 25,25,12 | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1#
Shape2=Ellipse 35,17,12
Shape3=Combine Shape | Exclude Shape2 | Scale #Scale#,#Scale#,0,0
X=(50*#Scale#)r
Y=(20*#Scale#+13*(#Scale#-1))
MouseOverAction=!execute [!ShowMeter SleepText][!Redraw]
MouseLeaveAction=!execute [!HideMeter SleepText][!Redraw]
DynamicVariables=1
[Restart]
Meter=Shape
Shape=Ellipse 25,25,12 | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1#
Shape2=Ellipse 25,25,10
Shape3=Rectangle 10,23,20,5
Shape4=Path MyPath | StrokeWidth 2 | Stroke Color #color1# | Fill Color #color1#
MyPath=12,28 | LineTo 20,28 | LineTo 20,28 | LineTo 12,36,100,100
Shape5=Combine Shape | XOR Shape2 | Exclude Shape3 | Union Shape4 | Scale #Scale#,#Scale#,0,0
X=(50*#Scale#)r
Y=(20*#Scale#+13*(#Scale#-1))
MouseOverAction=!execute [!ShowMeter RestartText][!Redraw]
MouseLeaveAction=!execute [!HideMeter RestartText][!Redraw]
DynamicVariables=1
[Lock]
Meter=Shape
Shape=Rectangle 12,21,21,16 | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1#
Shape2=Arc 15,21,30,21 | StrokeWidth 3 | StrokeColor #color1#
Shape3=Combine Shape | Union Shape2 | Scale #Scale#,#Scale#,0,0
X=(50*#Scale#)r
Y=(20*#Scale#+13*(#Scale#-1))
MouseOverAction=!execute [!ShowMeter LockText][!Redraw]
MouseLeaveAction=!execute [!HideMeter LockText][!Redraw]
DynamicVariables=1
[ShutdownText]
Meter=String
X=105
Y=5
MeterStyle=header2
Text="shutdown"
Hidden=1
AntiAlias=1
TransformationMatrix=#Scale#;0;0;#Scale#;0;0
DynamicVariables=1
[SleepText]
Meter=String
X=105
Y=5
MeterStyle=header2
Text="sleep"
Hidden=1
AntiAlias=1
TransformationMatrix=#Scale#;0;0;#Scale#;0;0
DynamicVariables=1
[RestartText]
Meter=String
X=105
Y=5
MeterStyle=header2
Text="restart"
Hidden=1
AntiAlias=1
TransformationMatrix=#Scale#;0;0;#Scale#;0;0
DynamicVariables=1
[LockText]
Meter=String
X=105
Y=5
MeterStyle=header2
Text="lock"
Hidden=1
AntiAlias=1
TransformationMatrix=#Scale#;0;0;#Scale#;0;0
DynamicVariables=1
Code: Select all
Shape=Ellipse 25,25,12 | Fill Color #color1# | StrokeWidth 1 | StrokeColor #color1#
Shape2=Ellipse 25,25,10
Shape3=Rectangle 20,10,11,10
Shape4=Rectangle 25,11,1,10 | Fill Color #color1# | StrokeWidth 2 | StrokeColor #color1#
Shape5=Combine Shape | XOR Shape2 | Exclude Shape3 | Union Shape4 | Scale #Scale#,#Scale#,0,0
X=(7*#Scale#+13*(#Scale#-1))
Y=(20*#Scale#+11*(#Scale#-1))
Code: Select all
Shape=Rectangle 0,0,50,50 ...
Yep, unfortunately in my view this is the greatest (unsolved) problem of using TransformationMatrix to scale a meter.Yincognito wrote: ↑November 9th, 2020, 7:24 pm While using balala's TransformationMatrix on the Shape meters instead of the transform modifiers solved the issue, it produced another, i.e. the by now "classic" problem of mouse detection over a TransformatiionMatrix meter.
Code: Select all
Meter=Shape
X=90
Y=110
Shape=Path Tray | StrokeWidth 1 | StrokeColor 255,255,255,255 | Fill LinearGradient TrayFillGradient
TrayFillGradient=90 | #Cream#,210 ; 0.0 | #MediumBlue#,80 ; 1.0
Tray=0,0 | LineTo 420,0 | LineTo 420,420 | LineTo 0,420 | LineTo 0,0 | ClosePath 1
Shape2=Path TrayCutoutPathOne | StrokeWidth 1 | StrokeColor #Cream#,255 | Fill 0,0,0,25
X=90
Y=110
TrayCutoutPathOne=52,34 | LineTo 136,34 | CurveTo 148,42,144,34 | CurveTo 160,50,150,50 | LineTo 216,50 | CurveTo 228,60,228,50 | LineTo 228,170 | CurveTo 218,180,228,180 | LineTo 52,180 | CurveTo 42,170,42,180 | LineTo 42,44 | CurveTo 52,34,42,34 | ClosePath 1
Shape4=Combine Shape | Exclude Shape2