Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Commit

Permalink
Add detail to moon icon
Browse files Browse the repository at this point in the history
  • Loading branch information
raiguard committed Jun 8, 2019
1 parent bb67114 commit 3fddc3f
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 7 deletions.
3 changes: 3 additions & 0 deletions ModernGadgets-Desktop.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
},
{
"path": "D:\\Caleb\\Development\\Rainmeter\\Testbench\\Skins\\LuaCalendar"
},
{
"path": "D:\\Caleb\\Development\\Rainmeter\\Testbench\\Skins\\IconExtractor"
}
],
"settings": {
Expand Down
1 change: 1 addition & 0 deletions Skins/ModernGadgets/@Resources/Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,7 @@ v1.6.0-beta.7 - 2019-06-??
- Added tooltip visibility toggle to Clipboard Meter
- Added event countdown format help icon to Chronometer settings
- Added auto-update of external IP when WAN state changes
- Added more detail to Weather Meter's moon icon
- Redesigned Clipboard Meter interface
- Re-added separate average CPU usage color to CPU Meter
- Updated twitter and subreddit links
Expand Down
41 changes: 35 additions & 6 deletions Skins/ModernGadgets/Settings/UnitTests/WeatherShapes.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ AccurateText=1

[Variables]
; Moon phase value: 0.0 (new) -> 0.5 (full) -> 1.0 (new)
moonPhase=0.12
moonPhase=0.80
; Angle that the illuminated limb of the moon will be displayed at (starting at north, going clockwise)
moonViewAngle=131
; Set to 1 to use moonViewAngle, 0 to display horizontally
showMoonAngle=1
; Internal moon variables
moonRadius=60
moonRadius=40
moonBorderThickness=4
moonInnerRadius=(#moonRadius# - #moonBorderThickness#)
; Colors
Expand All @@ -31,6 +31,10 @@ Shape=Ellipse #moonRadius#,#moonRadius#,#moonRadius#,#moonRadius# | StrokeWidth
Shape2=Ellipse #moonRadius#,#moonRadius#,#moonInnerRadius#,#moonInnerRadius# | StrokeWidth 0 | Fill Color #colorMoonBg#
Shape3=Path MoonArc | StrokeWidth 0 | Fill Color #colorMoon# | Rotate ((#showMoonAngle# = 1) ? (-#moonViewAngle#) : ((#moonPhase# > 0.5) ? -90 : 90)),#moonInnerRadius#,#moonInnerRadius# | Offset #moonBorderThickness#,#moonBorderThickness# | StrokeLineJoin Round
MoonArc=0,#moonInnerRadius# | ArcTo (#moonInnerRadius# * 2),#moonInnerRadius#,#moonInnerRadius#,[MeasureMoonShapePhaseCalc:],0,(((#moonPhase# > 0.25) && (#moonPhase# < 0.75)) ? 1 : 0) | ArcTo 0,#moonInnerRadius#,#moonInnerRadius#,#moonInnerRadius#,0,1
Shape4=Ellipse 22,24,4,2.5 | StrokeWidth 0 | Rotate -30 | Fill Color #colorMoonBorder#,150
Shape5=Ellipse 40.5,16.5,9,6 | StrokeWidth 0 | Rotate 6
Shape6=Ellipse 58.5,21,7,4.5 | StrokeWidth 0 | Rotate 33
Shape7=Combine Shape4 | XOR Shape5 | XOR Shape6 | Scale (#moonRadius# / 40),(#moonRadius# / 40),0,0 | Rotate (-(#moonViewAngle# + (#moonPhase# > 0.5 ? 0 : PI))),#moonRadius#,#moonRadius# | TransformOrder Scale,Rotate
Padding=10,10,10,10
SolidColor=#colorBg#
DynamicVariables=1
Expand All @@ -40,7 +44,32 @@ LeftMouseUpAction=[!CommandMeasure MeasureMoonShapeActionTimer "Execute 1"]
[MeasureMoonShapeActionTimer]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat Increase, 16, 100 | Wait 1000 | Repeat Increase, 16, 100 | Reset
Increase=[!SetVariable moonPhase "(#moonPhase# + 0.005)"][!UpdateMeasure MeasureMoonShapePhaseCalc][!UpdateMeter MeterMoonShape][!UpdateMeasure MeasureMoonShapeActionTimer][!Redraw]
Reset=[!SetVariable moonPhase 0][!UpdateMeasure MeasureMoonShapePhaseCalc][!UpdateMeter MeterMoonShape][!UpdateMeasure MeasureMoonShapeActionTimer][!Redraw]
DynamicVariables=1
ActionList1=Repeat Increase, 16, 360
Increase=[!SetVariable moonViewAngle "(#moonViewAngle# + 1)"][!UpdateMeasure MeasureMoonShapePhaseCalc][!UpdateMeter MeterMoonShape][!UpdateMeasure MeasureMoonShapeActionTimer][!Redraw]
DynamicVariables=1

; [Rainmeter]
; MiddleMouseUpAction=[!Refresh]
; AccurateText=1

; [Variables]
; iconScale=1

; [StyleIcon]
; Shape=Path Path1 | StrokeWidth 0 | Fill Color 240,240,240 | Scale #iconScale#,#iconScale#,0,-128
; Shape2=Path Path2 | StrokeWidth 0 | Fill Color 200,220,250 | Scale #iconScale#,#iconScale#,-315,0
; Shape3=Path Path3 | StrokeWidth 0 | Fill Color 70,210,255 | Scale #iconScale#,#iconScale#,-304,-416
; Shape4=Path Path4 | StrokeWidth 0 | Fill Color 70,210,255 | Scale #iconScale#,#iconScale#,-208,-416
; Shape5=Path Path5 | StrokeWidth 0 | Fill Color 70,210,255 | Scale #iconScale#,#iconScale#,-112,-416
; Shape6=Path Path6 | StrokeWidth 0 | Fill Color 70,210,255 | Scale #iconScale#,#iconScale#,-16,-416
; Path1=350.5, 225.5 | CurveTo 272, 160, 343.6, 188.3, 311.2, 160 | CurveTo 237.7, 168, 259.7, 160, 248.1, 163 | CurveTo 160, 128, 220.3, 143.9, 192.1, 128 | CurveTo 64, 224, 107, 128, 64, 171 | CurveTo 64.2, 225.6, 64, 224.5, 64.2, 225.1 | CurveTo 0, 304, 27.6, 232.9, 0, 265.2 | CurveTo 80, 384, 0, 348.2, 35.8, 384 | LineTo 336, 384 | CurveTo 416, 304, 380.2, 384, 416, 348.2 | CurveTo 350.5, 225.5, 416, 264.8, 387.8, 232.3 | ClosePath 1
; Path2=567.9, 223.8 | CurveTo 432.9, 113, 497.5, 237.1, 432.9, 183.5 | CurveTo 490.4, 14.9, 432.9, 72.4, 454.8, 35 | CurveTo 488.3, 2.4, 495.9, 11.8, 494.5, 3.5 | CurveTo 461.8, 0, 479.6, 0.8, 470.7, 0 | CurveTo 317.4, 137.9, 383.9, 0, 320.7, 61.2 | CurveTo 376.3, 199.6, 344.1, 149.8, 365.6, 171.7 | CurveTo 446.5, 286.4, 413.4, 213.9, 440.3, 247 | CurveTo 461.7, 287.9, 451.6, 286.9, 456.5, 287.9 | CurveTo 574.3, 234.6, 506.4, 287.9, 547.3, 267.7 | CurveTo 567.9, 223.8, 578.5, 229.8, 574.1, 222.6 | ClosePath 1
; Path3=364.5, 418.1 | CurveTo 342.7, 424.1, 356.9, 413.8, 347.1, 416.3 | LineTo 306.1, 488.1 | CurveTo 312.1, 509.9, 301.7, 495.8, 304.4, 505.5 | CurveTo 320, 512, 314.6, 511.3, 317.3, 512 | CurveTo 333.9, 503.9, 325.5, 512, 330.9, 509.1 | LineTo 370.5, 439.9 | CurveTo 364.5, 418.1, 374.8, 432.2, 372.2, 422.5 | ClosePath 1
; Path4=268.5, 418.1 | CurveTo 246.7, 424.1, 260.9, 413.8, 251.1, 416.3 | LineTo 210.1, 488.1 | CurveTo 216.1, 509.9, 205.7, 495.8, 208.4, 505.5 | CurveTo 224, 512, 218.6, 511.3, 221.3, 512 | CurveTo 237.9, 503.9, 229.5, 512, 234.9, 509.1 | LineTo 274.5, 439.9 | CurveTo 268.5, 418.1, 278.8, 432.2, 276.2, 422.5 | ClosePath 1
; Path5=172.5, 418.1 | CurveTo 150.7, 424.1, 164.9, 413.8, 155.1, 416.3 | LineTo 114.1, 488.1 | CurveTo 120.1, 509.9, 109.7, 495.8, 112.4, 505.5 | CurveTo 128, 512, 122.6, 511.3, 125.3, 512 | CurveTo 141.9, 503.9, 133.5, 512, 138.9, 509.1 | LineTo 178.5, 439.9 | CurveTo 172.5, 418.1, 182.8, 432.2, 180.2, 422.5 | ClosePath 1
; Path6=76.5, 418.1 | CurveTo 54.7, 424.1, 68.9, 413.8, 59.1, 416.3 | LineTo 18.1, 488.1 | CurveTo 24.1, 509.9, 13.7, 495.8, 16.4, 505.5 | CurveTo 32, 512, 26.6, 511.3, 29.3, 512 | CurveTo 45.9, 503.9, 37.5, 512, 42.9, 509.1 | LineTo 82.5, 439.9 | CurveTo 76.5, 418.1, 86.8, 432.2, 84.2, 422.5 | ClosePath 1
; SolidColor=24,32,43

; [MeterIcon]
; Meter=Shape
; MeterStyle=StyleIcon
6 changes: 5 additions & 1 deletion Skins/ModernGadgets/WeatherMeter/WeatherMeter.ini
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ DynamicVariables=1
[MeasureWeatherParent]
Measure=WebParser
; URL=file://#CURRENTPATH#WeatherDebug.xml
URL=http://wxdata.weather.com/wxdata/weather/local/#locationCode#?cc=*&unit=#unitOfMeasure#&dayf=0&locale=#locale#
URL=http://wxdata.weather.com/wxdata/weather/local/#locationCode#?cc=*&unit=#unitOfMeasure#&dayf=1&locale=#locale#
UpdateRate=(#weatherUpdateRate# * 60)
RegExp=(?siU)^(.*)$
FinishAction=[!EnableMeasureGroup Weather][!UpdateMeasureGroup Weather][!UpdateMeterGroup Weather][!UpdateMeterGroup Background][!Redraw]
Expand Down Expand Up @@ -859,6 +859,10 @@ Shape=Ellipse #moonRadius#,#moonRadius#,#moonRadius#,#moonRadius# | StrokeWidth
Shape2=Ellipse #moonRadius#,#moonRadius#,#moonInnerRadius#,#moonInnerRadius# | StrokeWidth 0 | Fill Color #colorMoonBg#
Shape3=Path MoonArc | StrokeWidth 0 | Fill Color #colorMoon# | Rotate ((#showMoonAngle# = 1) ? (-deg([&MeasureSunCalcScript:GetData('moonIllumination', 'angle')] - [&MeasureSunCalcScript:GetData('moonPosition', 'parallacticAngle')])) : (([&MeasureSunCalcScript:GetData('moonIllumination', 'phase')] > 0.5) ? -90 : 90)),#moonInnerRadius#,#moonInnerRadius# | Offset #moonBorderThickness#,#moonBorderThickness# | StrokeLineJoin Round
MoonArc=0,#moonInnerRadius# | ArcTo (#moonInnerRadius# * 2),#moonInnerRadius#,#moonInnerRadius#,[MeasureMoonShapePhaseCalc:],0,((([&MeasureSunCalcScript:GetData('moonIllumination', 'phase')] > 0.25) && ([&MeasureSunCalcScript:GetData('moonIllumination', 'phase')] < 0.75)) ? 1 : 0) | ArcTo 0,#moonInnerRadius#,#moonInnerRadius#,#moonInnerRadius#,0,1
Shape4=Ellipse 22,24,4,2.5 | StrokeWidth 0 | Rotate -30 | Fill Color #colorMoonBorder#,100
Shape5=Ellipse 40.5,16.5,9,6 | StrokeWidth 0 | Rotate 6
Shape6=Ellipse 58.5,21,7,4.5 | StrokeWidth 0 | Rotate 33
Shape7=Combine Shape4 | XOR Shape5 | XOR Shape6 | Scale (#moonRadius# / 40),(#moonRadius# / 40),0,0 | Rotate (-deg([&MeasureSunCalcScript:GetData('moonIllumination', 'angle')] - [&MeasureSunCalcScript:GetData('moonPosition', 'parallacticAngle')] + ([&MeasureSunCalcScript:GetData('moonIllumination', 'phase')] > 0.5 ? 0 : PI))),#moonRadius#,#moonRadius# | TransformOrder Scale,Rotate
X=(#contentMarginRight# - (#moonRadius# * 2) - 8)
Y=((#showSunMoonInfo# = 1) ? 8 : 0)R
DynamicVariables=1
Expand Down

0 comments on commit 3fddc3f

Please sign in to comment.