* Some more changes to adjustment possibilities of GUI size.

This commit is contained in:
LevelX2 2016-02-19 16:30:52 +01:00
parent 35505b29bb
commit e15807b9ed
6 changed files with 64 additions and 39 deletions

View file

@ -3,6 +3,7 @@ package mage.client.components;
import java.awt.Color;
import javax.swing.JEditorPane;
import javax.swing.SwingUtilities;
import mage.client.util.GUISizeHelper;
import org.mage.card.arcane.ManaSymbols;
import org.mage.card.arcane.UI;
@ -35,7 +36,7 @@ public class MageTextArea extends JEditorPane {
final StringBuilder buffer = new StringBuilder(512);
// Dialog is a java logical font family, so it should work on all systems
buffer.append("<html><body style='font-family:Dialog;font-size:");
buffer.append(16);
buffer.append(GUISizeHelper.gameDialogAreaFontSizeBig);
buffer.append("pt;margin:3px 3px 3px 3px;color: #FFFFFF'><b><center>");
// Don't know what it does (easy italc?) but it bugs with multiple #HTML color codes (LevelX2)
@ -57,10 +58,9 @@ public class MageTextArea extends JEditorPane {
MageTextArea.super.setText(promptText);
// in case the text don't fit in the panel a tooltip with the text is added
if (panelWidth > 0 && MageTextArea.this.getPreferredSize().getWidth() > panelWidth) {
// String tooltip = promptText
// .replace("color: #FFFFFF'>", "color: #111111'><p width='400'>")
// .replace("</body>", "</p></body>");
String tooltip = "<html><center><body style='font-family:Dialog;font-size:14;color: #FFFFFF'><p width='500'>" + basicText + "</p></body></html>";
String tooltip = "<html><center><body style='font-family:Dialog;font-size:"
+ GUISizeHelper.gameDialogAreaFontSizeBig
+ ";color: #FFFFFF'><p width='500'>" + basicText + "</p></body></html>";
MageTextArea.super.setToolTipText(tooltip);
} else {
MageTextArea.super.setToolTipText(null);