Ensure status is visible on default menu bar

This commit is contained in:
drdev
2013-09-07 17:16:20 +00:00
parent 9499207bae
commit d9eea5d5f0
2 changed files with 10 additions and 1 deletions

View File

@@ -53,7 +53,12 @@ public class FMenuBar extends JMenuBar {
add(Box.createHorizontalGlue()); // align right hack/patch. add(Box.createHorizontalGlue()); // align right hack/patch.
lblStatus = new JLabel(statusText); lblStatus = new JLabel(statusText);
JLabelSkin<JLabel> labelSkin = FSkin.get(lblStatus); JLabelSkin<JLabel> labelSkin = FSkin.get(lblStatus);
if (FSkin.isLookAndFeelSet()) {
labelSkin.setForeground(FSkin.getColor(FSkin.Colors.CLR_TEXT)); labelSkin.setForeground(FSkin.getColor(FSkin.Colors.CLR_TEXT));
}
else { //ensure status is visible on default menu bar
labelSkin.setForeground(getForeground());
}
lblStatus.setFont(FSkin.getItalicFont(11)); lblStatus.setFont(FSkin.getItalicFont(11));
lblStatus.setOpaque(false); lblStatus.setOpaque(false);
add(lblStatus); add(lblStatus);

View File

@@ -1833,6 +1833,10 @@ public enum FSkin {
italicFonts.put(size, FSkin.font.deriveFont(Font.ITALIC, size)); italicFonts.put(size, FSkin.font.deriveFont(Font.ITALIC, size));
} }
public static boolean isLookAndFeelSet() {
return ForgeLookAndFeel.isMetalLafSet;
}
/** /**
* Sets the look and feel of the GUI based on the selected Forge theme. * Sets the look and feel of the GUI based on the selected Forge theme.
* *