Browse Source

Ensure titlebar font is installed the first time the laf is applied

decorations
Jannis Weis 3 years ago
parent
commit
0ad6d04ffa
No known key found for this signature in database
GPG Key ID: 7C9D8D4B558049AB
  1. 4
      windows/src/main/java/com/github/weisj/darklaf/platform/windows/ui/WindowsTitlePane.java

4
windows/src/main/java/com/github/weisj/darklaf/platform/windows/ui/WindowsTitlePane.java

@ -110,6 +110,7 @@ public class WindowsTitlePane extends CustomTitlePane {
installSubcomponents(); installSubcomponents();
menuBarStealer.install(); menuBarStealer.install();
updateTitleBarVisibility(); updateTitleBarVisibility();
installDefaults();
setLayout(createLayout()); setLayout(createLayout());
} }
@ -253,7 +254,6 @@ public class WindowsTitlePane extends CustomTitlePane {
private void installSubcomponents() { private void installSubcomponents() {
titleLabel = new JLabel(); titleLabel = new JLabel();
titleLabel.setHorizontalAlignment(JLabel.LEFT); titleLabel.setHorizontalAlignment(JLabel.LEFT);
setTitleFont(getFont());
createIcons(); createIcons();
createActions(); createActions();
@ -314,7 +314,7 @@ public class WindowsTitlePane extends CustomTitlePane {
} }
private void installDefaults() { private void installDefaults() {
setFont(UIManager.getFont("InternalFrame.titleFont", getLocale())); setFont(UIManager.getFont("InternalFrame.titleFont"));
} }
@Override @Override

Loading…
Cancel
Save