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!
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!