Giter Site home page Giter Site logo

LcdClockSkin width incorrect about medusa HOT 5 CLOSED

hansolo avatar hansolo commented on August 21, 2024
LcdClockSkin width incorrect

from medusa.

Comments (5)

HanSolo avatar HanSolo commented on August 21, 2024 1

Nope, for the LCD gauge skin you will need: 0.45454545

from medusa.

HanSolo avatar HanSolo commented on August 21, 2024

Well the problem is keeping the aspect ratio of the clock leads to exactly this effect. At the moment I don't have a good solution to overcome this problem but you could set the maxWidth of the clock by using the following formular which should at least help you here:
clock.setMaxWidth(HEIGHT / 0.52631579)
HEIGHT is your max height (50 in your example)

from medusa.

wimdeblauwe avatar wimdeblauwe commented on August 21, 2024

Thanks for the workaround for now. I just tried it and it works.

One thing to look out for: I noticed when I added padding at the bottom and the top, I have to subtract that from the height to make it work.

So without padding, I did .maxWidth( 50 / 0.52631579) and it was nicely right aligned. With the padding, I need to do:

.maxWidth(40 / 0.52631579)
.padding(new Insets(5, 0, 5, 0))

to keep the clock on the right edge. (With the 40 being the original height of 50 minus 2 times 5 pixels padding).

from medusa.

wimdeblauwe avatar wimdeblauwe commented on August 21, 2024

One more question @HanSolo : Is the number I need to use the same for the lcd gauge?

from medusa.

HanSolo avatar HanSolo commented on August 21, 2024

Just don't have the time at the moment to take a closer look which is the reason for not fixing it...So it's not forgotten.

from medusa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.