Synth Look and Feel button size problem

H

hogcia

Hello,

I am writing a Synth skin, and there seems to be a problem with button
sizes after loading the skin.
Namely, some of the buttons are too narrow. The others are fine.

I don't know why this is happening. How does Synth calculate button
sizes?

Of course, I know about insets, but, I'd have to change them for all
the buttons - making some too big (applying insets by name is out of
question, as is setting problematic buttons sizes in properties - the
program will be developed by many people, so it would be hard to
control it when done manually).

This is the buttons Synth code:

<style id="button">
<!-- set size of buttons -->
<insets top="15" left="20" bottom="15" right="20"/>
<font name="Dialog" size="12"/>
<state>
<imagePainter method="buttonBackground" path="images/buton.png"
sourceInsets="15 20 15 20" stretch="true" />

<color type="TEXT_FOREGROUND" value="#FFFFFF"/>
</state>

<state value="PRESSED">
<imagePainter method="buttonBackground"
path="images/buton.png"
sourceInsets="15 20 15 20" stretch="true" />
</state>

<state value="MOUSE_OVER">
<imagePainter method="buttonBackground"
path="images/buton.png"
sourceInsets="15 20 15 20" stretch="true" />
</state>
</style>
<bind style="button" type="region" key="Button"/>

Thanks for all the answers!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top