Skip to content

Commit f204051

Browse files
hansonrhansonr
authored andcommitted
setting default HTML5LookAndFeel for JLabel to bold font. (Windows
default?) consider experimental only
1 parent 33ccd01 commit f204051

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

sources/net.sf.j2s.java.core/src/swingjs/plaf/HTML5LookAndFeel.java

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,7 @@ private void initResourceBundle(UIDefaults table) {
499499
}
500500

501501
static final Object dialogPlain12 = new FontUIResource(Font.DIALOG, Font.PLAIN, 12);
502+
static final Object dialogBold12 = new FontUIResource(Font.DIALOG, Font.BOLD, 12);
502503

503504
/**
504505
* Populates {@code table} with the defaults for the basic look and feel.
@@ -791,6 +792,27 @@ public Object createValue(UIDefaults table) {
791792
//
792793
// // *** Component Defaults
793794
//
795+
796+
797+
// from MetalTheme, which is the Windows default:
798+
//
799+
// static final int CONTROL_TEXT_FONT = 0;
800+
// static final int SYSTEM_TEXT_FONT = 1;
801+
// static final int USER_TEXT_FONT = 2;
802+
// static final int MENU_TEXT_FONT = 3;
803+
// static final int WINDOW_TITLE_FONT = 4;
804+
// static final int SUB_TEXT_FONT = 5;
805+
// private static final int[] fontStyles = {
806+
// Font.BOLD, Font.PLAIN, Font.PLAIN, Font.BOLD, Font.BOLD, Font.PLAIN
807+
// };
808+
// /**
809+
// * Sizes for the fonts.
810+
// */
811+
// private static final int[] fontSizes = {
812+
// 12, 12, 12, 12, 12, 10
813+
// };
814+
//
815+
794816
Object[] defaults = {
795817
"*.font",
796818
dialogPlain12,
@@ -1041,10 +1063,10 @@ public Object createValue(UIDefaults table) {
10411063
// }),
10421064

10431065
// *** Label
1044-
"Label.font", dialogPlain12,
1066+
"Label.font", dialogBold12,
10451067
"Label.background", control,
10461068
"Label.foreground", controlText,
1047-
// "Label.disabledForeground", white,
1069+
"Label.inactiveForeground", disabledTextColor,
10481070
// "Label.disabledShadow", controlShadow,
10491071
"Label.border",
10501072
null,

0 commit comments

Comments
 (0)