To change the SFSymbol size in @mzeryck’s addition to @egamez’s weather widget, this works for me:
I turned this line:
return SFSymbol.named(symbols[conditionDigit]()).image
…into this:
let sfs = SFSymbol.named(symbols[conditionDigit]())
sfs.applyFont(Font.systemFont(25))
return sfs.image
… where ‘25’ defines the size. Then in this line:
drawImage(symbolForCondition(condition,condDate), spaceBetweenDays * i + 40, 165 - (50*delta));
…I changed ‘40, 165’ to ‘34, 162’ to align them back to the line.
Edit: If you merged SFSymbols into other code than the one in post #217, this won’t work. You’ll have to tweak sizes and position according to given Widget parameters.
__
To make the accent-Color line appear at sunrise-time after sunset as well, I changed this line:
if(i < hoursToShow)
drawLine(spaceBetweenDays * (i) + 50, 175 - (50 * delta),spaceBetweenDays * (i+1) + 50 , 175 - (50 * nextDelta), 4, (hourData.dt > weatherData.current.sunset?Color.gray():accentColor))
…into this:
Edit: Yeah, still buggy. After sunset, the next sunrise still won’t show until midnight because the code always looks at todays sunrise. Tweaking on…
if (i < hoursToShow)
if (hourData.dt > weatherData.current.sunset)
drawLine(spaceBetweenDays * (i) + 50, 175 - (50 * delta),spaceBetweenDays * (i+1) + 50 , 175 - (50 * nextDelta), 3, (hourData.dt > weatherData.current.sunset? Color.darkGray():accentColor))
else drawLine(spaceBetweenDays * (i) + 50, 175 - (50 * delta),spaceBetweenDays * (i+1) + 50 , 175 - (50 * nextDelta), 3, (hourData.dt < weatherData.current.sunrise? Color.darkGray():accentColor))
Edit: Added line breaks.