diff --git a/app/src/processing/app/contrib/ContributionTab.java b/app/src/processing/app/contrib/ContributionTab.java index 86cbe5a0c..9bd2dfd44 100644 --- a/app/src/processing/app/contrib/ContributionTab.java +++ b/app/src/processing/app/contrib/ContributionTab.java @@ -30,7 +30,6 @@ import java.util.*; import javax.swing.*; import javax.swing.event.*; -import javax.swing.text.*; import processing.app.*; import processing.app.ui.Editor; @@ -200,21 +199,24 @@ public class ContributionTab extends JPanel { layout.setAutoCreateGaps(true); layout.setAutoCreateContainerGaps(true); errorPanel.setLayout(layout); -// errorPanel.setBorder(BorderFactory.createMatteBorder(2, 0, 0, 0, Color.BLACK)); errorMessage = new JTextPane(); errorMessage.setEditable(false); errorMessage.setContentType("text/html"); - errorMessage.setText("Could not connect to the Processing server.
" + errorMessage.setText("
Could not connect to the Processing server.
" + "Contributions cannot be installed or updated without an Internet connection.
" - + "Please verify your network connection again, then try connecting again."); - errorMessage.setFont(Toolkit.getSansFont(14, Font.PLAIN)); - errorMessage.setMaximumSize(new Dimension(550, 50)); + + "Please verify your network connection again, then try connecting again.
"); + DetailPanel.setTextStyle(errorMessage, "1em"); + Dimension dim = new Dimension(550, 60); + errorMessage.setMaximumSize(dim); + errorMessage.setMinimumSize(dim); errorMessage.setOpaque(false); + /* StyledDocument doc = errorMessage.getStyledDocument(); SimpleAttributeSet center = new SimpleAttributeSet(); StyleConstants.setAlignment(center, StyleConstants.ALIGN_CENTER); doc.setParagraphAttributes(0, doc.getLength(), center, false); + */ closeButton = Toolkit.createIconButton("manager/close"); closeButton.setContentAreaFilled(false); diff --git a/app/src/processing/app/contrib/DetailPanel.java b/app/src/processing/app/contrib/DetailPanel.java index 33de5b288..f62f953cd 100644 --- a/app/src/processing/app/contrib/DetailPanel.java +++ b/app/src/processing/app/contrib/DetailPanel.java @@ -167,7 +167,7 @@ class DetailPanel extends JPanel { margin.bottom = 0; descriptionPane.setMargin(margin); descriptionPane.setContentType("text/html"); - setTextStyle(descriptionPane); + setTextStyle(descriptionPane, "0.95em"); descriptionPane.setOpaque(false); if (UIManager.getLookAndFeel().getID().equals("Nimbus")) { descriptionPane.setBackground(new Color(0, 0, 0, 0)); @@ -714,7 +714,7 @@ class DetailPanel extends JPanel { } - static void setTextStyle(JTextPane textPane) { + static void setTextStyle(JTextPane textPane, String fontSize) { Document doc = textPane.getDocument(); if (doc instanceof HTMLDocument) { HTMLDocument html = (HTMLDocument) doc; @@ -722,7 +722,7 @@ class DetailPanel extends JPanel { stylesheet.addRule("body { " + " margin: 0; padding: 0;" + " font-family: " + Toolkit.getSansFontName() + ", Arial, Helvetica, sans-serif;" + - " font-size: 100%;" + "font-size: 0.95em; " + + " font-size: 100%;" + "font-size: " + fontSize + "; " + "}"); } } diff --git a/todo.txt b/todo.txt index 23cc9beed..3511896e3 100755 --- a/todo.txt +++ b/todo.txt @@ -1,4 +1,6 @@ 0256 (3.2.4 or 3.3) +X only require reference.zip (and internet connection) when building dist +X set text style properly for Contribution Manager error message _ fix appbundler problems due to rollback