Friday, November 18, 2016

Medusa Industrial Clock Skin

And another one...
Yesterday I was in Stuttgart and on my way back one of my train connections was canceled. This gave me another hour of coding in the Starbucks at the Cologne train station. I mean coffee and code...what could be more productive ;)
So I was searching the picture app on my mac and stumbled upon a clock that I would like to implement for a long time, to be honest it have been two clocks but take a look yourself, here they are...



As you can see it is the same watch face just in two different colors. This clock looks similar to one of the Apple Watch watch faces and so I decided to create a new clock skin for Medusa.
Here is my implementation in Medusa...



The only thing that's missing is the glossy overlay but that can be added later by yourself. The new skin is named IndustrialClockSkin and will be available in the upcoming release 6.3 of Medusa.

To create the dark version of the clock you need to create it like follows...

clock = ClockBuilder.create()
                    .skinType(ClockSkinType.INDUSTRIAL)
                    .prefSize(400, 400)
                    .locale(Locale.GERMANY)
                    .shadowsEnabled(true)                    
                    .running(true)
                    .backgroundPaint(Color.web("#1f1e23"))
                    .hourColor(Color.web("#dad9db"))
                    .minuteColor(Color.web("#dad9db"))
                    .secondColor(Color.web("#d1222b"))
                    .hourTickMarkColor(Color.web("#9f9fa1"))
                    .minuteTickMarkColor(Color.web("#9f9fa1"))
                    .build();

For those of you that would like to use before...just grab the code from github...

That's it for today, enjoy the upcoming weekend and...keep coding ;)

No comments:

Post a Comment