mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 14:00:55 +03:00
JIDE: made used fonts "active" and restored fonts modified in LookAndFeelFactory.installJideExtension()
This commit is contained in:
@@ -473,7 +473,7 @@ public abstract class FlatLaf
|
||||
// use active value for all fonts to allow changing fonts in all components
|
||||
// (similar as in Nimbus L&F) with:
|
||||
// UIManager.put( "defaultFont", myFont );
|
||||
Object activeFont = new ActiveFont( 1 );
|
||||
Object activeFont = new ActiveFont( 1 );
|
||||
|
||||
// override fonts
|
||||
for( Object key : defaults.keySet() ) {
|
||||
@@ -496,6 +496,10 @@ public abstract class FlatLaf
|
||||
return (font instanceof FontUIResource) ? (FontUIResource) font : new FontUIResource( font );
|
||||
}
|
||||
|
||||
public static ActiveValue createActiveFontValue( float scaleFactor ) {
|
||||
return new ActiveFont( scaleFactor );
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the default color palette for action icons and object icons to the given UIDefaults.
|
||||
* <p>
|
||||
|
||||
@@ -21,6 +21,7 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import javax.swing.LookAndFeel;
|
||||
import javax.swing.UIDefaults;
|
||||
import javax.swing.UIDefaults.ActiveValue;
|
||||
import com.formdev.flatlaf.FlatDefaultsAddon;
|
||||
import com.formdev.flatlaf.FlatLaf;
|
||||
import com.formdev.flatlaf.jideoss.ui.FlatJidePainter;
|
||||
@@ -103,6 +104,19 @@ public class FlatJideOssDefaultsAddon
|
||||
// painter
|
||||
UIDefaultsLookup.put( defaults, "Theme.painter", FlatJidePainter.getInstance() );
|
||||
|
||||
// fonts
|
||||
ActiveValue font = FlatLaf.createActiveFontValue( 1f );
|
||||
defaults.put( "JideButton.font", font );
|
||||
defaults.put( "JideLabel.font", font );
|
||||
defaults.put( "JideSplitButton.font", font );
|
||||
defaults.put( "JideTabbedPane.font", font );
|
||||
defaults.put( "JideTabbedPane.selectedTabFont", font );
|
||||
|
||||
// reset standard fonts modified by LookAndFeelFactory.installJideExtension()
|
||||
defaults.put( "FormattedTextField.font", font );
|
||||
defaults.put( "Spinner.font", font );
|
||||
defaults.put( "TextArea.font", font );
|
||||
|
||||
// TristateCheckBox
|
||||
defaults.put( "TristateCheckBox.icon", null );
|
||||
}
|
||||
|
||||
@@ -39,12 +39,6 @@
|
||||
+ FolderChooserUI com.jidesoft.plaf.basic.BasicFolderChooserUI
|
||||
|
||||
|
||||
#---- FormattedTextField ----
|
||||
|
||||
- FormattedTextField.font [active] $defaultFont [UI]
|
||||
+ FormattedTextField.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||
|
||||
|
||||
#---- Gripper ----
|
||||
|
||||
+ Gripper.foreground [active] #b2b2b2 javax.swing.plaf.ColorUIResource [UI]
|
||||
@@ -66,7 +60,7 @@
|
||||
|
||||
#---- JideButton ----
|
||||
|
||||
+ JideButton.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||
+ JideButton.font [active] $defaultFont [UI]
|
||||
+ JideButton.textShiftOffset 0
|
||||
|
||||
|
||||
@@ -77,7 +71,7 @@
|
||||
|
||||
#---- JideLabel ----
|
||||
|
||||
+ JideLabel.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||
+ JideLabel.font [active] $defaultFont [UI]
|
||||
|
||||
|
||||
#---- JidePopup ----
|
||||
@@ -94,7 +88,7 @@
|
||||
|
||||
+ JideSplitButton.border 0,0,0,0 false javax.swing.plaf.basic.BasicBorders$MarginBorder [UI]
|
||||
+ JideSplitButton.borderPainted false
|
||||
+ JideSplitButton.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||
+ JideSplitButton.font [active] $defaultFont [UI]
|
||||
+ JideSplitButton.margin 3,3,3,7 javax.swing.plaf.InsetsUIResource [UI]
|
||||
+ JideSplitButton.selectionForeground [active] #000000 javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideSplitButton.textIconGap 4
|
||||
@@ -139,7 +133,7 @@
|
||||
+ JideTabbedPane.fitStyleIconMinWidth 24
|
||||
+ JideTabbedPane.fitStyleTextMinWidth 16
|
||||
+ JideTabbedPane.fixedStyleRectSize 60
|
||||
+ JideTabbedPane.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||
+ JideTabbedPane.font [active] $defaultFont [UI]
|
||||
+ JideTabbedPane.gripLeftMargin 4
|
||||
+ JideTabbedPane.gripperPainter [unknown type] com.jidesoft.plaf.vsnet.VsnetWindowsUtils$9 [UI]
|
||||
+ JideTabbedPane.highlight [active] #ffffff javax.swing.plaf.ColorUIResource [UI]
|
||||
@@ -150,7 +144,7 @@
|
||||
+ JideTabbedPane.selectedTabBackground [active] #f0f0f0 javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideTabbedPane.selectedTabBackgroundDk #ffc73c javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideTabbedPane.selectedTabBackgroundLt #e68b2c javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideTabbedPane.selectedTabFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||
+ JideTabbedPane.selectedTabFont [active] $defaultFont [UI]
|
||||
+ JideTabbedPane.selectedTabTextForeground [active] #000000 javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideTabbedPane.showCloseButtonOnTab false
|
||||
+ JideTabbedPane.showIconOnTab true
|
||||
@@ -176,23 +170,11 @@
|
||||
+ MeterProgressBarUI com.jidesoft.plaf.basic.MeterProgressBarUI
|
||||
|
||||
|
||||
#---- Spinner ----
|
||||
|
||||
- Spinner.font [active] $defaultFont [UI]
|
||||
+ Spinner.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||
|
||||
|
||||
#---- StyledLabel ----
|
||||
|
||||
+ StyledLabelUI com.jidesoft.plaf.basic.BasicStyledLabelUI
|
||||
|
||||
|
||||
#---- TextArea ----
|
||||
|
||||
- TextArea.font [active] $defaultFont [UI]
|
||||
+ TextArea.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||
|
||||
|
||||
#---- Theme ----
|
||||
|
||||
+ Theme.highContrast [active] false
|
||||
|
||||
@@ -39,12 +39,6 @@
|
||||
+ FolderChooserUI com.jidesoft.plaf.basic.BasicFolderChooserUI
|
||||
|
||||
|
||||
#---- FormattedTextField ----
|
||||
|
||||
- FormattedTextField.font [active] $defaultFont [UI]
|
||||
+ FormattedTextField.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||
|
||||
|
||||
#---- Gripper ----
|
||||
|
||||
+ Gripper.foreground [active] #b2b2b2 javax.swing.plaf.ColorUIResource [UI]
|
||||
@@ -66,7 +60,7 @@
|
||||
|
||||
#---- JideButton ----
|
||||
|
||||
+ JideButton.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||
+ JideButton.font [active] $defaultFont [UI]
|
||||
+ JideButton.textShiftOffset 0
|
||||
|
||||
|
||||
@@ -77,7 +71,7 @@
|
||||
|
||||
#---- JideLabel ----
|
||||
|
||||
+ JideLabel.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||
+ JideLabel.font [active] $defaultFont [UI]
|
||||
|
||||
|
||||
#---- JidePopup ----
|
||||
@@ -94,7 +88,7 @@
|
||||
|
||||
+ JideSplitButton.border 0,0,0,0 false javax.swing.plaf.basic.BasicBorders$MarginBorder [UI]
|
||||
+ JideSplitButton.borderPainted false
|
||||
+ JideSplitButton.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||
+ JideSplitButton.font [active] $defaultFont [UI]
|
||||
+ JideSplitButton.margin 3,3,3,7 javax.swing.plaf.InsetsUIResource [UI]
|
||||
+ JideSplitButton.selectionForeground [active] #000000 javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideSplitButton.textIconGap 4
|
||||
@@ -139,7 +133,7 @@
|
||||
+ JideTabbedPane.fitStyleIconMinWidth 24
|
||||
+ JideTabbedPane.fitStyleTextMinWidth 16
|
||||
+ JideTabbedPane.fixedStyleRectSize 60
|
||||
+ JideTabbedPane.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||
+ JideTabbedPane.font [active] $defaultFont [UI]
|
||||
+ JideTabbedPane.gripLeftMargin 4
|
||||
+ JideTabbedPane.gripperPainter [unknown type] com.jidesoft.plaf.vsnet.VsnetWindowsUtils$9 [UI]
|
||||
+ JideTabbedPane.highlight [active] #ffffff javax.swing.plaf.ColorUIResource [UI]
|
||||
@@ -150,7 +144,7 @@
|
||||
+ JideTabbedPane.selectedTabBackground [active] #f0f0f0 javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideTabbedPane.selectedTabBackgroundDk #ffc73c javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideTabbedPane.selectedTabBackgroundLt #e68b2c javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideTabbedPane.selectedTabFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||
+ JideTabbedPane.selectedTabFont [active] $defaultFont [UI]
|
||||
+ JideTabbedPane.selectedTabTextForeground [active] #000000 javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideTabbedPane.showCloseButtonOnTab false
|
||||
+ JideTabbedPane.showIconOnTab true
|
||||
@@ -176,23 +170,11 @@
|
||||
+ MeterProgressBarUI com.jidesoft.plaf.basic.MeterProgressBarUI
|
||||
|
||||
|
||||
#---- Spinner ----
|
||||
|
||||
- Spinner.font [active] $defaultFont [UI]
|
||||
+ Spinner.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||
|
||||
|
||||
#---- StyledLabel ----
|
||||
|
||||
+ StyledLabelUI com.jidesoft.plaf.basic.BasicStyledLabelUI
|
||||
|
||||
|
||||
#---- TextArea ----
|
||||
|
||||
- TextArea.font [active] $defaultFont [UI]
|
||||
+ TextArea.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||
|
||||
|
||||
#---- Theme ----
|
||||
|
||||
+ Theme.highContrast [active] false
|
||||
|
||||
Reference in New Issue
Block a user