FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

get styles to work properly, other cleanups · eggfly/processing@1c8e14b · GitHub

Repository navigation

Commit 1c8e14b

Browse files
committed
get styles to work properly, other cleanups
1 parent d55eb34 commit 1c8e14b

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

‎app/src/processing/app/Mode.java‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,6 @@ public void setupGUI() {
209209
// other things that have to be set explicitly for the defaults
210210
theme.setColor("run.window.bgcolor", SystemColor.control);
211211

212-
// loadBackground();
213-
214212
} catch (IOException e) {
215213
Messages.showError("Problem loading theme.txt",
216214
"Could not load theme.txt, please re-install Processing", e);

‎app/src/processing/app/syntax/PdeTextAreaPainter.java‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ public void mousePressed(MouseEvent event) {
8181

8282

8383
/**
84-
* Loads theme for TextAreaPainter
84+
* Loads theme for TextAreaPainter. This is handled here because in the olden
85+
* days, Modes had different visual design. Now, these are just pulling the
86+
* defaults from the standard theme, though there may be minor additions or
87+
* overrides added in a Mode's own theme.txt file.
8588
*/
8689
public void setMode(Mode mode) {
8790
errorUnderlineColor = mode.getColor("editor.error.underline.color");
@@ -101,8 +104,8 @@ public void setMode(Mode mode) {
101104

102105

103106
/**
104-
* Paint a line. Paints the gutter (with background color and text) then the
105-
* line (background color and text).
107+
* Paint a line. Paints the gutter (with background color and text)
108+
* then the line (background color and text).
106109
*
107110
* @param gfx the graphics context
108111
* @param tokenMarker

‎app/src/processing/app/ui/Editor.java‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@ public void caretUpdate(CaretEvent e) {
294294
editorPanel.add(textarea);
295295
upper.add(editorPanel);
296296

297+
// set colors and fonts for the painter object
298+
getPdeTextArea().setMode(mode);
299+
297300
splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, upper, footer);
298301

299302
// disable this because it hides the message area (Google Code issue #745)

‎java/src/processing/mode/java/JavaEditor.java‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ protected JavaEditor(Base base, String path, EditorState state,
106106
box.add(textAndError);
107107
*/
108108

109-
getPdeTextArea().setMode(jmode);
110-
111109
preprocessingService = new PreprocessingService(this);
112110
pdex = new PDEX(this, preprocessingService);
113111

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL