Author: rwhitcomb Date: Thu Jan 14 05:40:34 2021 New Revision: 1885468 URL: http://svn.apache.org/viewvc?rev=1885468&view=rev Log: PIVOT-1051: Correction to font code in Theme.
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Theme.java Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Theme.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Theme.java?rev=1885468&r1=1885467&r2=1885468&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/Theme.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Theme.java Thu Jan 14 05:40:34 2021 @@ -81,6 +81,9 @@ public abstract class Theme { /** Key for the font italic style in a font dictionary. */ public static final String ITALIC_KEY = "italic"; + /** Default point size for the theme font. */ + private static final int DEFAULT_POINT_SIZE = 12; + /** * The service provider name (see {@link Service#getProvider(String)}). */ @@ -314,7 +317,7 @@ public abstract class Theme { name = (String) dictionary.get(NAME_KEY); } - int size = (font != null) ? font.getSize() : 12; + int size = (font != null) ? font.getSize() : DEFAULT_POINT_SIZE; if (dictionary.containsKey(SIZE_KEY)) { size = FontUtilities.decodeFontSize(dictionary.get(SIZE_KEY), size); }