diff options
| author | 2018-12-10 19:11:14 -0500 | |
|---|---|---|
| committer | 2018-12-10 19:11:14 -0500 | |
| commit | c65069ab8a642a4ebdf7071e33014f8933caf458 (patch) | |
| tree | 02f405419ac4bd388528183d786d74deb85d1d2d /src/main/java/cuchaz/enigma/gui/highlight | |
| parent | add option to view calls to a method in general, not just the specific instan... (diff) | |
| download | enigma-fork-c65069ab8a642a4ebdf7071e33014f8933caf458.tar.gz enigma-fork-c65069ab8a642a4ebdf7071e33014f8933caf458.tar.xz enigma-fork-c65069ab8a642a4ebdf7071e33014f8933caf458.zip | |
Fix cursor and selection highlight color when using the dark theme
Diffstat (limited to 'src/main/java/cuchaz/enigma/gui/highlight')
| -rw-r--r-- | src/main/java/cuchaz/enigma/gui/highlight/SelectionHighlightPainter.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/cuchaz/enigma/gui/highlight/SelectionHighlightPainter.java b/src/main/java/cuchaz/enigma/gui/highlight/SelectionHighlightPainter.java index 5cbeabc..81a70a9 100644 --- a/src/main/java/cuchaz/enigma/gui/highlight/SelectionHighlightPainter.java +++ b/src/main/java/cuchaz/enigma/gui/highlight/SelectionHighlightPainter.java | |||
| @@ -11,6 +11,8 @@ | |||
| 11 | 11 | ||
| 12 | package cuchaz.enigma.gui.highlight; | 12 | package cuchaz.enigma.gui.highlight; |
| 13 | 13 | ||
| 14 | import cuchaz.enigma.config.Config; | ||
| 15 | |||
| 14 | import javax.swing.text.Highlighter; | 16 | import javax.swing.text.Highlighter; |
| 15 | import javax.swing.text.JTextComponent; | 17 | import javax.swing.text.JTextComponent; |
| 16 | import java.awt.*; | 18 | import java.awt.*; |
| @@ -22,7 +24,7 @@ public class SelectionHighlightPainter implements Highlighter.HighlightPainter { | |||
| 22 | // draw a thick border | 24 | // draw a thick border |
| 23 | Graphics2D g2d = (Graphics2D) g; | 25 | Graphics2D g2d = (Graphics2D) g; |
| 24 | Rectangle bounds = BoxHighlightPainter.getBounds(text, start, end); | 26 | Rectangle bounds = BoxHighlightPainter.getBounds(text, start, end); |
| 25 | g2d.setColor(Color.black); | 27 | g2d.setColor(new Color(Config.getInstance().selectionHighlightColor)); |
| 26 | g2d.setStroke(new BasicStroke(2.0f)); | 28 | g2d.setStroke(new BasicStroke(2.0f)); |
| 27 | g2d.drawRoundRect(bounds.x, bounds.y, bounds.width, bounds.height, 4, 4); | 29 | g2d.drawRoundRect(bounds.x, bounds.y, bounds.width, bounds.height, 4, 4); |
| 28 | } | 30 | } |