It is currently April 20th, 2024, 3:00 pm

Container masking issue

Get help with creating, editing & fixing problems with skins
User avatar
Slotter In
Posts: 11
Joined: December 31st, 2015, 8:34 pm

Container masking issue

Post by Slotter In »

Hello, I hope somebody is able to point out where I am going wrong.

I have a skin that the text will in some cases exceed the bottom of the background image. I was trying to use Container=TextMask to stop it from doing this, but then all text just disappeared. Looking at examples of this masking text, I am failing to see how mine isn't working. I am also not heart set on this method, so if there is a better way to do this. As you can see from the attached images, the spacing will change pending on file name length (2 lines ea file is no problem and I would just cap it at that, but some files I may need to see the end characters (ie.v2, v3, etc))

Code: Select all

[InfoStyle]
Hidden=1
Group=Popup
X=8R
Y=10r
Text="%1"
AutoScale=1
AntiAlias=1
Container=TextMask

[TextMask]
Meter=Image
ImageName=#@#Border.png

[Index1Info]
Meter=String
MeasureName=mIndex1Name
MeterStyle=TextStyle | InfoStyle
w=300
clipstring=2
You do not have the required permissions to view the files attached to this post.
Last edited by Slotter In on May 23rd, 2021, 8:18 pm, edited 1 time in total.
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Container masking issue

Post by death.crafter »

Slotter In wrote: โ†‘May 22nd, 2021, 11:57 pm Hello, I hope somebody is able to point out where I am going wrong.

I have a skin that the text will in some cases exceed the bottom of the background image. I was trying to use Container=TextMask to stop it from doing this, but then all text just disappeared. Looking at examples of this masking text, I am failing to see how mine isn't working. I am also not heart set on this method, so if there is a better way to do this. As you can see from the attached images, the spacing will change pending on file name length (2 lines ea file is no problem and I would just cap it at that, but some files I may need to see the end characters (ie.v2, v3, etc))

Code: Select all

[InfoStyle]
Hidden=1
Group=Popup
X=8R
Y=10r
Text="%1"
AutoScale=1
AntiAlias=1
Container=TextMask

[TextMask]
Meter=Image
ImageName=#@#Border.png

[Index1Info]
Meter=String
MeasureName=mIndex1Name
MeterStyle=TextStyle | InfoStyle
w=300
clipstring=2
  • You are using Hidden=1 in [InfoStyle]
  • If you make it show up on some certain condition then make sure @Resources contains Border.png
  • Rather than using Border.png you can use just:

    Code: Select all

    [TextMask]
    Meter=Image
    H=#background height#
    W=#background width#
    SolidColor=0,0,0,255
    UpdateDivider=-1
    
Hope this helps.
๐Ÿ˜„
from the Realm of Death
User avatar
Slotter In
Posts: 11
Joined: December 31st, 2015, 8:34 pm

Re: Container masking issue

Post by Slotter In »

Using this:

Code: Select all

[TextMask]
Meter=Image
ImageName=#@#Border.png
SolidColor=0,255,0,90
I was able to confirm the image used does highlight the area that text is allowed. The whole skin is hidden until I mouse over, and the skin works perfectly until I add Container=TextMask. I tested it with a smaller image, which if working should only hide part of the text but all disappeared again.

Even using:

Code: Select all

[TextMask]
Meter=Image
H=#background height#
W=#background width#
SolidColor=0,0,0,255
UpdateDivider=-1
the same thing is happening
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Container masking issue

Post by death.crafter »

Slotter In wrote: โ†‘May 23rd, 2021, 1:03 am Using this:

Code: Select all

[TextMask]
Meter=Image
ImageName=#@#Border.png
SolidColor=0,255,0,90
I was able to confirm the image used does highlight the area that text is allowed. The whole skin is hidden until I mouse over, and the skin works perfectly until I add Container=TextMask. I tested it with a smaller image, which if working should only hide part of the text but all disappeared again.

Even using:

Code: Select all

[TextMask]
Meter=Image
H=#background height#
W=#background width#
SolidColor=0,0,0,255
UpdateDivider=-1
the same thing is happening
I hope you haven't but you literally did not put in #background width# and #background height# did you?
For further help please post the whole skin here. It's hard to tell where you went wrong.
from the Realm of Death
User avatar
Slotter In
Posts: 11
Joined: December 31st, 2015, 8:34 pm

Re: Container masking issue

Post by Slotter In »

lol no, i did change the H and W ;-)

Please ignore if it looks a little messy. I Frankensteined some other skins I had to make this, and was to lazy to clean it up since it worked.

Edit: I am not opposed to just stretching the background as needed either...but something tells me that would be a lot harder to integrate. Which is why I been trying to do this instead.

Code: Select all

[Rainmeter]
Update=1000
MouseOverAction=[!CommandMeasure MeasureFade "Stop 2"][!CommandMeasure MeasureFade "Execute 1"]
MouseLeaveAction=[!CommandMeasure MeasureFade "Stop 1"][!CommandMeasure MeasureFade "Execute 2"]
MouseScrollUpAction=[!CommandMeasure mPath "IndexUp"][!UpdateMeasure mPath][!UpdateMeasureGroup Children][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!CommandMeasure mPath "IndexDown"][!UpdateMeasure mPath][!UpdateMeasureGroup Children][!UpdateMeter *][!Redraw]
DynamicWindowSize=1
AccurateText=1

[Metadata]
Name= File Folder
Author=
Information=Display files inside a folder.
License=
Version=1.2

[Variables]
Alpha=1
U=[!UpdateMeasure "MeasureFade"][!UpdateMeter "A.Main-Icon"][!Redraw]
colorText=255,255,255,205
Font=trebuc

;----------------------------------------------------
; Styles
;----------------------------------------------------

[TextStyle]
Hidden=1
Group=Popup
FontColor=#colorText#
FontFace=#Font#
AntiAlias=1
FontSize=9
stringstyle=bold

[TextHighlight]
Hidden=1
Group=Popup
FontColor=#colorText#
FontFace=#Font#
stringstyle=bold

[IconStyle]
Hidden=1
Group=Popup
X=15
Y=80
w=40
h=40
AntiAlias=1

[IconStyle2]
Hidden=1
Group=Popup
X=15
Y=5r
w=40
h=40
AntiAlias=1

[HighlightStyle]
Hidden=1
Group=Popup
SolidColor=0,0,0,1
X=13
Y=75
W=373
H=50
DynamicVariables=1
MouseOverAction=[!SetOption #CURRENTSECTION# SolidColor "808080"][!UpdateMeter #CURRENTSECTION#][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# SolidColor ""][!UpdateMeter #CURRENTSECTION#][!Redraw]

[HighlightStyle2]
Hidden=1
Group=Popup
SolidColor=0,0,0,1
X=13
Y=30R
W=373
FontSize=8
H=50
DynamicVariables=1
MouseOverAction=[!SetOption #CURRENTSECTION# SolidColor "808080"][!UpdateMeter #CURRENTSECTION#][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# SolidColor ""][!UpdateMeter #CURRENTSECTION#][!Redraw]

[InfoStyle]
Hidden=1
Group=Popup
X=8R
Y=10r
Text="%1"
AutoScale=1
AntiAlias=1
Container=TextMask

;----------------------------------------------------
; Measures
;----------------------------------------------------

[MeasureFade]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat FadeIn,15,100
FadeIn=[!SetVariable Alpha "(Clamp(#Alpha#+10,100,255))"]#U#
ActionList2=Repeat FadeOut,15,100
FadeOut=[!SetVariable Alpha "(Clamp(#Alpha#-10,1,255))"]#U#
DynamicVariables=1

[mPath]
Measure=Plugin
Plugin=FileView
Path=""
Count=5

[mFolderCount]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FolderCount
Group=Children

[mFileCount]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileCount
Group=Children

[mFolderSize]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FolderSize
Group=Children

;----------------------------------------------------
; Index 1

[mIndex1Name]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileName
Index=1
Group=Children

[mIndex1Icon]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=Icon
IconSize=#IconSize#
Index=1
Group=Children

;----------------------------------------------------
; Index 2

[mIndex2Name]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileName
Index=2
Group=Children

[mIndex2Icon]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=Icon
IconSize=#IconSize#
Index=2
Group=Children

;----------------------------------------------------
; Index 3

[mIndex3Name]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileName
Index=3
Group=Children

[mIndex3Icon]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=Icon
IconSize=#IconSize#
Index=3
Group=Children

;----------------------------------------------------
; Index 4

[mIndex4Name]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileName
Index=4
Group=Children

[mIndex4Icon]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=Icon
IconSize=#IconSize#
Index=4
Group=Children

;----------------------------------------------------
; Index 5

[mIndex5Name]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileName
Index=5
Group=Children

[mIndex5Icon]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=Icon
IconSize=#IconSize#
Index=5
Group=Children

;----------------------------------------------------
; Meters
;----------------------------------------------------

[A.Main-Icon]
Hidden=0
Group=PopupA
Meter=Image
ImageName=#@#Arrow-Down.png
ImageAlpha=#Alpha#
DynamicVariables=1
H=90
W=90
MouseOverAction=!Execute [!HideMeterGroup PopupA][!ShowMeterGroup Popup]

[TextMask]
Meter=Image
ImageName=#@#Border.png

[B.Main-Icon]
Hidden=1
Group=Popup
Meter=Image
ImageName=#@#Background.png
MouseLeaveAction=!Execute [!ShowMeterGroup PopupA][!HideMeterGroup Popup]

[Path]
Meter=String
MeasureName=mPath
MeterStyle=TextStyle | TextHighlight
Text="%1"
X=30
y=15
w=350
clipstring=1

[FolderCountTitle]
Meter=String
MeterStyle=TextStyle
X=85
y=25r
Text=Folders:

[FolderCount]
Meter=String
MeasureName=mFolderCount
MeterStyle=TextStyle | TextHighlight
X=R
Y=r

[FileCountTitle]
Meter=String
MeterStyle=TextStyle
X=10R
Y=r
Text=Files:

[FileCount]
Meter=String
MeasureName=mFileCount
MeterStyle=TextStyle | TextHighlight
X=R
Y=r

[FolderSizeTitle]
Meter=String
MeterStyle=TextStyle
X=8R
Y=r
Text=Size:

[FolderSize]
Meter=String
MeasureName=mFolderSize
MeterStyle=TextStyle | TextHighlight
X=R
Y=r
AutoScale=1
text= "%1B"

[Index1]
Meter=Image
MeterStyle=HighlightStyle
LeftMouseDoubleClickAction=[!CommandMeasure mIndex1Name "FollowPath"][!UpdateMeasure mPath][!UpdateMeasureGroup Children][!UpdateMeter *][!Redraw]

[Index1Icon]
Meter=Image
MeasureName=mIndex1Icon
MeterStyle=IconStyle
y=80

[Index1Info]
Meter=String
MeasureName=mIndex1Name
MeterStyle=TextStyle | InfoStyle
w=300
clipstring=2

[Index2]
Meter=Image
MeterStyle=HighlightStyle2
LeftMouseDoubleClickAction=[!CommandMeasure mIndex2Name "FollowPath"][!UpdateMeasure mPath][!UpdateMeasureGroup Children][!UpdateMeter *][!Redraw]

[Index2Icon]
Meter=Image
MeasureName=mIndex2Icon
MeterStyle=IconStyle2

[Index2Info]
Meter=String
MeasureName=mIndex2Name
MeterStyle=TextStyle | InfoStyle
w=300
clipstring=2

[Index3]
Meter=Image
MeterStyle=HighlightStyle2
LeftMouseDoubleClickAction=[!CommandMeasure mIndex3Name "FollowPath"][!UpdateMeasure mPath][!UpdateMeasureGroup Children][!UpdateMeter *][!Redraw]

[Index3Icon]
Meter=Image
MeasureName=mIndex3Icon
MeterStyle=IconStyle2

[Index3Info]
Meter=String
MeasureName=mIndex3Name
MeterStyle=TextStyle | InfoStyle
w=300
clipstring=2

[Index4]
Meter=Image
MeterStyle=HighlightStyle2
LeftMouseDoubleClickAction=[!CommandMeasure mIndex4Name "FollowPath"][!UpdateMeasure mPath][!UpdateMeasureGroup Children][!UpdateMeter *][!Redraw]

[Index4Icon]
Meter=Image
MeasureName=mIndex4Icon
MeterStyle=IconStyle2

[Index4Info]
Meter=String
MeasureName=mIndex4Name
MeterStyle=TextStyle | InfoStyle
w=300
clipstring=2

[Index5]
Meter=Image
MeterStyle=HighlightStyle2
LeftMouseDoubleClickAction=[!CommandMeasure mIndex5Name "FollowPath"][!UpdateMeasure mPath][!UpdateMeasureGroup Children][!UpdateMeter *][!Redraw]

[Index5Icon]
Meter=Image
MeasureName=mIndex5Icon
MeterStyle=IconStyle2

[Index5Info]
Meter=String
MeasureName=mIndex5Name
MeterStyle=TextStyle | InfoStyle
w=300
clipstring=2

[PreviousFolder]
Meter=String
MeterStyle=TextStyle
StringAlign=Right
X=390
Y=425
FontSize=12
AntiAlias=1
Text=Back
LeftMouseUpAction= [!CommandMeasure mPath "PreviousFolder"][!UpdateMeasure mPath][!UpdateMeasureGroup Children][!UpdateMeter *][!Redraw]
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Container masking issue

Post by death.crafter »

Slotter In wrote: โ†‘May 23rd, 2021, 4:15 am lol no, i did change the H and W ;-)

Please ignore if it looks a little messy. I Frankensteined some other skins I had to make this, and was to lazy to clean it up since it worked.

Edit: I am not opposed to just stretching the background as needed either...but something tells me that would be a lot harder to integrate. Which is why I been trying to do this instead.

There is a reason I asked for the skin and not the code. This is way too long to look at and decipher in an unfamiliar interface. Anyway let's see what can we do.

Edit: I can not get a clue about what is going on. Please either make a zip file or a rmskin file of the skin and attach it to the above post.
from the Realm of Death
User avatar
Slotter In
Posts: 11
Joined: December 31st, 2015, 8:34 pm

Re: Container masking issue

Post by Slotter In »

Oh! I am sorry, I misread/understood what you were asking for.
I have never made a rmskin before, I hope this is right

Edit: Oh no! I was so focused on not having the text show past the background that I haven't realized the larger problem! If I hide the text, I won't be able to open the file! WoW...I can't believe I really had such a massive oversight! I guess I have 2 options...easy, and just cap how many lines a file's name can be...or hard, and have the background stretch with the extended text. Guess I will just add H= to cap the number of lines per file name for now, and work on the other over time.

I have seen bar skins like CPU usage doing this. They have an image for the bar full and it adjusts it as the usage changes. Maybe I can adapt that, but the pain would be to have it do so in accordance with the file name length changes.
You do not have the required permissions to view the files attached to this post.
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Container masking issue

Post by death.crafter »

Slotter In wrote: โ†‘May 23rd, 2021, 9:16 am Oh! I am sorry, I misread/understood what you were asking for.
I have never made a rmskin before, I hope this is right

Edit: Oh no! I was so focused on not having the text show past the background that I haven't realized the larger problem! If I hide the text, I won't be able to open the file! WoW...I can't believe I really had such a massive oversight! I guess I have 2 options...easy, and just cap how many lines a file's name can be...or hard, and have the background stretch with the extended text. Guess I will just add H= to cap the number of lines per file name for now, and work on the other over time.

I have seen bar skins like CPU usage doing this. They have an image for the bar full and it adjusts it as the usage changes. Maybe I can adapt that, but the pain would be to have it do so in accordance with the file name length changes.
You can just scroll you know. But let me check first.
from the Realm of Death
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Container masking issue

Post by death.crafter »

Slotter In wrote: โ†‘May 23rd, 2021, 9:16 am Oh! I am sorry, I misread/understood what you were asking for.
I have never made a rmskin before, I hope this is right

Edit: Oh no! I was so focused on not having the text show past the background that I haven't realized the larger problem! If I hide the text, I won't be able to open the file! WoW...I can't believe I really had such a massive oversight! I guess I have 2 options...easy, and just cap how many lines a file's name can be...or hard, and have the background stretch with the extended text. Guess I will just add H= to cap the number of lines per file name for now, and work on the other over time.

I have seen bar skins like CPU usage doing this. They have an image for the bar full and it adjusts it as the usage changes. Maybe I can adapt that, but the pain would be to have it do so in accordance with the file name length changes.
Thank you for your patience and here we go:
[Click to animate]
2021-05-24 00-16-02_Trim.gif
Skin:
FileFolder_1.3.rmskin
Where you went wrong:
You only contained the text inside the image. When meters are in a container they are relative to each other. Or simply the meters inside a container are only relative to meters that are inside that container and in the order they are inserted. They don't give a shit about meters outside of that container. So when you used relative positioning in file names you expected them to be relative to the icons, but that didn't happen cause icons were outside the container.

Hope I made myself clear.

And I optimized your code a bit. I hope you can easily follow.

And I used a shape meter for background instead of image for dynamic height.
You do not have the required permissions to view the files attached to this post.
from the Realm of Death
User avatar
Slotter In
Posts: 11
Joined: December 31st, 2015, 8:34 pm

Re: Container masking issue

Post by Slotter In »

WoW! I never expected you would put so much work into cleaning it up! Thank you so much! It looks amazing and even the small details like the back arrow :thumbup:

Thank you so much for your time and patience :D