| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8c71c20 commit 0ec0920
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,6 +21,7 @@ | |||
| 21 | 21 | package processing.mode.java.pdex; | |
| 22 | 22 | ||
| 23 | 23 | import java.awt.BorderLayout; | |
| 24 | + import java.awt.Color; | ||
| 24 | 25 | import java.awt.Component; | |
| 25 | 26 | import java.awt.Font; | |
| 26 | 27 | import java.awt.FontMetrics; | |
@@ -40,6 +41,7 @@ | |||
| 40 | 41 | ||
| 41 | 42 | import processing.app.Base; | |
| 42 | 43 | import processing.app.Messages; | |
| 44 | + import processing.app.Mode; | ||
| 43 | 45 | import processing.app.syntax.JEditTextArea; | |
| 44 | 46 | import processing.app.ui.Toolkit; | |
| 45 | 47 | import processing.mode.java.JavaEditor; | |
@@ -84,6 +86,9 @@ public class CompletionPanel { | |||
| 84 | 86 | static public ImageIcon methodIcon; | |
| 85 | 87 | static public ImageIcon localVarIcon; | |
| 86 | 88 | ||
| 89 | + static Color selectionBgColor; | ||
| 90 | + static Color textColor; | ||
| 91 | + | ||
| 87 | 92 | ||
| 88 | 93 | /** | |
| 89 | 94 | * Triggers the completion popup | |
@@ -108,11 +113,17 @@ public CompletionPanel(final JEditTextArea textarea, | |||
| 108 | 113 | } | |
| 109 | 114 | ||
| 110 | 115 | if (classIcon == null) { | |
| 111 | - File dir = new File(editor.getMode().getFolder(), "theme/completion"); | ||
| 116 | + Mode mode = editor.getMode(); | ||
| 117 | + | ||
| 118 | + File dir = new File(mode.getFolder(), "theme/completion"); | ||
| 112 | 119 | classIcon = Toolkit.getIconX(dir, "class_obj"); | |
| 113 | 120 | methodIcon = Toolkit.getIconX(dir, "methpub_obj"); | |
| 114 | 121 | fieldIcon = Toolkit.getIconX(dir, "field_protected_obj"); | |
| 115 | 122 | localVarIcon = Toolkit.getIconX(dir, "field_default_obj"); | |
| 123 | + | ||
| 124 | + //selectionBgColor = mode.getColor(""); // no theme.txt for Java Mode | ||
| 125 | + selectionBgColor = new Color(0xffF0F0F0); | ||
| 126 | + textColor = new Color(0xff222222); | ||
| 116 | 127 | } | |
| 117 | 128 | ||
| 118 | 129 | popupMenu = new JPopupMenu(); | |
@@ -560,6 +571,11 @@ public Component getListCellRendererComponent(JList<?> list, Object value, | |||
| 560 | 571 | index, | |
| 561 | 572 | isSelected, | |
| 562 | 573 | cellHasFocus); | |
| 574 | + if (isSelected) { | ||
| 575 | + label.setBackground(selectionBgColor); | ||
| 576 | + } | ||
| 577 | + label.setForeground(textColor); | ||
| 578 | + | ||
| 563 | 579 | if (value instanceof CompletionCandidate) { | |
| 564 | 580 | CompletionCandidate cc = (CompletionCandidate) value; | |
| 565 | 581 | switch (cc.getType()) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -89,12 +89,16 @@ _ mouse events (i.e. toggle breakpoint) seem to be firing twice | |||
| 89 | 89 | ||
| 90 | 90 | 3.0 final | |
| 91 | 91 | _ https://github.com/processing/processing/milestones/3.0%20final | |
| 92 | + _ completion panel | ||
| 93 | + _ what should the background color be? | ||
| 94 | + _ test fg/bg color on other operating systems | ||
| 95 | + _ fix icon sizes/design | ||
| 92 | 96 | _ fix the design of the completions window | |
| 93 | 97 | X remove extra border around the outside | |
| 94 | - _ change font | ||
| 98 | + X change font | ||
| 99 | + X add 2x version of the icons | ||
| 95 | 100 | _ change selection highlight color | |
| 96 | 101 | _ put some margin around it | |
| 97 | - X add 2x version of the icons | ||
| 98 | 102 | _ https://github.com/processing/processing/issues/3906 | |
| 99 | 103 | _ import suggestions box needs design review | |
| 100 | 104 | _ https://github.com/processing/processing/issues/3407 | |
| Back | FazBrowse Home | New Git URL |
0 commit comments