From 10ffb3e6bc6683590c3f951d6c8d49ce657b1727 Mon Sep 17 00:00:00 2001 From: benfry Date: Mon, 30 Aug 2010 04:33:24 +0000 Subject: [PATCH] fix linux permissions (issue #343), plus other tweaks to make linux less ugly --- app/src/processing/app/EditorHeader.java | 8 +++----- app/src/processing/app/EditorToolbar.java | 4 ++++ app/src/processing/app/Preferences.java | 2 +- build/build.xml | 24 +++++++++++++++-------- build/shared/lib/preferences.txt | 4 +++- 5 files changed, 27 insertions(+), 15 deletions(-) diff --git a/app/src/processing/app/EditorHeader.java b/app/src/processing/app/EditorHeader.java index 90e06715c..a72b18b89 100644 --- a/app/src/processing/app/EditorHeader.java +++ b/app/src/processing/app/EditorHeader.java @@ -154,11 +154,10 @@ public class EditorHeader extends JComponent { g.setFont(font); // need to set this each time through metrics = g.getFontMetrics(); fontAscent = metrics.getAscent(); - //} - //Graphics2D g2 = (Graphics2D) g; - //g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, - // RenderingHints.VALUE_TEXT_ANTIALIAS_ON); + Graphics2D g2 = (Graphics2D) g; + g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, + RenderingHints.VALUE_TEXT_ANTIALIAS_ON); // set the background for the offscreen g.setColor(backgroundColor); @@ -180,7 +179,6 @@ public class EditorHeader extends JComponent { // if modified, add the li'l glyph next to the name String text = " " + codeName + (code.isModified() ? " \u00A7" : " "); - Graphics2D g2 = (Graphics2D) g; int textWidth = (int) font.getStringBounds(text, g2.getFontRenderContext()).getWidth(); diff --git a/app/src/processing/app/EditorToolbar.java b/app/src/processing/app/EditorToolbar.java index 1c91f7608..8443ae07a 100644 --- a/app/src/processing/app/EditorToolbar.java +++ b/app/src/processing/app/EditorToolbar.java @@ -188,6 +188,10 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key g.setColor(bgcolor); //getBackground()); g.fillRect(0, 0, width, height); + Graphics2D g2 = (Graphics2D) g; + g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, + RenderingHints.VALUE_TEXT_ANTIALIAS_ON); + for (int i = 0; i < buttonCount; i++) { g.drawImage(stateImage[i], x1[i], y1, null); } diff --git a/app/src/processing/app/Preferences.java b/app/src/processing/app/Preferences.java index d2c5f54e1..9697c16d8 100644 --- a/app/src/processing/app/Preferences.java +++ b/app/src/processing/app/Preferences.java @@ -279,7 +279,7 @@ public class Preferences { fontSizeField.setText(String.valueOf(editorFont.getSize())); top += d.height + GUI_BETWEEN; - + // [ ] Use smooth text in editor window editorAntialiasBox = diff --git a/build/build.xml b/build/build.xml index 5e7802128..694d82556 100644 --- a/build/build.xml +++ b/build/build.xml @@ -346,9 +346,11 @@ + - + @@ -374,13 +376,19 @@ http://www.gnu.org/software/tar/manual/html_section/transform.html --> - - - - - - - + + + + + + + + + + + + + ======================================================= diff --git a/build/shared/lib/preferences.txt b/build/shared/lib/preferences.txt index 3201be931..e6ec0827d 100755 --- a/build/shared/lib/preferences.txt +++ b/build/shared/lib/preferences.txt @@ -92,8 +92,10 @@ editor.font.macosx = Monaco,plain,10 # anti-aliased text, turned off by default editor.antialias=false +# linux fonts are hideous without anti-aliasing [0191] +editor.antialias.linux=true -# color to be used for background when 'external editor' enabled +# currently using an external editor editor.external=false # caret blinking