From 0a15403d7cd0b7ebd7c53b29f7d6912fa2288f04 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Tue, 6 Dec 2005 11:08:25 +0000 Subject: [PATCH] Blue! color scheme changed (and hardcoded in source code to ensure consistency with image files). --- app/EditorButtons.java | 7 +++++-- app/EditorHeader.java | 7 +++++-- app/EditorLineStatus.java | 5 ++++- app/EditorStatus.java | 14 +++++++++++++- build/shared/lib/preferences.txt | 13 +++++++++---- readme.txt | 2 ++ 6 files changed, 38 insertions(+), 10 deletions(-) diff --git a/app/EditorButtons.java b/app/EditorButtons.java index 5c46ca705..75c4887af 100644 --- a/app/EditorButtons.java +++ b/app/EditorButtons.java @@ -106,8 +106,11 @@ public class EditorButtons extends JComponent implements MouseInputListener { currentRollover = -1; - bgcolor = Preferences.getColor("buttons.bgcolor"); - + // hardcoding new blue color scheme for consistency with images, + // see EditorStatus.java for details. + //bgcolor = Preferences.getColor("buttons.bgcolor"); + bgcolor = new Color(0x04, 0x4F, 0x6F); + status = ""; statusFont = Preferences.getFont("buttons.status.font"); diff --git a/app/EditorHeader.java b/app/EditorHeader.java index 9a1f4af3b..45e43cc6f 100644 --- a/app/EditorHeader.java +++ b/app/EditorHeader.java @@ -90,8 +90,11 @@ public class EditorHeader extends JComponent { } if (backgroundColor == null) { - backgroundColor = - Preferences.getColor("header.bgcolor"); + //backgroundColor = + //Preferences.getColor("header.bgcolor"); + // hardcoding new blue color scheme for consistency with images, + // see EditorStatus.java for details. + backgroundColor = new Color(0x21, 0x68, 0x86); textColor[SELECTED] = Preferences.getColor("header.text.selected.color"); textColor[UNSELECTED] = diff --git a/app/EditorLineStatus.java b/app/EditorLineStatus.java index 2933de2a9..7547390ea 100644 --- a/app/EditorLineStatus.java +++ b/app/EditorLineStatus.java @@ -52,7 +52,10 @@ public class EditorLineStatus extends JComponent { this.textarea = textarea; textarea.editorLineStatus = this; - background = Preferences.getColor("linestatus.bgcolor"); + // hardcoding new blue color scheme for consistency with images, + // see EditorStatus.java for details. + //background = Preferences.getColor("linestatus.bgcolor"); + background = new Color(0x04, 0x4F, 0x6F); font = Preferences.getFont("linestatus.font"); foreground = Preferences.getColor("linestatus.color"); high = Preferences.getInteger("linestatus.height"); diff --git a/app/EditorStatus.java b/app/EditorStatus.java index 8c8286cba..191f4b88f 100644 --- a/app/EditorStatus.java +++ b/app/EditorStatus.java @@ -76,7 +76,19 @@ public class EditorStatus extends JPanel implements ActionListener { if (bgcolor == null) { bgcolor = new Color[4]; - bgcolor[0] = Preferences.getColor("status.notice.bgcolor"); + // Arduino 0003 switched to a blue color scheme to visually distinguish + // itself from Processing. Because the image files for certain interface + // elements (e.g. buttons and tabs) are distributed with the application + // while the preference file that specifies the IDE colors is stored in + // the user's home directory and shared across all versions of Arduino, + // we need to hardcode certain colors here to match the images. + // Otherwise, users who used different multiple versions of the software + // would sometimes see colors that didn't match the interface elements. + // This is a hack and prevents users from customizing the IDE colors, + // however, it obviates the need to provide for version-specific + // preferences. + //bgcolor[0] = Preferences.getColor("status.notice.bgcolor"); + bgcolor[0] = new Color(0x54, 0x91, 0x9e); bgcolor[1] = Preferences.getColor("status.error.bgcolor"); bgcolor[2] = Preferences.getColor("status.prompt.bgcolor"); bgcolor[3] = Preferences.getColor("status.prompt.bgcolor"); diff --git a/build/shared/lib/preferences.txt b/build/shared/lib/preferences.txt index 350ae829d..866165481 100755 --- a/build/shared/lib/preferences.txt +++ b/build/shared/lib/preferences.txt @@ -16,6 +16,11 @@ # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +# Some colors have been hardcoded into the source in app/ in order to ensure +# consistency with the images distributed and stored with the application. +# They have been commented out below so that users who install an old +# version of the software will not get incorrect colors left-over from this +# config file. # DEFAULT PATHS FOR SKETCHBOOK AND SETTINGS @@ -125,13 +130,13 @@ editor.eolmarkers.color=#99991A editor.invalid=false editor.invalid.style=#7E7E00,bold -buttons.bgcolor = #044F6F +#buttons.bgcolor = #044F6F buttons.status.font = SansSerif,plain,12 buttons.status.color = #FFFFFF # settings for the tabs at the top # actual tab images are stored in the lib/ folder -header.bgcolor = #216886 +#header.bgcolor = #216886 header.text.selected.color = #1A1A00 header.text.unselected.color = #ffffff header.text.font = SansSerif,plain,12 @@ -155,7 +160,7 @@ console.auto_clear = true console.length = 500 status.notice.fgcolor = #ffffff -status.notice.bgcolor = #54919E +#status.notice.bgcolor = #54919E status.error.fgcolor = #ffffff status.error.bgcolor = #662000 status.prompt.fgcolor = #000000 @@ -257,7 +262,7 @@ preproc.imports.jdk14 = javax.xml.parsers,javax.xml.transform,javax.xml.transfor browser.linux = mozilla # coloring for the editor line number status bar at the bottom of the screen -linestatus.bgcolor = #044F6F +#linestatus.bgcolor = #044F6F linestatus.font = SansSerif,plain,10 linestatus.color = #ffffff linestatus.height = 20 diff --git a/readme.txt b/readme.txt index 8ed76c2b1..dfdb07073 100644 --- a/readme.txt +++ b/readme.txt @@ -26,6 +26,8 @@ Now flushing the serial port before uploading (should fix some errors). Added a printNewline() function. Updated icon of the Windows executable. Improved accuracy of the delayMicroseconds() function. +New blue color scheme and icons courtesy of Noah Shibley (colors are hardcoded +into the source to ensure consistency with image files). 0002 - 2005.10.05 New build process no longer uses makefiles; now controlled by preferences.txt.