It is currently April 19th, 2024, 4:36 pm

Custom tooltip skin

Get help with creating, editing & fixing problems with skins
User avatar
Yincognito
Rainmeter Sage
Posts: 7125
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Custom tooltip skin

Post by Yincognito »

Judian81 wrote: August 4th, 2022, 7:08 pm unloading is good 2.png

yes it works great. i change the skin to another location. just like you have. i can unload the skin when it is not visable on the screen.

guess it has something to do with the delay, but i am not totaly sure.
i will keep up the post if i find something or not.

have a nice day
Ah, ok, all clear now. Yeah, I suppose somewhere along the lines Rainmeter isn't able to keep up with things happening that fast, or maybe it's delay related like you said. Too bad we can't replicate it on a consistent basis in order to fix it, but I'm glad the dot unload workaround is what you needed for now. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
Judian81
Posts: 180
Joined: May 6th, 2021, 2:57 pm

Re: Custom tooltip skin

Post by Judian81 »

Yincognito wrote: August 3rd, 2022, 5:33 pm It also depends on what "version" of the tooltip skin system you have
this is the skin code i have in tooltip.

Code: Select all

; This is the custom tooltip skin (i.e. the skin displaying the custom tooltips when hovering over a parent skin meter that has them enabled).
; Needed parts for custom tooltips to work (or the steps needed to build a custom tooltip skin like this one):
; - the MS (Mouse Cursor Size), PP (Populated Status), PX (Parent X), PY (Parent Y), PW (Parent Width), PH (Parent Height) variables
; - the [MeasureMoveTooltip], moves this skin to a location under the parent skin meter that triggered tooltips on hover (group: TooltipGroup)
; - the blank (i.e. not populated) [MeterTooltipIcon], [MeterTooltipTitle] and [MeterTooltipText] (group: TooltipGroup)
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
BackgroundMode=2
SolidColor=255,255,255,255


[Variables]
MS=24
PP=0
PX=0
PY=0
PW=0
PH=0
vSkinScale=1.5

---Measures---

[MeasureMoveTooltip]
Group=TooltipGroup
Measure=Calc
UpdateDivider=-1
IfCondition=(#PP#=1)
IfTrueAction=[!Move "(((#PX#+#CURRENTCONFIGWIDTH#)>(#WORKAREAX#+#WORKAREAWIDTH#))?(#WORKAREAX#+#WORKAREAWIDTH#-#CURRENTCONFIGWIDTH#):(#PX#))" "(((#PY#+#PH#+#MS#+#CURRENTCONFIGHEIGHT#)>(#WORKAREAY#+#WORKAREAHEIGHT#))?(#PY#-#MS#-#CURRENTCONFIGHEIGHT#):(#PY#+#PH#+#MS#))"][!ShowFade]
IfConditionMode=1
DynamicVariables=1

---Meters---

[MeterTooltipIcon]
Group=TooltipGroup
Meter=Image
X=(2*#vSkinScale#)
Y=(2*#vSkinScale#)
W=(25*#vSkinScale#)
H=(25*#vSkinScale#)
SolidColor=255,255,255,255
ImageName=
UpdateDivider=-1
DynamicVariables=1

[MeterTooltipTitle]
Group=TooltipGroup
Meter=STRING
FontFace=Consolas
StringStyle=Bold
FontColor=0,0,0,255
FontSize=(9*#vSkinScale#)
SolidColor=255,255,255,255
Padding=2,0,2,0
AntiAlias=1
X=0R
Y=0r
Text=
UpdateDivider=-1
DynamicVariables=1

[MeterTooltipText]
Group=TooltipGroup
Meter=STRING
FontFace=Consolas
FontColor=0,0,0,255
FontSize=(9*#vSkinScale#)
SolidColor=255,255,255,255
Padding=2,0,2,0
AntiAlias=1
X=0r
Y=0R
Text=
UpdateDivider=-1
DynamicVariables=1

this is what i have made of it.

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
@include=#CURRENTPATH#theme\style.inc
ContextTitle="Edit Style"
ContextAction=["#CURRENTPATH#theme\style.inc"]
OnRefreshAction=[!SetVariable PI 0][!DeactivateConfig "#ROOTCONFIG#\Tooltip"][!CommandMeasure mRoman1 Calculate([tTimeHours])][!CommandMeasure mRoman2 Calculate([tTimeMinutes])]
DynamicWindowSize=1

[Variables]
vSkinWidth=160
vSkinHeight=80
vSkinScale=1.5

paddingLeft=15
paddingTop=15
paddingRight=15
paddingBottom=15

vSlowDown=0

PI=0
PM=""

[tTimeHours]
Measure=Time
Format=%I
OnChangeAction=[!CommandMeasure mRoman1 Calculate([tTimeHours])]
DynamicVariables=1

[tTimeMinutes]
Measure=Time
Format=%M
OnChangeAction=[!CommandMeasure mRoman2 Calculate([tTimeMinutes])]
DynamicVariables=1

[mRoman1]
Measure=Script
ScriptFile=roman clock HMS.lua

[mRoman2]
Measure=Script
ScriptFile=roman clock HMS.lua

[tTitle]
Meter=String
MeterStyle=sTextCenter
Y=((10*#vSkinScale#)+#paddingTop#)
X=(((#vSkinWidth#*#vSkinScale#)/2)+#paddingLeft#)
W=((#vSkinWidth#*#vSkinScale#)/2)
H=(22*#vSkinScale#)
Text="Roman Clock"
MouseOverAction=[!SetVariable PI 1][!SetVariable PM "#CURRENTSECTION#"][!WriteKeyValue "#ROOTCONFIG#\Tooltip" StartHidden 1 "#SETTINGSPATH#Rainmeter.ini"][!Delay 25][!ActivateConfig "#ROOTCONFIG#\Tooltip"][!ZPos "2" "#ROOTCONFIG#\Tooltip"][!UpdateMeasure "MeasurePopulateTooltip"]
MouseLeaveAction=[!SetVariable PI 0][!SetVariable PM ""][!DeactivateConfig "#ROOTCONFIG#\Tooltip"]
;ToolTipText="1 I, 5 V, 10 X, 50 L, 100 C, 500 D, 1000 M"
InlineSetting=CharacterSpacing | 0.7 | 0.7
UpdateDivider=-1

[tText1]
Meter=String
MeasureName=mRoman1
MeasureName2=mRoman2
MeterStyle=sTextCenter
FontColor=130,131,132,255
Y=((#paddingTop#+40)*#vSkinScale#)
X=((#vSkinWidth#/2*#vSkinScale#)+#paddingLeft#)
W=(#vSkinWidth#/2*#vSkinScale#)
H=(22*#vSkinScale#)
MouseOverAction=[!SetVariable PI 2][!SetVariable PM "#CURRENTSECTION#"][!WriteKeyValue "#ROOTCONFIG#\Tooltip" StartHidden 1 "#SETTINGSPATH#Rainmeter.ini"][!Delay 25][!ActivateConfig "#ROOTCONFIG#\Tooltip"][!ZPos "2" "#ROOTCONFIG#\Tooltip"][!UpdateMeasure "MeasurePopulateTooltip"]
MouseLeaveAction=[!SetVariable PI 0][!SetVariable PM ""][!DeactivateConfig "#ROOTCONFIG#\Tooltip"]
;LeftMouseUpAction=[]
Text=%1:%2

[tSeperator1]
Meter=Image
MeterStyle=sSeperator
X=((12*#vSkinScale#)+#paddingLeft#)
Y=((61*#vSkinScale#)+#paddingTop#)
W=(#vSkinWidth#*#vSkinScale#-(22*#vSkinScale#))
H=(1*#vSkinScale#)
UpdateDivider=-1

[MeasurePopulateTooltip]
Measure=Calc
IfCondition=(#PI#=1)
IfTrueAction=[!SetOption MeterTooltipIcon ImageName "#CURRENTPATH#Theme\tooltipicon.ico" "#ROOTCONFIG#\Tooltip"][!SetOption MeterTooltipTitle Text "Roman Clock:" "#ROOTCONFIG#\Tooltip"][!SetOption MeterTooltipText Text "I = 1, V = 5, X = 10, L = 50, C = 100, D = 500, M = 1000, VI = 6 (5+1), IV = 4 (5-1)." "#ROOTCONFIG#\Tooltip"][!UpdateMeterGroup TooltipGroup "#ROOTCONFIG#\Tooltip"][!Redraw "#ROOTCONFIG#\Tooltip"][!SetVariable PP 1 "#ROOTCONFIG#\Tooltip"][!SetVariable PX (#CURRENTCONFIGX#+[#PM#:X]) "#ROOTCONFIG#\Tooltip"][!SetVariable PY (#CURRENTCONFIGY#+[#PM#:Y]) "#ROOTCONFIG#\Tooltip"][!SetVariable PW [#PM#:W] "#ROOTCONFIG#\Tooltip"][!SetVariable PH [#PM#:H] "#ROOTCONFIG#\Tooltip"][!UpdateMeasureGroup TooltipGroup "#ROOTCONFIG#\Tooltip"]
IfCondition2=(#PI#=2)
IfTrueAction2=[!SetOption MeterTooltipIcon ImageName "#CURRENTPATH#Theme\tooltipicon.ico" "#ROOTCONFIG#\Tooltip"][!SetOption MeterTooltipTitle Text "Roman Clock:" "#ROOTCONFIG#\Tooltip"][!SetOption MeterTooltipText Text "[tTimeHours]:[tTimeMinutes]" "#ROOTCONFIG#\Tooltip"][!UpdateMeterGroup TooltipGroup "#ROOTCONFIG#\Tooltip"][!Redraw "#ROOTCONFIG#\Tooltip"][!SetVariable PP 1 "#ROOTCONFIG#\Tooltip"][!SetVariable PX (#CURRENTCONFIGX#+[#PM#:X]) "#ROOTCONFIG#\Tooltip"][!SetVariable PY (#CURRENTCONFIGY#+[#PM#:Y]) "#ROOTCONFIG#\Tooltip"][!SetVariable PW [#PM#:W] "#ROOTCONFIG#\Tooltip"][!SetVariable PH [#PM#:H] "#ROOTCONFIG#\Tooltip"][!UpdateMeasureGroup TooltipGroup "#ROOTCONFIG#\Tooltip"]
IfConditionMode=1
DynamicVariables=1
the place i downloaded your skin code is from here.
User avatar
Yincognito
Rainmeter Sage
Posts: 7125
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Custom tooltip skin

Post by Yincognito »

Judian81 wrote: August 5th, 2022, 3:38 am this is the skin code i have in tooltip.
[...]
the place i downloaded your skin code is from here.
Yep, the code looks alright and the link as well. What I use is very slightly different (just a few variables more to control things) and in any case it doesn't prevent the strange situation and error we talked about anyway. When I wrote the code in that thread I tried to make things easier for other users by not including every little "feature" that I use, so I kept it as simple as I could. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth