It is currently April 19th, 2024, 12:02 pm

Default Skin Background expanding when using ActionTimer slider

Get help with creating, editing & fixing problems with skins
arpul
Posts: 3
Joined: April 13th, 2018, 12:38 pm

Default Skin Background expanding when using ActionTimer slider

Post by arpul »

Hi,

I am trying to create a clickable skin so that it would expand and show certain computer details. I love the default background skin because of its transparency and would like to keep it. I really wasn't been able to re-create it with only SolidColor option inside .ini.

But I have a problem with that - If I don't specify SkinHeight, it keeps the placeholders for text that is not visible, until the LeftMouseUpAction which slides text in. Then if I do specify SkinHeight, it ignores [Background] and #Offset# and creates creates large background image.

Is there a way to prevent background from keeping those place holders?
And now I am thinking, is there a way to insert background image only for the background that is going to be expanded?

Been with Rainmeter only for a day. Would appreciate support :)

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1

Background=C:\Rainmeter\Skins\illustro\@Resources\Background.png
BackgroundMode=3
BackgroundMargins=0,34,0,14

SkinWidth=374
;SkinHeight=190

;OnRefreshAction=[!Move (#SCREENAREAWIDTH#) (#SCREENAREAHEIGHT#*(-1))]

[Variables]
HEIGHT=(#SCREENAREAHEIGHT#/4)
fontName=Trebuchet MS
textSize=12
colorBar=235,170,0,255
colorText=255,255,255,205

U=[!UpdateMeasureGroup Sliders][!UpdateMeter *][!Redraw]
SlideDownY=-30
SlideRightX=25
SlideLeftX=595

OffSet=-155
State=1
UU=[!UpdateMeasure MeasureSlider][!UpdateMeter *][!Redraw]


[BackGround]
Meter=Image
X=11
Y=#OffSet#
W=374
H=190
;SolidColor=116,116,116,116
;SolidColor2=0,0,0,120
;SolidColor=0,0,0,255
;SolidColor2=47,67,87,255
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure MeasureSlider "Execute #State#"]LeftMouseUpAction=[!CommandMeasure SliderLeft "Execute #State#"]

MouseOverAction=[!CommandMeasure SliderDown "Stop 2"][!CommandMeasure SliderDown "Execute 1"]
MouseLeaveAction=[!CommandMeasure SliderDown "Stop 1"][!CommandMeasure SliderDown "Execute 2"]

[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat SlideDown, 2, 22 | Wait 1 | HeaderOut
SlideDown=[!SetVariable State "2"][!SetVariable OffSet "(Clamp(#OffSet#+9,-155,0))"]#UU#
HeaderOut=[!SetOption MeterHeader ImageName "HeaderOut.jpg"]#UU#
ActionList2=Repeat SlideUp, 2, 22 | Wait 1 | HeaderIn
SlideUp=[!SetVariable State "1"][!SetVariable OffSet "(Clamp(#OffSet#-9,-155,0))"]#UU#
HeaderIn=[!SetOption MeterHeader ImageName "HeaderIn.jpg"]#UU#
DynamicVariables=1
;;;;;;;;;;;;;;;
[MeterHeader]
Meter=Image
X=11
Y=(#OffSet#+155)
W=374
H=35
;ImagePath=C:\Rainmeter\Skins\UserInfo\@Resources
ImageName=HeaderIn.jpg
DynamicVariables=1
;;;;;;;;;;;


[SliderDown]
Group=Sliders
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat SlideDown, 22, 10
SlideDown=[!SetVariable SlideDownY (Clamp(#SlideDownY#+4,-30,9))]#U#
ActionList2=Repeat SlideUp, 22, 1000
SlideUp=[!SetVariable SlideDownY (Clamp(#SlideDownY#-4,-30,9))]#U#
DynamicVariables=1

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


; ----------------------------------
; MEASURES
; ----------------------------------

[measureUserName]
Measure=Plugin
Plugin=SysInfo.dll
SysInfoType=USER_NAME
SysInfoData=0
Substitute="":""

[measureComputerName]
Measure=Plugin
Plugin=SysInfo.dll
SysInfoType=COMPUTER_NAME
SysInfoData=0
Substitute="":""

[measureIP]
Measure=Plugin
Plugin=SysInfo.dll
SysInfoType=IP_ADDRESS
SysInfoData=0
Substitute="":""


; ----------------------------------
; STYLES
; ----------------------------------

[styleTitle]
StringAlign=Center
StringEffect=Shadow
StringStyle=Bold
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=13
AntiAlias=1
ClipString=1

[styleLeftText]
StringAlign=Left
StringCase=None
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleRightText]
StringAlign=Right
StringCase=None
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=2

[styleSeperator]
SolidColor=255,255,255,15


; ----------------------------------
; METERS
; ----------------------------------

[meterTitle]
Meter=String
MeterStyle=styleTitle
X=200
Y=#SlideDownY#
W=400
DynamicVariables=1
Text="123"
;Text=Computer Info


;---User_Name---;
;               ;
[meterUserNameLabel]
Meter=String
MeterStyle=styleLeftText
X=(#OffSet# + 25)
Y=35
W=200
Text=User Name:
DynamicVariables=1

[meterUserNameValue]
Meter=String
MeterStyle=styleRightText
MeasureName=measureUserName
X=(#SlideLeftX#)
Y=0r
W=220
Text=%1
DynamicVariables=1

;---ComputerName---;
;                  ;
[meterComputerNameLabel]
Meter=String
MeterStyle=styleLeftText
X=(#OffSet# + 25)
Y=0R
W=200
DynamicVariables=1
Text=Computer Name:

[meterComputerNameValue]
Meter=String
MeterStyle=styleRightText
MeasureName=measureComputerName
X=(#SlideLeftX#)
Y=0r
W=220
Text=%1
Substitute="":""
DynamicVariables=1

;---IP---;
;        ;
[meterIPLabel]
Meter=String
MeterStyle=styleLeftText
X=(#OffSet# + 25)
Y=0R
W=200
DynamicVariables=1
Text=IP Address:

[meterIPValue]
Meter=String
MeterStyle=styleRightText
MeasureName=measureIP
X=(#SlideLeftX#)
X=370
Y=0r
W=220
Text=%1
DynamicVariables=1
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Default Skin Background expanding when using ActionTimer slider

Post by balala »

I'm not very sure what you mean by
arpul wrote:if I do specify SkinHeight, it ignores [Background] and #Offset# and creates creates large background image.
If you do specify a SkinHeight option, the background set by the Background option of the [Rainmeter] section is extended to the width given by the option, which is normally. Finally if you have a set up background and you specify a width for the skin, the background should have to be extended to the specified width. But in this case
Any meter or part of a meter positioned outside the defined boundaries will be truncated.
The [BackGround] meter of your code on the other hand (in the posted code it is written so, not as [Background] - but this finally has not too much importance) is ignored because you didn't specify nor color, nor image for it and in such cases the default color is used. The default color is 0,0,0,0, which means completely transparent (due to the fourth 0) and Rainmeter ignores the mouse action on transparent meters. If you do add a SolidColor=0,0,0,1 option to the meter, it's not any more ignored and although it's not visible at all, when you move the mouse over it, the 123 string slides in.
arpul
Posts: 3
Joined: April 13th, 2018, 12:38 pm

Re: Default Skin Background expanding when using ActionTimer slider

Post by arpul »

Hey thanks for the reply.

Actually even with SolidColor not specified in [BackGround] LeftMouseUpAction and MouseOverAction is still active. I would assume because of Background.png being active under [Rainmeter]
However if I remove background from under [Rainmeter] then I would agree that i would have to specify at least SolidColor=0,0,0,1

What I meant to say about SkinHeight, was that it sets specific SkinHeight which then stays visible, even if I configure #Offset# option under [Background] to make a button which then expands. Button works fine, but I can not get rid of the background which is too big.
Then if I don't specify SkinHeights, it has vertical place holders for slide in text.
arpul
Posts: 3
Joined: April 13th, 2018, 12:38 pm

Re: Default Skin Background expanding when using ActionTimer slider

Post by arpul »

Got it sorted by playing around with it. Thanks !