HanSolo / medusa

A JavaFX library for Gauges
Apache License 2.0
687 stars 129 forks source link

Method for reset skintype to default. #178

Open milosic5 opened 4 years ago

milosic5 commented 4 years ago

Hi there,

if I set DASHBOARD SKIN for example and then change skin to PLAIN_AMP everything is ok,but when I change again to DASHBOARD it holds white background from previous skin. This is just for example it is also problem with other skin parameters, not just background.

Is there any method for reset skin parameters to default or to clear parameters which previous skin was set?

Thank you in advance.

Sincerely Milos

dashboard_skin

plain_amp

dashboard_skin_after_plain_amp_skin

HanSolo commented 4 years ago

Hmm...not really thought about changing skins at runtime but I already have a method to reset the default skin parameters. Will implement something to fix that issue, thx for the hint 👍🏻

milosic5 commented 4 years ago

Ok, is that reset method (method name?) already in Medusa 11.2 or it would be committed?

HanSolo commented 4 years ago

Nope not yet, it will be in 11.3

HanSolo commented 4 years ago

The last commit contains a new public method on the Gauge class which is called reInit(). This method will reset the ui parameters. It will automatically be called when you switch the skin by calling setSkinType(). You could also call this method manually before you set another skin.

milosic5 commented 4 years ago

On Maven repository is still 11.2 and I can't see changes in Gauge class.

HanSolo commented 4 years ago

yep...I did not create a new release yet, so the changes are only in the repo and not on maven central

milosic5 commented 4 years ago

Ok, are you planned to increase version soon?

HanSolo commented 4 years ago

I usually wait before I create a new release to not create a release for every issue

milosic5 commented 4 years ago

I understand, so anyway thank you for this commit and we will cooperate in the future for some improvement on your application.