It is currently April 26th, 2024, 5:14 pm

Click on Image = Image gets Full-Screen

Get help with creating, editing & fixing problems with skins
o0Julia0o
Posts: 17
Joined: November 25th, 2019, 12:35 pm

Click on Image = Image gets Full-Screen

Post by o0Julia0o »

hi, how am i able to click on an image, that it´s getting fullscreen.

I have a slideshow - leftclick does nothing. But it would be great if a leftclick on the actual shown image would get this image to fullscreen. Another click back to the slideshow.

Something like that:
LeftMouseUpAction=Fullscreen-Image
If Fullscreen-Image
LeftMouseUpAction=End-Fullscreen-Image

Maybe with this functions?
#SCREENAREAHEIGHT#
#SCREENAREAWIDTH#
Last edited by o0Julia0o on November 25th, 2019, 3:50 pm, edited 1 time in total.
User avatar
balala
Rainmeter Sage
Posts: 16173
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Click on Image = Image gets Full-Screen

Post by balala »

o0Julia0o wrote: November 25th, 2019, 3:00 pm I have a slideshow
First please post a code of that slideshow skin.
o0Julia0o
Posts: 17
Joined: November 25th, 2019, 12:35 pm

Re: Click on Image = Image gets Full-Screen

Post by o0Julia0o »

Code: Select all

[Rainmeter]
Update=3000

[GetFilePath]
Measure=Plugin
Plugin=QuotePlugin
PathName=D:\RainmakerPortable\Skins\Slideshow\Bilder
Subfolders=0
FileFilter=*.jpg
UpdateDivider=300

[MeterShowPicture]
Meter=Image
MeasureName=GetFilePath
X=0
Y=0
W=700
H=394
PreserveAspectRatio=0
Last edited by balala on November 25th, 2019, 4:19 pm, edited 1 time in total.
Reason: Please use <code> tags whenever are you posting code snippets. It's the </> button.
User avatar
balala
Rainmeter Sage
Posts: 16173
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Click on Image = Image gets Full-Screen

Post by balala »

o0Julia0o wrote: November 25th, 2019, 3:50 pm

Code: Select all

[Rainmeter]
Update=3000

[GetFilePath]
Measure=Plugin
Plugin=QuotePlugin
PathName=D:\RainmakerPortable\Skins\Slideshow\Bilder
Subfolders=0
FileFilter=*.jpg
UpdateDivider=300

[MeterShowPicture]
Meter=Image
MeasureName=GetFilePath
X=0
Y=0
W=700
H=394
PreserveAspectRatio=0

Code: Select all

[Rainmeter]
Update=3000

[Variables]
Size=0

[GetFilePath]
Measure=Plugin
Plugin=QuotePlugin
PathName=D:\RainmakerPortable\Skins\Slideshow\Bilder
Subfolders=0
FileFilter=*.jpg
UpdateDivider=300

[MeterShowPicture]
Meter=Image
MeasureName=GetFilePath
X=0
Y=0
W=(700+#Size#*(#SCREENAREAWIDTH#-700))
H=(394+#Size#*(#SCREENAREAHEIGHT#-394))
PreserveAspectRatio=0
DynamicVariables=1
LeftMouseUpAction=[!SetVariable Size "(1-#Size#)"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
Note that Update=3000 ([Rainmeter] section) doesn't look a good idea. In most cases the default Update=1000 is the best choice. Not saying that if the Update is set to 3000 and the UpdateDivider of the [GetFilePath] measure to UpdateDivider=300, the image is updated once per 300 x 3000 milliseconds = 900,000 milliseconds = 900 seconds = 15 minutes. A little bit too much, in my opinion.
o0Julia0o
Posts: 17
Joined: November 25th, 2019, 12:35 pm

Re: Click on Image = Image gets Full-Screen

Post by o0Julia0o »

Thanks alot! O.k., i thought UpdateDivider is the time at all. And the global Update is watching this time after the other times, like UpdateDivider. So is hat at least to be the same, to work.

So you have to call it UpdateMultipliyer. So i have set it to 150.000 on both fields. For 5 minutes to change a picture. Maybe the best to not disturb the PC too much. The worst case is 300.000 UpdateDivider to 1 global. Because global is more code(all code) then only the GetFilePath-Code-Section. But 300.000 global to 1 UpdateDivider would be bad, too.

If i do this:

Code: Select all

[Rainmeter]
Update=150000

[Variables]
Size=0

[GetFilePath]
Measure=Plugin
Plugin=QuotePlugin
PathName=D:\RainmakerPortable\Skins\Slideshow\Bilder
Subfolders=0
FileFilter=*.jpg
UpdateDivider=150000

[MeterShowPicture]
Meter=Image
MeasureName=GetFilePath
X=0
Y=0
W=(700+#Size#*(#SCREENAREAWIDTH#-700))
H=(394+#Size#*(#SCREENAREAHEIGHT#-394))
PreserveAspectRatio=0
DynamicVariables=1
LeftMouseUpAction=[!SetVariable Size "(1-#Size#)"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
I can click on the images, they are getting big. But i have the window at the button of the screen. If the picture now get big, it´s getting bigger to the buttom of the monitor. So you can´t see the image. It´s mabe fullscreen - i can´t see it. It isn´t centered - that´s the problem.
User avatar
balala
Rainmeter Sage
Posts: 16173
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Click on Image = Image gets Full-Screen

Post by balala »

o0Julia0o wrote: November 25th, 2019, 5:30 pm So is hat at least to be the same, to work.
No, they don't have to be at all the same.
o0Julia0o wrote: November 25th, 2019, 5:30 pm So i have set it to 150.000 on both fields. For 5 minutes to change a picture. Maybe the best to not disturb the PC too much. The worst case is 300.000 UpdateDivider to 1 global. Because global is more code(all code) then only the GetFilePath-Code-Section. But 300.000 global to 1 UpdateDivider would be bad, too.
Update within the [Rainmeter] section is the period of updating the skin. It is expressed into milliseconds, so Update=1000 means one update per 1000 milliseconds = 1 second. This is the best choice in most cases.
Don't increase it to 150,000. This would mean one update per 150,000 milliseconds = 150 seconds. Too much.
Not mentioning that UpdateDivider=150000 set on the [GetFilePath] measure means this measure is updated once per 150,000 x 150,000 milliseconds = 22,500,000,000 milliseconds = 22,500,000 seconds = more then 260 days!!! Practically you won't get the measure updated never.
o0Julia0o wrote: November 25th, 2019, 5:30 pm I can click on the images, they are getting big. But i have the window at the button of the screen. If the picture now get big, it´s getting bigger to the buttom of the monitor. So you can´t see the image. It´s mabe fullscreen - i can´t see it. It isn´t centered - that´s the problem.
A first solution would be to move the skin in the upper left corner of the screen and if you do this, even if you get the skin large, it'll be completely visible. To automatically move it as said, add an OnRefreshAction=[!Move "0" "0"] option to the [Rainmeter] section.
The problem is that if you have the skin in any other position than the upper left corner, when you click it and it is enlarged, only the upper left corner of the skin is kept on the screen, the rest is going outside of it. Moving it as described avoids this.