It is currently April 21st, 2019, 1:13 pm

New SkinWidth / SkinHeight options

Changes made during the Rainmeter 3.3 beta cycle.
User avatar
jsmorley
Developer
Posts: 19183
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

New SkinWidth / SkinHeight options

jsmorley » August 15th, 2015, 2:16 pm

We have added two new options to the [Rainmeter] section of a skin:

SkinWidth
SkinHeight

http://docs.rainmeter.net/manual-beta/skins/rainmeter-section#SkinWidthHeight

Either or both of these can be defined.

This will constrain the skin to the dimensions defined, either the width, the height, or both. Any meter or part of a meter positioned outside the defined boundaries will be truncated. DynamicWindowSize will be ignored for the defined dimension(s), and meters that would normally display even "outside" the skin will be truncated by the "fixed" skin dimensions.

This can be very useful for having some meter(s) initially defined outside the left/top/right/bottom boundaries of the skin, and then pop or slide into view on mouse or measure actions.

Note that any part of any meter(s) that is "outside" the defined boundaries in one sense "doesn't exist", so all variables and settings that are related to skin "size", like #CURRENTCONFIGWIDTH#, KeepOnScreen, SnapToEdges, DragMargins and such all behave as expected. However, any [SectionName:W] or [SectionName:H] defined by a meter will be the entire value and not truncated, so that should be considered when using these values with relative positioning.

As with all options set in the [Rainmeter] section of the skin, these options cannot be dynamically changed.

Example skin:
SkinWH_1.0.rmskin
SkinWH.gif

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
SkinWidth=300
SkinHeight=112

[Metadata]
Name=SkinWH
Author=JSMorley
Information=Example of the new SkinWidth / SkinHeight skin options in [Rainmeter].||The ActionTimer plugin used for the demonstration is included.
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Version=Aug 15, 2015

[Variables]
U=[!UpdateMeasureGroup Sliders][!UpdateMeter *][!Redraw]
SlideLeftX=300
SlideRightX=0
SlideDownY=-14
SlideUpY=126

[MeterSlideDownBack]
Meter=Image
X=0
Y=0
W=300
H=28
SolidColor=0,0,0,255
SolidColor2=47,67,87,255
MouseOverAction=[!CommandMeasure SliderDown "Stop 2"][!CommandMeasure SliderDown "Execute 1"]
MouseLeaveAction=[!CommandMeasure SliderDown "Stop 1"][!CommandMeasure SliderDown "Execute 2"]

[MeterSlideDown]
Meter=String
X=150
Y=#SlideDownY#
FontSize=15
FontColor=168,205,240,255
AntiAlias=1
StringAlign=CenterCenter
DynamicVariables=1
Text=Sliding Text Down

[SliderDown]
Group=Sliders
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat SlideDown, 5, 7
SlideDown=[!SetVariable SlideDownY (Clamp(#SlideDownY#+4,-14,14))]#U#
ActionList2=Repeat SlideUp, 5, 7
SlideUp=[!SetVariable SlideDownY (Clamp(#SlideDownY#-4,-14,14))]#U#
DynamicVariables=1

[MeterSlideLeftBack]
Meter=Image
X=0
Y=28
W=300
H=28
SolidColor=0,0,0,255
SolidColor2=47,67,87,255
MouseOverAction=[!CommandMeasure SliderLeft "Stop 2"][!CommandMeasure SliderLeft "Execute 1"]
MouseLeaveAction=[!CommandMeasure SliderLeft "Stop 1"][!CommandMeasure SliderLeft "Execute 2"]

[MeterSlideLeft]
Meter=String
X=#SlideLeftX#
Y=42
FontSize=15
FontColor=168,205,240,255
Padding=10,0,0,0
AntiAlias=1
StringAlign=LeftCenter
DynamicVariables=1
Text=Sliding Text Left

[SliderLeft]
Group=Sliders
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat SlideLeft, 10, 20
SlideLeft=[!SetVariable SlideLeftX (Clamp(#SlideLeftX#-15,0,300))]#U#
ActionList2=Repeat SlideRight, 10, 20
SlideRight=[!SetVariable SlideLeftX (Clamp(#SlideLeftX#+15,0,300))]#U#
DynamicVariables=1

[MeterSlideRightBack]
Meter=Image
X=0
Y=56
W=300
H=28
Solidcolor=0,0,0,255
SolidColor2=47,67,87,255
MouseOverAction=[!CommandMeasure SliderRight "Stop 2"][!CommandMeasure SliderRight "Execute 1"]
MouseLeaveAction=[!CommandMeasure SliderRight "Stop 1"][!CommandMeasure SliderRight "Execute 2"]

[MeterSlideRight]
Meter=String
X=#SlideRightX#
Y=70
FontSize=15
FontColor=168,205,240,255
Padding=0,0,10,0
AntiAlias=1
StringAlign=RightCenter
DynamicVariables=1
Text=Sliding Text Right

[SliderRight]
Group=Sliders
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat SlideRight, 10, 20
SlideRight=[!SetVariable SlideRightX (Clamp(#SlideRightX#+15,0,300))]#U#
ActionList2=Repeat SlideLeft, 10, 20
SlideLeft=[!SetVariable SlideRightX (Clamp(#SlideRightX#-15,0,300))]#U#
DynamicVariables=1

[MeterSlideUpBack]
Meter=Image
X=0
Y=84
W=300
H=28
SolidColor=0,0,0,255
SolidColor2=47,67,87,255
MouseOverAction=[!CommandMeasure SliderUp "Stop 2"][!CommandMeasure SliderUp "Execute 1"]
MouseLeaveAction=[!CommandMeasure SliderUp "Stop 1"][!CommandMeasure SliderUp "Execute 2"]

[MeterSlideUp]
Meter=String
X=150
Y=#SlideUpY#
FontSize=15
FontColor=168,205,240,255
AntiAlias=1
StringAlign=CenterCenter
DynamicVariables=1
Text=Sliding Text Up

[SliderUp]
Group=Sliders
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat SlideUp, 5, 7
SlideUp=[!SetVariable SlideUpY (Clamp(#SlideUpY#-4,98,126))]#U#
ActionList2=Repeat SlideDown, 5, 7
SlideDown=[!SetVariable SlideUpY (Clamp(#SlideUpY#+4,98,126))]#U#
DynamicVariables=1

[MeterOverlay]
Meter=String
X=150
Y=63
FontSize=63
FontColor=150,150,150,50
StringAlign=CenterCenter
StringStyle=Bold
AntiAlias=1
Text=SLIDE
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 19183
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: New SkinWidth / SkinHeight options

jsmorley » August 15th, 2015, 8:55 pm

Or like this:

JSNetwork_2.0.rmskin
jsnetwork.gif
You do not have the required permissions to view the files attached to this post.
GLing
Posts: 23
Joined: July 1st, 2015, 5:05 pm

Re: New SkinWidth / SkinHeight options

GLing » August 16th, 2015, 1:24 am

This is great, exactly what I needed for a problem I was having a couple days back. Thanks a lot.
User avatar
jsmorley
Developer
Posts: 19183
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: New SkinWidth / SkinHeight options

jsmorley » August 17th, 2015, 2:43 pm

Or this... ;-)
test.gif

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
SkinWidth=300
SkinHeight=100
BackgroundMode=2
SolidColor=0,0,0,1

[Variables]
DateX=301
StringWidth=0
StepSize=10
Iterations=0
U=[!UpdateMeasure SlideDate][!UpdateMeter *][!Redraw]

[MeasureTime]
Measure=Time
Format=%#I:%M %p

[MeasureDate]
Measure=Time
Format=%A, %B %#d, %Y

[MeterTime]
Meter=String
MeasureName=MeasureTime
X=290
Y=0
FontFace=Trebuchet MS
FontSize=40
FontColor=255,255,255,255
SolidColor=0,0,0,1
StringAlign=Right
AntiAlias=1
InlineSetting=Size | 20
InlinePattern=.*( \w\w)
InlineSetting2=Weight | 700
InlinePattern2=(.*) \w
MouseOverAction=[!CommandMeasure SlideDate "Stop 2"][!CommandMeasure SlideDate "Execute 1"]
MouseLeaveAction=[!CommandMeasure SlideDate "Stop 1"][!CommandMeasure SlideDate "Execute 2"]

[MeterDateStringWidth]
Meter=String
MeasureName=MeasureDate
FontFace=Trebuchet MS
FontSize=16
FontColor=0,0,0,0
AntiAlias=1
OnUpdateAction=[!SetVariable StringWidth "[MeterDateStringWidth:W]"][!SetVariable Iterations "(Ceil([MeterDateStringWidth:W]/#StepSize#))"][!UpdateMeasure SlideDate]
DynamicVariables=1

[MeterDate]
Meter=String
MeasureName=MeasureDate
X=(#DateX# + #StringWidth#)
Y=([MeterTime:Y] + [MeterTime:H] - 7)
FontFace=Trebuchet MS
FontSize=16
FontColor=255,255,255,255
SolidColor=0,0,0,1
StringAlign=Right
AntiAlias=1
DynamicVariables=1

[SlideDate]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat SlideLeft, 10, #Iterations#
SlideLeft=[!SetVariable DateX "(Clamp(#DateX#-#StepSize#,(291-#StringWidth#),301))"]#U#
ActionList2=Repeat SlideRight, 10, #Iterations#
SlideRight=[!SetVariable DateX "(Clamp(#DateX#+#StepSize#,(291-#StringWidth#),301))"]#U#
DynamicVariables=1
You do not have the required permissions to view the files attached to this post.
drakulaboy
Posts: 164
Joined: June 29th, 2014, 8:35 pm

Re: New SkinWidth / SkinHeight options

drakulaboy » August 19th, 2015, 9:55 pm

:thumbup: awesome, now i can really do a nice slide on my player for cover and info
rick-t-fiedrain
Posts: 22
Joined: February 15th, 2014, 9:53 am

Re: New SkinWidth / SkinHeight options

rick-t-fiedrain » August 23rd, 2015, 11:49 am

A footnote regarding the JSNetwork skin offered in this thread. Avira antivirus comes back with this message when the skin is used as packaged:

"The URL (http://icanhazip.com/) has been evaluated as Malware. It has been blocked."

The icanhazip.com site is the URL used in the measure [MeasureIPWeb] (Line 83 or 90 depending on the SLIDE or FADE flavor selected). The measure obviously tests to see if a connection can be made to the address in the URL setting.

I changed the site used for the connection test to http://www.msftncsi.com/ncsi.txt as used in a previously loaded "webserverstatus" skin from JSMorley. The malware warning disappeared and the skin showed "Microsoft NCSI" next to WAN on the network display.

Just a heads up.
User avatar
jsmorley
Developer
Posts: 19183
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: New SkinWidth / SkinHeight options

jsmorley » August 23rd, 2015, 12:09 pm

rick-t-fiedrain wrote:A footnote regarding the JSNetwork skin offered in this thread. Avira antivirus comes back with this message when the skin is used as packaged:

"The URL (http://icanhazip.com/) has been evaluated as Malware. It has been blocked."
There is an issue with some malware called Upatre out in the wild. http://icanhazip.com itself is not in any way infected with anything, and there is certainly no danger in going there.

What is going on is that the Upatre malware is accessing icanhazip to verify the IP address on machines it has in fact infected, as a part of whatever evil process it is doing. This has caused some services that monitor sites to flag the icanhazip site as "suspicious", as it is getting a lot of traffic from known malware.

The author is doing what he can to interact with the various services monitoring sites, to work with them to clear things up. I guess that is about all he can do.

I don't particularly recommend http://icanhazip.com over the hundred or more other sites that do pretty much the same thing, just return your IP address. I use this one since it is quick and tiny and simply returns the IP address and nothing more. Feel free to add an exception for http://icanhazip.com to your antivirus, or change to

https://www.whatismyip.com/
http://www.whatsmyip.org/
https://www.iplocation.net/find-ip-address
http://mxtoolbox.com/WhatIsMyIP/
http://www.ipchicken.com/
http://www.tracemyip.org/

or any other of the many, many, many sites that can return your IP address for parsing.
SCR
Posts: 27
Joined: April 15th, 2015, 11:13 pm

Re: New SkinWidth / SkinHeight options

SCR » August 23rd, 2015, 9:01 pm

Malwarebytes has a problem with it as well but you can create an exclusion.
Resike
Posts: 33
Joined: May 1st, 2015, 1:25 am

Re: New SkinWidth / SkinHeight options

Resike » August 27th, 2015, 11:50 am

Any chance to create an invert function of this?

To show up stuff outside the meter's region?
User avatar
jsmorley
Developer
Posts: 19183
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: New SkinWidth / SkinHeight options

jsmorley » August 27th, 2015, 12:26 pm

Resike wrote:Any chance to create an invert function of this?

To show up stuff outside the meter's region?
No, assuming you mean "skin's" where you said "meter's", that just isn't possible.