mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 14:00:55 +03:00
HTML: Fixed font sizes for HTML tags <h1>...<h6>, <code>, <kbd>, <big>, <small> and <samp> in HTML text for components Button, CheckBox, RadioButton, MenuItem (and subclasses), JideLabel, JideButton, JXBusyLabel and JXHyperlink. Also fixed for Label and ToolTip if using Java 11+.
This commit is contained in:
@@ -16,9 +16,14 @@
|
||||
|
||||
package com.formdev.flatlaf.jideoss.ui;
|
||||
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import javax.swing.AbstractButton;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.plaf.ComponentUI;
|
||||
import javax.swing.plaf.basic.BasicButtonListener;
|
||||
import com.formdev.flatlaf.ui.FlatHTML;
|
||||
import com.jidesoft.plaf.LookAndFeelFactory;
|
||||
import com.jidesoft.plaf.basic.BasicJideButtonListener;
|
||||
import com.jidesoft.plaf.basic.BasicJideButtonUI;
|
||||
|
||||
/**
|
||||
@@ -37,4 +42,26 @@ public class FlatJideButtonUI
|
||||
|
||||
return new FlatJideButtonUI();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BasicButtonListener createButtonListener( AbstractButton b ) {
|
||||
return new FlatJideButtonListener( b );
|
||||
}
|
||||
|
||||
//---- class FlatJideButtonListener ---------------------------------------
|
||||
|
||||
/** @since 3.5 */
|
||||
protected class FlatJideButtonListener
|
||||
extends BasicJideButtonListener
|
||||
{
|
||||
protected FlatJideButtonListener( AbstractButton b ) {
|
||||
super( b );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void propertyChange( PropertyChangeEvent e ) {
|
||||
super.propertyChange( e );
|
||||
FlatHTML.propertyChange( e );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,11 +18,13 @@ package com.formdev.flatlaf.jideoss.ui;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Graphics;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.plaf.ComponentUI;
|
||||
import com.formdev.flatlaf.FlatLaf;
|
||||
import com.formdev.flatlaf.ui.FlatHTML;
|
||||
import com.formdev.flatlaf.ui.FlatUIUtils;
|
||||
import com.jidesoft.plaf.LookAndFeelFactory;
|
||||
import com.jidesoft.plaf.basic.BasicJideLabelUI;
|
||||
@@ -65,6 +67,20 @@ public class FlatJideLabelUI
|
||||
defaults_initialized = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void installComponents( JLabel c ) {
|
||||
super.installComponents( c );
|
||||
|
||||
// update HTML renderer if necessary
|
||||
FlatHTML.updateRendererCSSFontBaseSize( c );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void propertyChange( PropertyChangeEvent e ) {
|
||||
super.propertyChange( e );
|
||||
FlatHTML.propertyChange( e );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void paintEnabledText( JLabel l, Graphics g, String s, int textX, int textY ) {
|
||||
int mnemIndex = FlatLaf.isShowMnemonics() ? l.getDisplayedMnemonicIndex() : -1;
|
||||
|
||||
Reference in New Issue
Block a user