|
From: Harry E. <har...@us...> - 2006-11-03 00:38:35
|
Update of /cvsroot/synclast/client/src/com/synclast/ui In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28014 Modified Files: Button.java Log Message: Fixed the validate on button when it only has an image, so that it will not shrink below the image bounds. If it has text, regardless of background image status, it will always size to the text. Damn Neil, what more you want from me? Index: Button.java =================================================================== RCS file: /cvsroot/synclast/client/src/com/synclast/ui/Button.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Button.java 20 Sep 2006 12:19:52 -0000 1.14 --- Button.java 3 Nov 2006 00:38:26 -0000 1.15 *************** *** 98,100 **** --- 98,111 ---- return "button"; } + + /** + * If we have a background image, and no text, size to the size of the image, else size to the size of the text. This means that if you have a background Image and text, it will size to the text, not the image. C'est la vie. + */ + protected void validate() { + if(backgroundImage != null && text.length() == 0) { + invalid = false; + } else { + super.validate(); + } + } } |