It is currently April 16th, 2024, 9:23 am

Clock skin bug?

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Clock skin bug?

Post by jsmorley »

Yincognito wrote: March 13th, 2020, 3:12 pm The "moving" text due to the meter's variable size when the alignment is CenterCenter could be solved by using Left alignment. Other than that, appently my video card has no issues with either disabled or enabled hardware acceleration. Some changes occured, but not the artefacts in the OP's screenshot.
There is more to this than the "position" or even the "size" of the string. A "W" just paints different pixels than an "A" does. I really think SolidColor is the most reliable solution to this. Then ALL the pixels are always redrawn.
User avatar
Yincognito
Rainmeter Sage
Posts: 7118
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Clock skin bug?

Post by Yincognito »

jsmorley wrote: March 13th, 2020, 3:15 pm There is more to this than the "position" or even the "size" of the string. A "W" just paints different pixels than an "A" does. I really think SolidColor is the most reliable solution to this. Then ALL the pixels are always redrawn.
True that.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16141
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Clock skin bug?

Post by balala »

jsmorley wrote: March 13th, 2020, 3:15 pm There is more to this than the "position" or even the "size" of the string. A "W" just paints different pixels than an "A" does. I really think SolidColor is the most reliable solution to this. Then ALL the pixels are always redrawn.
Probably a good workaround, especially that using a transparency of 1 (from 255), the background still remains practically transparent (as described).

But still waiting for FNTONN, to let us know if we had right and the hardware acceleration fixed the issue. Did it FNTONN?
User avatar
Yincognito
Rainmeter Sage
Posts: 7118
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Clock skin bug?

Post by Yincognito »

In the meantime, you might want to check if this works (you can try the Hardware Accelleration workaround that has been posted as well, as this already uses an "almost" transparent background, like jsmorley and balala recommended). Make a backup of your original Clock.ini, and replace the code with this:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
BackgroundMode=2
SolidColor=47,47,47,1

[Metadata]
Name= Simple Clock
Author=StarLender
Information= A rainmeter skin of digital clock ,date,weather.
Version=v1.0
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0

[Variables]
Color=255,255,255,255
Font=Google Sans
;open google maps and search for your location's coordinates
LatLon=22.605689,88.414835
;your language, units will be set accordingly
Language=en-GB

[MeasureTime]
Measure=Time
Format=%H:%M

[MeasureDate]
Measure=Time
Format=%a, %b %d
FormatLocale=Local

[MeasureWeather]
Measure=WebParser
Url=https://weather.com/#Language#/weather/today/l/#LatLon#
RegExp="(?siU).*"vt1observation":\{.*,"icon":(.*),.*,"temperature":(.*),.*\}.*"unitOfMeasurement":\{.*,"temp":(.*),.*\}.*"
UpdateRate=300

[MeasureWeatherCurrentIcon]
Measure=WebParser
URL=[MeasureWeather]
StringIndex=1
RegExpSubstitute=1
Substitute='(?:^"|"$)':"","(?:^$|^null$)":"3200"

[MeasureWeatherCurrentTemp] 
Measure=WebParser
URL=[MeasureWeather]
StringIndex=2
RegExpSubstitute=1
Substitute='(?:^"|"$)':"","(?:^$|^null$)":"---"

[MeasureWeatherCurrentUnits]
Measure=WebParser
URL=[MeasureWeather]
StringIndex=3
RegExpSubstitute=1
Substitute='(?:^"|"$)':"","(?:^$|^null$)":"C"

[Clock]
Meter=String
MeasureName=MeasureTime
X=100
Y=0
W=200
FontSize=50
FontFace=#Font#
AntiAlias=1
FontColor=#Color#
ClipString=1
StringAlign=Center
Text="%1"

[DateWeather]
Meter=String
MeasureName=MeasureDate
MeasureName2=MeasureWeatherCurrentTemp
MeasureName3=MeasureWeatherCurrentUnits
X=0r
Y=0R
FontSize=13
FontFace=#Font#
AntiAlias=1
FontColor=#Color#
Text=%1           %2 °%3
StringAlign=Center

[WeatherCurrentIcon]
Meter=Image
MeasureName=MeasureWeatherCurrentIcon
ImageName=#@#WeatherIcons\%1.png
X=16r
Y=2r
W=18
H=18
Of course, you should set your latitude and longitude, as well as the language (that controls the units) according to your location. This gets the data from weather.com instead of darksky.net, in case that was also an issue you wanted "fixed". It's up to you to adapt Clock_bigsize.ini to resemble this, if you deem it necessary.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
FNTONN
Posts: 3
Joined: March 13th, 2020, 1:46 pm

Re: Clock skin bug?

Post by FNTONN »

Thank you everyone who replied! I figured out I had hardware acceleration turned on and now it changes the time smoothly now! As for the temperature as some of you have mentioned, I never really had a problem with that because I haven't bothered making an account to set it up. I might though.

Thanks again.
User avatar
balala
Rainmeter Sage
Posts: 16141
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Clock skin bug?

Post by balala »

FNTONN wrote: March 13th, 2020, 4:49 pm As for the temperature as some of you have mentioned, I never really had a problem with that because I haven't bothered making an account to set it up.
No, you don't have to. There is no need for any kind of account. In fact,
WebParser cannot use cookies or other session-based authentication, so it cannot be used to retrieve information from web sites requiring a login.
Source.
As you could see in Yincognito's post above, you can retrieve the weather information based on geographical coordinates or based on the weather code of you location.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Clock skin bug?

Post by jsmorley »

balala wrote: March 13th, 2020, 5:04 pm No, you don't have to. There is no need for any kind of account. In fact,

Source.
As you could see in Yincognito's post above, you can retrieve the weather information based on geographical coordinates or based on the weather code of you location.
The skin as originally written uses the Dark Sky API, which while it requires a free "key" to use, doesn't require any login by WebParser. While I would certainly recommend changing it to use the JSON portion of the weather.com website instead, there is nothing particularly wrong with using Dark Sky.
User avatar
balala
Rainmeter Sage
Posts: 16141
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Clock skin bug?

Post by balala »

jsmorley wrote: March 13th, 2020, 5:16 pm The skin as originally written uses the Dark Sky API, which while it requires a free "key" to use, doesn't require any login by WebParser. While I would certainly recommend changing it to use the JSON portion of the weather.com website instead, there is nothing particularly wrong with using Dark Sky.
But do you know what skin FNTONN does use? Because as far as I can tell, this was not established precisely. At least the initial post, has a link to the Time and Date Rainmeter skins (https://www.deviantart.com/rainmeter/gallery/45661668/time-and-date).

EDIT: Sorry, just discovered that Yincognito has posted a link a little bit later. Sorry for my negligence...