May as well bring this up here as it seems to only surface with this skin.
I shut down my pc daily (we need no discussion on 'why'). I notice at every powerup the skin size keeps reverting to the size at time it's of 'Load'. IOW, when I resize via the mouse scroll and settle on a desired size, the size is not saved for the next pc powerup/restart. I do not know if this is relative, but I have configured my pc to NOT turn the internet on at power on. I turn it on manually only when I use it, always (again, no discussion needed on 'why').
-thx
It is currently August 31st, 2024, 11:53 pm
My First Skin Help
-
- Posts: 287
- Joined: June 12th, 2016, 2:40 am
-
- Rainmeter Sage
- Posts: 8003
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: My First Skin Help
Good news - I managed to find some time to work on the font thing today (after working on other things, both here and elsewhere), and the user (you, in this case) will have the option to choose from the operating system fonts and the fonts he places in the \@Resources\Fonts folder of the skin. Everything works perfectly till now, I just want to make other functional and visual adjustments so that I'm content with my work too. For now, it looks like (unfinished visuals, obviously; a font from your skin's @Resources\Fonts folder is displayed): P.S. I don't like to promise anything, but if all goes well and other stuff don't eat my time, I could hopefully finish it tonight (not sure about the little trigger button, but that could get the pass as well).MourningStar wrote: ↑July 22nd, 2021, 9:56 pm ^
since my sys has 300+ fonts and my interest is in less than 20% of them I prefer to locate them so that only these will scroll
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 5495
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: My First Skin Help
Please post your code for the mouse scroll bangs that set the size (scale)... or your entire current skin code (so everyone knows what you are working with currently).MourningStar wrote: ↑July 24th, 2021, 4:38 pm May as well bring this up here as it seems to only surface with this skin.
I shut down my pc daily (we need no discussion on 'why'). I notice at every powerup the skin size keeps reverting to the size at time it's of 'Load'. IOW, when I resize via the mouse scroll and settle on a desired size, the size is not saved for the next pc powerup/restart.
...
-thx
Most likely you have the size variable defined in 2 places, so even though you set it by scrolling, it is not changed in the other place, and resets to that when you refresh.
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Posts: 287
- Joined: June 12th, 2016, 2:40 am
Re: My First Skin Help
attachedeclectic-tech wrote: ↑July 25th, 2021, 4:55 pm Please post your code for the mouse scroll bangs that set the size (scale)... or your entire current skin code (so everyone knows what you are working with currently).
Most likely you have the size variable defined in 2 places, so even though you set it by scrolling, it is not changed in the other place, and resets to that when you refresh.
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 5495
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: My First Skin Help
The size does not reset for me when I reload/refresh this code!?
Not sure why it does for you.
Note: There are 2 'MiddleMouseUpActions=' in [MeterTemperature]. Only the first one will be used.
I would remove or comment out the action that resets the scale to 1 ( as shown below).
The 'Scale' variable is both 'set' and 'written' when you scroll the mouse, so whatever value you set, it should remain when the skin is reloaded/refreshed.I placed a semicolon on the line that rest the 'Scale' using the middle mouse button.
If you are still seeing a size reset, please create a skin package (instructions here) so your symptom can be duplicated.
![Confused :???:](./images/smilies/bw.gif)
Not sure why it does for you.
Note: There are 2 'MiddleMouseUpActions=' in [MeterTemperature]. Only the first one will be used.
I would remove or comment out the action that resets the scale to 1 ( as shown below).
The 'Scale' variable is both 'set' and 'written' when you scroll the mouse, so whatever value you set, it should remain when the skin is reloaded/refreshed.
Code: Select all
[MeterTemperature]
MeasureName=@CurrentTemperature
MeasureName2=CurrentTemperatureF
;MeasureName2=@UnitsTemperature
Meter=String
X=(10*#Scale#)
Y=(15*#Scale#)
FontFace=[FontFace]
FontSize=(55*#Scale#)
FontColor=#FontColor#
StringStyle=Normal
StringAlign=Left
StringEffect=Shadow
FontEffectColor=0,0,0,50
Antialias=1
DynamicVariables=1
Text=%1°C / %2°F
; Added to change the text size by scrolling the mouse wheel up or down
SolidColor=0,0,0,1
MiddleMouseUpAction=[!ToggleMeter FontName][!Redraw]
MouseScrollUpAction=[!SetVariable Scale (Clamp(#Scale#+0.05,0.1,3))][!WriteKeyValue Variables Scale (Clamp(#Scale#+0.1,0.1,3))][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!SetVariable Scale (Clamp(#Scale#-0.05,0.1,3))][!WriteKeyValue Variables Scale (Clamp(#Scale#+0.1,0.1,3))][!UpdateMeter *][!Redraw]
; MiddleMouseUpAction=[!SetVariable Scale 1][!WriteKeyValue Variables Scale 1][!UpdateMeter MeterTemperature][!Redraw]
If you are still seeing a size reset, please create a skin package (instructions here) so your symptom can be duplicated.
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Rainmeter Sage
- Posts: 8003
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: My First Skin Help
It doesn't but it is indeed not what it's supposed to be - I noticed that too. Didn't reply on that yet because I wanted to post the "font chooser" approach I've been working on as well, in the same reply. But then, since we're at it, the problem is that the Clamp() values in the scroll actions do not match between !SetVariable and !WriteKeyValue - they should be along these lines:eclectic-tech wrote: ↑July 25th, 2021, 5:56 pm The size does not reset for me when I reload/refresh this code!?![]()
Code: Select all
MouseScrollUpAction=[!SetVariable Scale (Clamp(#Scale#+0.05,0.1,3))][!WriteKeyValue Variables Scale (Clamp(#Scale#+0.05,0.1,3))][!UpdateMeter MeterTemperature][!Redraw]
MouseScrollDownAction=[!SetVariable Scale (Clamp(#Scale#-0.05,0.1,3))][!WriteKeyValue Variables Scale (Clamp(#Scale#-0.05,0.1,3))][!UpdateMeter MeterTemperature][!Redraw]
-
- Rainmeter Sage
- Posts: 5495
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: My First Skin Help
Good catch, I originally went with a 'tenth change' and forgot to update both clamps statementsYincognito wrote: ↑July 25th, 2021, 6:50 pm It doesn't but it is indeed not what it's supposed to be - I noticed that too. Didn't reply on that yet because I wanted to post the "font chooser" approach I've been working on as well, in the same reply. But then, since we're at it, the problem is that the Clamp() values in the scroll actions do not match between !SetVariable and !WriteKeyValue - they should be along these lines:Now, both !SetVariable and !WriteKeyValue will change the scale by the same amount.Code: Select all
MouseScrollUpAction=[!SetVariable Scale (Clamp(#Scale#+0.05,0.1,3))][!WriteKeyValue Variables Scale (Clamp(#Scale#+0.05,0.1,3))][!UpdateMeter MeterTemperature][!Redraw] MouseScrollDownAction=[!SetVariable Scale (Clamp(#Scale#-0.05,0.1,3))][!WriteKeyValue Variables Scale (Clamp(#Scale#-0.05,0.1,3))][!UpdateMeter MeterTemperature][!Redraw]
![Confused :?](./images/smilies/an.gif)
But that still does not explain why the size rests for the OP...
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Posts: 287
- Joined: June 12th, 2016, 2:40 am
Re: My First Skin Help
File attached. Thought it best to provide this with no mods as per above.eclectic-tech wrote: ↑July 25th, 2021, 5:56 pm... please create a skin package (instructions here) so your symptom can be duplicated.
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 8003
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: My First Skin Help
I just tested it out just as you did, through a restart (by the way, I also power on without internet and only connect when needed, no explanation why required) and didn't get the size reset, just like eclectic-tech. I don't think this isssue is code related, so make sure you:MourningStar wrote: ↑July 25th, 2021, 8:56 pm File attached. Thought it best to provide this with no mods as per above.
- don't have a recovery/restore tool that reverts the changes on files and folders at each restart
- have the (Windows security) permissions to write to the said folder or file, or that you have ownership of the folder
- you allow Notepad++ to reload the said file after it was "changed by another program" and don't save the "old state" by mistake when editing
- don't have other skins writing to the same file (loading just this skin and no other is a good way to test this possibility)
- don't use multiple Variants of the "same skin" and while you write into one variant, it's actually the other one that's loaded on restart (believe it or not, this happened to me as well and I was like "WTF?!")
There might be other potential culprits for this, but the code is pretty straightforward and should work properly, especially after making the modifications I mentioned here (that can't be a cause for size reset, of course, just for differences in what you see and what it is written to the file when scrolling to resize).
-
- Posts: 287
- Joined: June 12th, 2016, 2:40 am
Re: My First Skin Help
Perhaps not - updated scroll action. All is well now. thank you!
![Thumbs Up :thumbup:](./images/smilies/ay.gif)