Go Down

Topic: Dark Theme confusion (Read 4721 times) previous topic - next topic

dougp

So I'd like to try the dark theme - greyed out comments are just weird.

I load Jeff Thompsons' darktheme from github and it's in the 'Arduino/lib/theme/syntax' folder. The description states "Revised for Arduino version 1.6.6+, not tested with earlier versions." at the top. I've got v 1.8.2. Further down it is stated "The newest version of the Arduino IDE makes creating custom themes trickier: you now need to edit the  theme.txt  file, an XML file inside the  syntax  folder, and the button files. "

From a cursory scan of the default file and the dark file they appear structurally the same but the color settings are, of course, different.

Is there a setting somewhere to select the theme file?

Do I need to rename dark to default?

Basically, what are the mechanics of changing the theme?



Everything we call real is made of things that cannot be regarded as real.  If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet. - Niels Bohr

No private consultations undertaken!

pert

Is there a setting somewhere to select the theme file?
Not that I know of, you just need to replace the current theme files with the new ones. I don't think there's any easy way to switch between multiple installed themes.

Do I need to rename dark to default?
No.

Basically, what are the mechanics of changing the theme?


Here are a collection of some other themes that can be installed the same way:
https://github.com/per1234/ino-themes

Here's some documentation and a test sketch if you want to modify the Arduino IDE theme:
https://github.com/per1234/ThemeTest

dougp

Thank you. I'll report my results.
Everything we call real is made of things that cannot be regarded as real.  If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet. - Niels Bohr

No private consultations undertaken!

dougp

Got it!  ;D

Karma thanks to you.
Everything we call real is made of things that cannot be regarded as real.  If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet. - Niels Bohr

No private consultations undertaken!

dougp

#4
Jul 24, 2017, 09:31 pm Last Edit: Jul 24, 2017, 09:44 pm by dougp
A new issue has arisen. I am prevented from tweaking colors in the theme file. The colors for the matching brackets are perverse.

I can view the file with the XML editor, the one that shows the fancy colors but cannot change anything.

I can change things using notepad but am denied access when hitting 'save' (the altered file).

OS - Win7 pro

Continue here or, start a new thread?






p.s. I think there should be auto-karma just for going through the harangue of posting pics here.  >:(
Everything we call real is made of things that cannot be regarded as real.  If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet. - Niels Bohr

No private consultations undertaken!

pert

Have you tried it with the Arduino IDE not running? It works for me using Windows even with the IDE running so that's probably not the issue.

Make sure the file is not open in any other program such as this XML editor you mentioned.

dougp

Have you tried it with the Arduino IDE not running?
That was the first issue I cleared up. I got an 'in use by others' type of message because the IDE was active. Cleared that.

Make sure the file is not open in any other program such as this XML editor you mentioned.
Tried it both ways, notepad only and xml editor only. Same result either way.

On a hunch I checked and found the program files folder was set to read only. I changed this and got part way through the (many) files and folders in there and started getting a lot of 'couldn't change the settings for file X' messages. I clicked 'ignore' a few times then went to 'ignore all'. When it finished I still  couldn't do any editing.

No doubt it's something simple, ya just gotta know where the switch for it is.
Everything we call real is made of things that cannot be regarded as real.  If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet. - Niels Bohr

No private consultations undertaken!

dougp

#7
Aug 04, 2017, 01:46 am Last Edit: Aug 04, 2017, 02:18 am by dougp
Maybe this needs a new thread, I dunno.

I've managed to make a few changes in the dark theme .xml file. I had to copy the file to the desktop, make the changes there, then copy back to the syntax folder. It's laborious but it works.

This theme looks like an unfinished project. Partly because there's a 'fix me' comment embedded. Partly because some of the color combinations don't work. One thing I changed was the colors used to highlight matching brackets, etc.

A related issue: If you cursor on to say, a closing curly brace and the opening mate for that is off-screen at the top a box is shown presenting the code of the matching off-screen line. The non-keyword text that appears there is invisible.


Question - what is the term for the message box? If I knew what to look for I could tinker with the colors but, most of that file is a mystery.

I tried to make the image bigger but couldn't.

Everything we call real is made of things that cannot be regarded as real.  If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet. - Niels Bohr

No private consultations undertaken!

pert

Question - what is the term for the message box?
That "message box" feature is more recent than any change to the theme files (it was only introduced in Arduino IDE 1.8.2) so you won't find theme settings specifically for it. It looks like some other theme properties are being reused there since obviously the colors aren't hardcoded. It's probably just using the same theme properties as used in the editor for that text. I've been calling the "message box" a "tooltip".

most of that file is a mystery.
I've done my best to document the theme properties here:
https://github.com/per1234/ThemeTest/blob/master/README.md#theme-settings-documentation
if you find the purpose of any of the properties I've documented as "Doesn't appear to have any effect." please let me know and I'll update the documentation.

dougp

I've done my best to document the theme properties here:

If you find the purpose of any of the properties I've documented as "Doesn't appear to have any effect." please let me know and I'll update the documentation.
Just for giggles I checked a few. These, among others:

editor.literal1.style  - Doesn't appear to have any effect.
editor.literal2.style  - Doesn't appear to have any effect.
editor.variable.style  - Doesn't appear to have any effect.

don't even appear in the dark theme file.

Oh, well perhaps a future version will shed some light.
Everything we call real is made of things that cannot be regarded as real.  If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet. - Niels Bohr

No private consultations undertaken!

pert

Those properties are in theme.txt.

There are two sections of the documentation:
  • Settings found in lib/theme/theme.txt
  • Settings found in lib/theme/syntax/default.xml

dougp

For now I'll just live with it. It makes my head hurt looking at that.  :smiley-confuse:
Everything we call real is made of things that cannot be regarded as real.  If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet. - Niels Bohr

No private consultations undertaken!

Pontey

Hello,

Does the Arduino IDE have a function where you can install themes is much the same way as VS Code can ?

Another Question

Can you use VS Code to code for the Arduino and upload from that instead of using the Arduino IDE ?


Thanks

rozenc

#13
Nov 23, 2018, 08:21 am Last Edit: Nov 23, 2018, 08:25 am by rozenc Reason: adding image.
edit C:\Program Files (x86)\Arduino\lib\theme\syntax\default.xml with notepad (run in administration mode)

problem :
<matchedBracket fg="ffffff" bg="aaaaaa" highlightBoth="true" animate="true"/>


replace:
<matchedBracket fg="ffffff" bg="1d7ac8" highlightBoth="true" animate="true"/>




you can change it if you want that:

<style token="SEPARATOR" fg="ffffff"/>

Go Up