Go Down

Topic: is it possible specific color each instance of arduino IDE ? (Read 2677 times) previous topic - next topic

westfw

It looks like the serial monitor is current "uncolored" compared to the other Arduino windows.
The relevant code to change THAT looks like:
Code: [Select]

diff --git a/app/src/processing/app/AbstractTextMonitor.java b/app/src/processing/app/AbstractTextMo
index 1602e86..8d3a353 100644
--- a/app/src/processing/app/AbstractTextMonitor.java
+++ b/app/src/processing/app/AbstractTextMonitor.java
@@ -82,6 +82,9 @@ public abstract class AbstractTextMonitor extends AbstractMonitor {
     upperPane.add(textField);
     upperPane.add(Box.createRigidArea(new Dimension(4, 0)));
     upperPane.add(sendButton);
+//+WEW
+    upperPane.setBackground(Theme.getColor("linestatus.bgcolor"));
+//-WEW
 
     mainPane.add(upperPane, BorderLayout.NORTH);
 
@@ -117,6 +120,9 @@ public abstract class AbstractTextMonitor extends AbstractMonitor {
 
     serialRates.setMaximumSize(serialRates.getMinimumSize());
 
+//+WEW
+    pane.setBackground(Theme.getColor("linestatus.bgcolor"));
+//-WEW
     pane.add(autoscrollBox);
     pane.add(Box.createHorizontalGlue());
     pane.add(noLineEndingAlert);


Wrapping that in some sort of UI and code to actively change the colors is a more complicated issue, but perhaps this will be a useful clue to someone.  (the "linestatus.bgcolor" is controlled by lib/theme/theme.txt, which is user-editable, but not a value that can be changed at runtime, nor saved...)

How many instances did you want to have?


neutrinos

How many instances did you want to have?
I can have 5 arduino (5 separate IDE opened) on same time connected to my computer.

I think the color is 32,162,164 or 0x20A2A4 and I search it inside files and find nothing. I my mind I want try to change this value with hex editor.

tutivabene

it is a wonderful suggestion, there is only to find how to put it into practice...
be patient !
I can't do it

padouet

Do you want something like that ?



After reading your post, I want it too !

I do it very quickly with paint ... Sorry for quality.
Theory is when you know how it works and nothing happens.
Practice is when everything works and nobody knows why.
I gathered theory and practice: Nothing works ... and nobody knows why!

pert

Do you want something like that ?
If I understand correctly, this thread and your issue report:
https://github.com/arduino/Arduino/issues/6819
is primarily about automatic color coding of each instance of the IDE and the Serial monitor associated with that instance. Unfortunately that seems like it would be fairly complex to achieve and the Arduino developers have no immediate plans to implement this feature.

However, in your issue report you had also asked:
Quote
If it is not important for developper, maybe it is possible to define this in style file or maybe I can compil an IDE_Arduino_red, an IDE_Arduino_yellow, an IDE_Arduino_green, etc. How can I do it ? Please explain me.
It is possible to customize the coloration of the IDE by editing the theme.txt and default.xml files. By editing the theme of each of three installations of the Arduino IDE (or really only two of the three since one can be left default) you could easily achieve something like what is shown in your screenshot above. I have attempted to document the various theme settings here:
https://github.com/per1234/ThemeTest/blob/master/README.md#theme-settings-documentation
Unfortunately it does not appear that it is possible to customize the coloration of the Serial Monitor via the theme files.

neutrinos

Do you want something like that ?



After reading your post, I want it too !

I do it very quickly with paint ... Sorry for quality.
Yes, exactly !
Maybe with other colors (blue, green, cyan, magenta), but it is what I want.

I search in source code, but for me it is a real labyrinth and I got lost.

I find this, maybe can help you :

"java.awt.Color" is very often used but I do not know where is it declared ?
"Theme.getColor()" and "java.awt.SystemColor" are used too.

#00979D is used on this site and some files.

IDE and SERIAL monitor have "same" initialisation about color, but I do not discover how and where.




If I understand correctly, this thread and your issue report:
https://github.com/arduino/Arduino/issues/6819
is primarily about automatic color coding of each instance of the IDE and the Serial monitor associated with that instance. Unfortunately that seems like it would be fairly complex to achieve and the Arduino developers have no immediate plans to implement this feature.

However, in your issue report you had also asked:
It is possible to customize the coloration of the IDE by editing the theme.txt and default.xml files. By editing the theme of each of three installations of the Arduino IDE (or really only two of the three since one can be left default) you could easily achieve something like what is shown in your screenshot above. I have attempted to document the various theme settings here:
https://github.com/per1234/ThemeTest/blob/master/README.md#theme-settings-documentation
Unfortunately it does not appear that it is possible to customize the coloration of the Serial Monitor via the theme files.
Thank you for your answer about customize the coloration of the IDE by editing the theme.txt and default.xml files.
I change values of theme.txt and default.xml (https://github.com/bobbylight/RSyntaxTextArea/tree/master/src/main/resources/org/fife/ui/rsyntaxtextarea/themes), nothing change for default.xml.
In theme.txt I replace "#0" by "#8" and some change can be view.

In folder "Arduino\lib\theme" icones files can be modified ?

But now I have not enough time to test more and make nice skin.

Go Up