Skip to content

Commit 8de70e9

Browse files
committed
add another rollover for the "more prefs" text in the Preferences window
1 parent 397c6e3 commit 8de70e9

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

app/src/processing/app/ui/PreferencesFrame.java

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -421,9 +421,26 @@ public void mouseExited(MouseEvent e) {
421421

422422
// More preferences are in the ...
423423

424-
JLabel morePreferenceLabel = new JLabel(Language.text("preferences.file"));
425-
//morePreferenceLabel.setForeground(Color.gray);
426-
morePreferenceLabel.setEnabled(false);
424+
final JLabel morePreferenceLabel = new JLabel(Language.text("preferences.file"));
425+
morePreferenceLabel.setForeground(UIManager.getColor("Label.disabledForeground"));
426+
morePreferenceLabel.addMouseListener(new MouseAdapter() {
427+
public void mousePressed(MouseEvent e) {
428+
// Starting in 4.0.1, open the Wiki page about the prefs
429+
Platform.openURL("https://github.com/processing/processing4/wiki/Preferences");
430+
}
431+
432+
// Light this up in blue like a hyperlink
433+
public void mouseEntered(MouseEvent e) {
434+
frame.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
435+
morePreferenceLabel.setForeground(Theme.getColor("laf.accent.color"));
436+
}
437+
438+
// Set the text back to black when the mouse is outside
439+
public void mouseExited(MouseEvent e) {
440+
frame.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
441+
morePreferenceLabel.setForeground(UIManager.getColor("Label.disabledForeground"));
442+
}
443+
});
427444

428445
JLabel preferencePathLabel = new JLabel(Preferences.getPreferencesPath());
429446
final JLabel clickable = preferencePathLabel;
@@ -441,9 +458,7 @@ public void mouseEntered(MouseEvent e) {
441458
// Set the text back to black when the mouse is outside
442459
public void mouseExited(MouseEvent e) {
443460
frame.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
444-
// steal the color from a component that doesn't change
445-
// (so that it works after updateTheme() has been called)
446-
clickable.setForeground(sketchbookLocationLabel.getForeground());
461+
clickable.setForeground(UIManager.getColor("Label.foreground"));
447462
}
448463
});
449464

todo.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
1286 (4.0.1)
22
X Changing into p5.js mode gives an error
33
X https://github.com/processing/processing4/issues/530
4+
X add another rollover for the "more prefs" text in the Preferences window
5+
X open the wiki page on click
6+
X also pull the foreground color from the LaF instead of disabling the label
47

58

69
known issues
@@ -19,7 +22,7 @@ finalizing a release
1922
_ submit to Microsoft
2023
_ https://www.microsoft.com/en-us/wdsi/filesubmission
2124
_ https://aka.ms/wdsi
22-
_ https://www.microsoft.com/security/blog/2018/08/16/partnering-with-the-industry-to-minimize-false-positives/
25+
_ https://www.microsoft.com/security/oblog/2018/08/16/partnering-with-the-industry-to-minimize-false-positives/
2326

2427

2528
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

0 commit comments

Comments
 (0)