Update of /cvsroot/arianne/stendhal/src/games/stendhal/client/gui/progress
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv1327/src/games/stendhal/client/gui/progress
Modified Files:
ProgressLog.java
Log Message:
Obey font size changes
Index: ProgressLog.java
===================================================================
RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/client/gui/progress/ProgressLog.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** ProgressLog.java 1 Dec 2012 08:09:05 -0000 1.24
--- ProgressLog.java 2 Dec 2012 21:57:22 -0000 1.25
***************
*** 22,25 ****
--- 22,26 ----
import java.awt.Component;
import java.awt.Dimension;
+ import java.awt.Font;
import java.awt.Graphics;
import java.awt.event.ActionEvent;
***************
*** 282,285 ****
--- 283,293 ----
update();
}
+
+ @Override
+ public void setFont(Font font) {
+ super.setFont(font);
+ // The font itself is not used, but the size is
+ update();
+ }
/**
***************
*** 326,330 ****
--- 334,340 ----
*/
private String createStyleDefinition() {
+ int fontSize = getFont().getSize() + 2;
return "<style type=\"text/css\">body {font-family:" + fontName
+ + "; font-size:" + fontSize
+ "; margin:12px} p {margin:4px 0px} a {color:#a00000} li, ul {margin-left:10px}</style>";
}
|