mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-27 06:51:37 -04:00
fixed some missed font size issues
This commit is contained in:
parent
535763aa12
commit
2880b37d4d
@ -8,6 +8,7 @@ import de.neemann.digital.draw.library.ElementLibrary;
|
|||||||
import de.neemann.digital.draw.shapes.ShapeFactory;
|
import de.neemann.digital.draw.shapes.ShapeFactory;
|
||||||
import de.neemann.digital.lang.Lang;
|
import de.neemann.digital.lang.Lang;
|
||||||
import de.neemann.gui.ErrorMessage;
|
import de.neemann.gui.ErrorMessage;
|
||||||
|
import de.neemann.gui.Screen;
|
||||||
import de.neemann.gui.ToolTipAction;
|
import de.neemann.gui.ToolTipAction;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
@ -99,6 +100,7 @@ public class ElementHelpDialog extends JDialog {
|
|||||||
JEditorPane editorPane = new JEditorPane("text/html", description);
|
JEditorPane editorPane = new JEditorPane("text/html", description);
|
||||||
editorPane.setEditable(false);
|
editorPane.setEditable(false);
|
||||||
editorPane.setCaretPosition(0);
|
editorPane.setCaretPosition(0);
|
||||||
|
editorPane.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, true);
|
||||||
|
|
||||||
editorPane.addHyperlinkListener(hyperlinkEvent -> {
|
editorPane.addHyperlinkListener(hyperlinkEvent -> {
|
||||||
if (HyperlinkEvent.EventType.ACTIVATED == hyperlinkEvent.getEventType()) {
|
if (HyperlinkEvent.EventType.ACTIVATED == hyperlinkEvent.getEventType()) {
|
||||||
@ -124,7 +126,7 @@ public class ElementHelpDialog extends JDialog {
|
|||||||
Dimension r = getSize();
|
Dimension r = getSize();
|
||||||
if (r.width > MAX_WIDTH) r.width = MAX_WIDTH;
|
if (r.width > MAX_WIDTH) r.width = MAX_WIDTH;
|
||||||
if (r.height > MAX_HEIGHT) r.height = MAX_HEIGHT;
|
if (r.height > MAX_HEIGHT) r.height = MAX_HEIGHT;
|
||||||
setSize(r);
|
setSize(Screen.getInstance().scale(r));
|
||||||
setLocationRelativeTo(parent);
|
setLocationRelativeTo(parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package de.neemann.digital.gui.components.table;
|
package de.neemann.digital.gui.components.table;
|
||||||
|
|
||||||
|
import de.neemann.gui.Screen;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.text.JTextComponent;
|
import javax.swing.text.JTextComponent;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
@ -54,7 +56,8 @@ public class ShowStringDialog extends JDialog {
|
|||||||
if (html) {
|
if (html) {
|
||||||
textComp = new JEditorPane("text/html", str);
|
textComp = new JEditorPane("text/html", str);
|
||||||
textComp.setCaretPosition(0);
|
textComp.setCaretPosition(0);
|
||||||
textComp.setPreferredSize(new Dimension(600, 800));
|
textComp.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, true);
|
||||||
|
textComp.setPreferredSize(Screen.getInstance().scale(new Dimension(600, 800)));
|
||||||
} else {
|
} else {
|
||||||
textComp = new JTextArea(str);
|
textComp = new JTextArea(str);
|
||||||
textComp.setFont(new JLabel().getFont());
|
textComp.setFont(new JLabel().getFont());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user