It is currently March 29th, 2024, 1:49 pm

Gadgets 7.6.0 - inspired by AddGadgets.com Sidebar Gadgets

A package of skins with a "theme" or by a single author
baster1982
Posts: 4
Joined: July 30th, 2020, 6:01 pm

Re: Gadgets 7.0.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by baster1982 »

SilverAzide wrote: August 22nd, 2021, 4:01 am It's not really stuck. Since you upgraded, it kept all your settings. This event setting is controlled by you. To change it to 2022 (or anything you want), click the little wrench icon on the clock, and in the Settings, click "Configure chime and alarms...". On the Alarm Settings, change the Event Name and time to anything you want!

(If you install a fresh copy, it will be set to 1/1/2022. ;-) )
my mistake everything works perfectly :D
User avatar
philumax
Posts: 32
Joined: May 30th, 2020, 2:04 pm

Re: Gadgets 7.0.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by philumax »

Hello everyone.
The update has arrived on my desktop!
That's what happens :
Image
It's not hot here! It's been a while since ... It's been a very long time, that I had not had to keep pants so long!
If that continues, we will make the connection with winter, without going through autumn.
Further down in my country, it's the opposite: it's too hot, the proof, the fires.
We are really badly off.
The gadgets are here and that's what matters, for now! 😊
See you and thank you again.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: Gadgets 7.0.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by SilverAzide »

philumax wrote: August 23rd, 2021, 4:05 am Hello everyone.
The update has arrived on my desktop!
That's what happens :

It's not hot here! It's been a while since ... It's been a very long time, that I had not had to keep pants so long!
If that continues, we will make the connection with winter, without going through autumn.
Further down in my country, it's the opposite: it's too hot, the proof, the fires.
We are really badly off.
The gadgets are here and that's what matters, for now! 😊
See you and thank you again.
Thanks philumax! Nice desktop! :thumbup:
Gadgets Wiki GitHub More Gadgets...
User avatar
philumax
Posts: 32
Joined: May 30th, 2020, 2:04 pm

Re: Gadgets 7.0.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by philumax »

lively office! :D
djamman
Posts: 10
Joined: January 3rd, 2020, 12:17 pm

Re: Gadgets 7.0.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by djamman »

SilverAzide - thank you so very much for continuing to support Gadgets.

On my Calendar Gadget I prefer to have "today" surrounded by an ellipse. To do so I need to find the center of today's date. I am having trouble doing so - I can make it look good for a scale of 1.0 and 2.0, or for a scale of 1.2 and 1.6. It appears to me that somthing I do not understand is happening with fractional scales.

This works pretty well for a scale of 1.2 and 1.6. Any sugestions for something that works for all scales?

Code: Select all

[TodayHL]
Meter=Shape
Shape=Ellipse ((#Bumper.x#+(0.5*#C.w#))+(#C.w#+#Space.x#)*#Week#), (#Bumper.top#+(0.5*#C.h#)+2*#Space.y#+(#C.h#)*(#ThisWeek#+1)),(1+(0.5*#C.w#)),(1+(0.5*#C.h#)) | Fill Color 0,0,0,0 | Strokewidth 2 | Stroke Color #ColorFontTitle#
Antialias=1
Hidden=#NotCurrentMonth#
DynamicVariables=1
Thanks,
Doug
Last edited by SilverAzide on August 24th, 2021, 4:09 pm, edited 1 time in total.
Reason: Added code tags.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: Gadgets 7.0.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by SilverAzide »

djamman wrote: August 24th, 2021, 3:31 pm SilverAzide - thank you so very much for continuing to support Gadgets.

On my Calendar Gadget I prefer to have "today" surrounded by an ellipse. To do so I need to find the center of today's date. I am having trouble doing so - I can make it look good for a scale of 1.0 and 2.0, or for a scale of 1.2 and 1.6. It appears to me that somthing I do not understand is happening with fractional scales.

This works pretty well for a scale of 1.2 and 1.6. Any sugestions for something that works for all scales?

Code: Select all

[TodayHL]
Meter=Shape
Shape=Ellipse ((#Bumper.x#+(0.5*#C.w#))+(#C.w#+#Space.x#)*#Week#), (#Bumper.top#+(0.5*#C.h#)+2*#Space.y#+(#C.h#)*(#ThisWeek#+1)),(1+(0.5*#C.w#)),(1+(0.5*#C.h#)) | Fill Color 0,0,0,0 | Strokewidth 2 | Stroke Color #ColorFontTitle#
Antialias=1
Hidden=#NotCurrentMonth#
DynamicVariables=1
Thanks,
Doug
Glad you are enjoying the Gadgets!

It looks like from your code (I didn't try it yet) that you have figured out most of the important bits. The "C.w" and "C.h" values are the width and height of a "cell", which is where each of the days are drawn. So once you have the position of the cell (bumper+day or week offset), the center should be half of the C.w and C.h values. All good there.

I do know that sometimes scale factors that work out to fractions of pixels can be a problem, since Rainmeter just truncates the values. That is one of the handy things about TransformationMatrix, in that it works well even on fractional pixels by antialiasing. (This new Gadgets 7.0 calendar is a near-complete redo of the calendar skin, since it uses near-stock LuaCalendar 6.0 -- no TransformationMatrix code -- instead of a heavily modded version of 5.0 which made extensive use of TransformationMatrix.)

Give me a bit to experiment and think on this. We might need to resurrect TransformationMatrix for just the ellipse, but hopefully it won't come to that! Another possibility I can think of is to try using rounding on the formulas (Rainmeter truncates instead of rounds, if I understand it correctly, so this might be a source of any appearance issues).
Gadgets Wiki GitHub More Gadgets...
djamman
Posts: 10
Joined: January 3rd, 2020, 12:17 pm

Re: Gadgets 7.0.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by djamman »

SilverAzide wrote: August 24th, 2021, 4:09 pm Glad you are enjoying the Gadgets!

It looks like from your code (I didn't try it yet) that you have figured out most of the important bits. The "C.w" and "C.h" values are the width and height of a "cell", which is where each of the days are drawn. So once you have the position of the cell (bumper+day or week offset), the center should be half of the C.w and C.h values. All good there.

I do know that sometimes scale factors that work out to fractions of pixels can be a problem, since Rainmeter just truncates the values. That is one of the handy things about TransformationMatrix, in that it works well even on fractional pixels by antialiasing. (This new Gadgets 7.0 calendar is a near-complete redo of the calendar skin, since it uses near-stock LuaCalendar 6.0 -- no TransformationMatrix code -- instead of a heavily modded version of 5.0 which made extensive use of TransformationMatrix.)

Give me a bit to experiment and think on this. We might need to resurrect TransformationMatrix for just the ellipse, but hopefully it won't come to that! Another possibility I can think of is to try using rounding on the formulas (Rainmeter truncates instead of rounds, if I understand it correctly, so this might be a source of any appearance issues).
I can certainly live with it as is, I just have a fetish for doing things right. If it is easy to fix great, but don't go to too much bother to fix it.

Doug
djamman
Posts: 10
Joined: January 3rd, 2020, 12:17 pm

Re: Gadgets 7.0.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by djamman »

SilverAzide wrote: August 24th, 2021, 4:09 pm Glad you are enjoying the Gadgets!

It looks like from your code (I didn't try it yet) that you have figured out most of the important bits. The "C.w" and "C.h" values are the width and height of a "cell", which is where each of the days are drawn. So once you have the position of the cell (bumper+day or week offset), the center should be half of the C.w and C.h values. All good there.

I do know that sometimes scale factors that work out to fractions of pixels can be a problem, since Rainmeter just truncates the values. That is one of the handy things about TransformationMatrix, in that it works well even on fractional pixels by antialiasing. (This new Gadgets 7.0 calendar is a near-complete redo of the calendar skin, since it uses near-stock LuaCalendar 6.0 -- no TransformationMatrix code -- instead of a heavily modded version of 5.0 which made extensive use of TransformationMatrix.)

Give me a bit to experiment and think on this. We might need to resurrect TransformationMatrix for just the ellipse, but hopefully it won't come to that! Another possibility I can think of is to try using rounding on the formulas (Rainmeter truncates instead of rounds, if I understand it correctly, so this might be a source of any appearance issues).
I *think* I am using TransformationMatrix correctly. Integer scale factors are perfect, non-integers (1.2, 1.6, etc) have the ellipse too low. Is the Calendar code suffering from rounding/truncation errors? Again, I can live with it but I am really curious about the root cause.

Code: Select all

;DAS REPLACE TodayHL with this to get an ellipse around the date
[TodayHL]
Meter=Shape
;Shape=Ellipse ((#Bumper.x#+(0.5*#C.w#))+(#C.w#+#Space.x#)*#Week#),(#Bumper.top#+(0.5*#C.h#)+(#C.h#+#Space.y#)*(#ThisWeek#+1)),(2+(0.5*16)),(1+(0.5*16)) | Fill Color 0,0,0,0 | Strokewidth 2 | Stroke Color #ColorFontTitle#
Shape=Ellipse (12+(0.5*16)+(16+4)*#Week#),(6+(0.5*16)+(16+1)*(#ThisWeek#+1)),(2+(0.5*16)),(1+(0.5*16)) | Fill Color 0,0,0,0 | Strokewidth 2 | Stroke Color #ColorFontTitle#
TransformationMatrix=#scaler#;0;0;#scaler#;0;0
Antialias=1
Hidden=#NotCurrentMonth#
DynamicVariables=1
Doug
Last edited by SilverAzide on August 24th, 2021, 9:57 pm, edited 1 time in total.
Reason: Please use code tags when posting code. It's the </> button.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: Gadgets 7.0.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by SilverAzide »

djamman wrote: August 24th, 2021, 8:25 pm I *think* I am using TransformationMatrix correctly. Integer scale factors are perfect, non-integers (1.2, 1.6, etc) have the ellipse too low. Is the Calendar code suffering from rounding/truncation errors? Again, I can live with it but I am really curious about the root cause.

Doug
WOW, this got complicated, LOL... I think I got it to work perfectly at any scale factor, but it's a pretty hacky approach.

But first, to answer your TranformationMatrix question, you were very close. When you scale a meter, it will "push" the meter slightly out of position, so you need to offset it to get it back precisely into place. What you would need to use is something like
TransformationMatrix=#Scale#;0;0;#Scale#;([#CURRENTSECTION#:X]*(1-#Scale#));([#CURRENTSECTION#:Y]*(1-#Scale#)). If the entire skin was "transformation-matrixed", then you could get away with just using the same expression as the rest of the skin. In this case, you need really precise positioning. Unfortunately, as precise as you want to be, it still won't be good enough. Because the position of a "cell" is some value that is affected by rounding (and made worse by the fact the cells are being positioned using relative positioning instead of explicit X/Y values), there's nothing you can really do to make this approach work. Time for a hack...

What I did is create a measure to calculate which "cell" (meter) is the current day. Fortunately, the LuaCalendar author just named all the meters sequentially. Once I got the "today" meter number, I used a variant of your ellipse code to draw the circle using the exact coordinates of the "today" meter itself, so any "drift" caused by rounding is irrelevant.

Here's the code I used. First, add the following measure as the last measure in the <Style>Style.inc skin (i.e., GadgetsStyle.inc), just above the meter section of the code. This measure figures out which "mDayN" meter is "today" and then shows the highlight meter (if needed).

Code: Select all

[CalcMeter]
Measure=Calc
Formula=(#ThisWeek# - 1) * 7 + (#Week# + 1)
IfCondition=(#NotCurrentMonth# = 0) && (CalcMeter > 0) && ([mDay[&CalcMeter]:X] > 0)
IfTrueAction=[!ShowMeter TodayHL]
IfFalseAction=[!HideMeter TodayHL]
DynamicVariables=1
Finally, replace the [TodayHL] meter with the following:

Code: Select all

[mDay0]
Meter=String
Hidden=1

[TodayHL]
Meter=Shape
Shape=Ellipse ([mDay[&CalcMeter]:X]+(#C.w#/2)), ([mDay[&CalcMeter]:Y]+(#C.h#/2)),(1+#C.w#/2),(1+#C.h#/2) | Fill Color 0,0,0,0 | Strokewidth (Max(2,(1+#Scale#))) | Stroke Color #ColorFontTitle#
Hidden=1
DynamicVariables=1
The [mDay0] meter is a hidden dummy meter needed because when the skin first loads, the CalcMeter measure returns 0 until things get started up. I tweaked your stroke width code slightly to make the line width scale up with the rest of the skin so everything is proportional.

In the end, I got it so the circles are perfectly centered on the cell; however, because the fonts don't scale precisely, at some scale values the circle will appear slightly low by a pixel or two. It is actually the number that is high. The easiest way to see the "cells" is to add something like SolidColor=0,255,0,64 to the [TextStyle] style meter to make them show up.

Does this work OK for you?
Gadgets Wiki GitHub More Gadgets...
djamman
Posts: 10
Joined: January 3rd, 2020, 12:17 pm

Re: Gadgets 7.0.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by djamman »

SilverAzide wrote: August 24th, 2021, 10:53 pm WOW, this got complicated, LOL... I think I got it to work perfectly at any scale factor, but it's a pretty hacky approach.

But first, to answer your TranformationMatrix question, you were very close. When you scale a meter, it will "push" the meter slightly out of position, so you need to offset it to get it back precisely into place. What you would need to use is something like
TransformationMatrix=#Scale#;0;0;#Scale#;([#CURRENTSECTION#:X]*(1-#Scale#));([#CURRENTSECTION#:Y]*(1-#Scale#)). If the entire skin was "transformation-matrixed", then you could get away with just using the same expression as the rest of the skin. In this case, you need really precise positioning. Unfortunately, as precise as you want to be, it still won't be good enough. Because the position of a "cell" is some value that is affected by rounding (and made worse by the fact the cells are being positioned using relative positioning instead of explicit X/Y values), there's nothing you can really do to make this approach work. Time for a hack...

What I did is create a measure to calculate which "cell" (meter) is the current day. Fortunately, the LuaCalendar author just named all the meters sequentially. Once I got the "today" meter number, I used a variant of your ellipse code to draw the circle using the exact coordinates of the "today" meter itself, so any "drift" caused by rounding is irrelevant.

Here's the code I used. First, add the following measure as the last measure in the <Style>Style.inc skin (i.e., GadgetsStyle.inc), just above the meter section of the code. This measure figures out which "mDayN" meter is "today" and then shows the highlight meter (if needed).

Code: Select all

[CalcMeter]
Measure=Calc
Formula=(#ThisWeek# - 1) * 7 + (#Week# + 1)
IfCondition=(#NotCurrentMonth# = 0) && (CalcMeter > 0) && ([mDay[&CalcMeter]:X] > 0)
IfTrueAction=[!ShowMeter TodayHL]
IfFalseAction=[!HideMeter TodayHL]
DynamicVariables=1
Finally, replace the [TodayHL] meter with the following:

Code: Select all

[mDay0]
Meter=String
Hidden=1

[TodayHL]
Meter=Shape
Shape=Ellipse ([mDay[&CalcMeter]:X]+(#C.w#/2)), ([mDay[&CalcMeter]:Y]+(#C.h#/2)),(1+#C.w#/2),(1+#C.h#/2) | Fill Color 0,0,0,0 | Strokewidth (Max(2,#Scale#)) | Stroke Color #ColorFontTitle#
Hidden=1
DynamicVariables=1
The [mDay0] meter is a hidden dummy meter needed because when the skin first loads, the CalcMeter measure returns 0 until things get started up. I tweaked your stroke width code slightly to make the line width scale up with the rest of the skin so everything is proportional.

In the end, I got it so the circles are perfectly centered on the cell; however, because the fonts don't scale precisely, at some scale values the circle will appear slightly low by a pixel or two. It is actually the number that is high. The easiest way to see the "cells" is to add something like SolidColor=0,255,0,64 to the [TextStyle] style meter to make them show up.

Does this work OK for you?
Yes - thank you so very much. I really appreciate your responsiveness. You may (or may not) want to incorporate this into the original TodayHL, which underlines the day. The original TodayHL will cause the underline to drift lower each week of the month.

Doug