SwingX: update fonts in JXHeader, JXMonthView, JXTaskPane and JXTitledPanel when changing default font

This commit is contained in:
Karl Tauber
2022-12-01 12:51:19 +01:00
parent 04f1f5921d
commit 9fef2f9d05
3 changed files with 15 additions and 4 deletions

View File

@@ -35,6 +35,8 @@ FlatLaf Change Log
- Fixed missing tree lines (if enabled) for wide-selected rows. (issue #598)
- Fixed scaling of tree lines and fixed alignment to expand/collapse arrows.
- Removed support for dashed tree lines. `Tree.lineTypeDashed` is now ignored.
- SwingX: Fonts in `JXHeader`, `JXMonthView`, `JXTaskPane` and `JXTitledPanel`
were not updated when changing default font.
## 2.6

View File

@@ -18,7 +18,6 @@ package com.formdev.flatlaf.swingx.ui;
import static com.formdev.flatlaf.util.UIScale.scale;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.Insets;
import java.awt.geom.Rectangle2D;
@@ -53,9 +52,6 @@ public class FlatTitledPanelUI
installProperty( titledPanel, "titlePainter", new PainterUIResource<>(
new TitlePainter( UIManager.getColor( "JXTitledPanel.titleBackground" ),
UIManager.getColor( "JXTitledPanel.borderColor" ) ) ) );
// make title bold
installProperty( titledPanel, "titleFont", UIManager.getFont( "JXTitledPanel.titleFont" ).deriveFont( Font.BOLD ) );
}
@Override

View File

@@ -35,11 +35,23 @@ ColumnControlButton.actionIcon = com.formdev.flatlaf.swingx.icons.FlatColumnCont
JXDatePicker.border = com.formdev.flatlaf.swingx.ui.FlatDatePickerBorder
#---- Header ----
JXHeader.titleFont = +bold
JXHeader.descriptionFont = +0
#---- MonthView ----
JXMonthView.monthDownFileName = {icon}com.formdev.flatlaf.swingx.ui.FlatMonthDownIcon
JXMonthView.monthUpFileName = {icon}com.formdev.flatlaf.swingx.ui.FlatMonthUpIcon
JXMonthView.todayColor = @foreground
JXMonthView.font = +0
#---- TaskPane ----
TaskPane.font = +bold
#---- TitledPanel ----
@@ -48,6 +60,7 @@ JXTitledPanel.borderColor = $Button.borderColor
JXTitledPanel.titleBackground = $TaskPane.titleBackgroundGradientStart
JXTitledPanel.titleForeground = $TaskPane.titleForeground
JXTitledPanel.captionInsets = 4,10,4,10
JXTitledPanel.titleFont = +bold
#---- SearchField ----