Skip to content

Commit 55ade2d

Browse files
committed
Nicer button for 'Copy error to clipboard'
1 parent 4c4878b commit 55ade2d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Diff for: app/src/processing/app/EditorStatus.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import java.awt.*;
2727
import java.awt.event.*;
2828
import javax.swing.*;
29+
2930
import java.awt.datatransfer.*;
3031
import static processing.app.I18n._;
3132

@@ -447,11 +448,14 @@ public void keyTyped(KeyEvent event) {
447448
add(progressBar);
448449
progressBar.setVisible(false);
449450

450-
copyErrorButton = new JButton(_("Copy To Clipboard"));
451+
copyErrorButton = new JButton(
452+
"<html>" + _("Copy error") + "<br>" + _("to clipboard") + "</html>");
453+
Font font = copyErrorButton.getFont();
454+
font = new Font(font.getName(), font.getStyle(), (int) (font.getSize()*0.7));
455+
copyErrorButton.setFont(font);
456+
copyErrorButton.setHorizontalAlignment(JLabel.CENTER);
451457
add(copyErrorButton);
452-
//copyErrorButton.setVisible(true);
453458
copyErrorButton.setVisible(false);
454-
System.out.println("create copyErrorButton");
455459
copyErrorButton.addActionListener(new ActionListener() {
456460
public void actionPerformed(ActionEvent e) {
457461
String message="";

0 commit comments

Comments
 (0)