Recent

Author Topic: Import IDE Colors  (Read 10550 times)

Pontiac

  • New Member
  • *
  • Posts: 20
Import IDE Colors
« on: February 20, 2016, 04:21:33 am »
In both Delphi and Lazarus, I had always exported my IDE colors as I can't stand the defaults.  I like dark backgrounds, medium to bright font colors, and quite non-standard "UI-Specialists-would-have-seizures-comprehending-why-its-like-that" kind of themes.  I'm just screwed up that way... ;)

I've exported the IDE colors from 1.4.4, have a brand spanking new install of Lazarus on this machine.  So new, it has not even compiled a program yet.  I'd like want to import the color scheme from 1.4.4 I have stored in my source control.  According to the documents I found on the wiki, I'm to put the exported XML file in userschemes in the default config directory, and then my entry should show up.  Unfortunately, either I'm a complete dunce and I don't know what the "default config directory" is or the system isn't working as advertised.  I've restarted Laz each time I moved the userschemes directory to another directory.  I found the ColorTwilight.xml file in the lazarus\ide directory, put userschemes and the IDE Colors.xml file in there, but still my color options are not shown.

The install is 100% stock install.  Default path is c:\lazarus, no other config changes done as of yet.  c:\lazarus\userschemes\IDE Colors.xml exists but IDE colors does not show up in the Editor>Colors drop down where "Delphi", "Twilight" and others are listed.

So which is it?  Am I a dunce or are the docs out of date?  How difficult would it be to put an "Import" button to save the frustration of guessing what directory this XML file should be in?  It should be simple enough to add the import button, create the userschemes directory where needed, then copy the imported file, refresh the drop down list, and done.

BTW, I even went so far as to overwrite the contents of the default Delphi scheme with my scheme, and it didn't show my scheme.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10799
  • Debugger - SynEdit - and more
    • wiki
Re: Import IDE Colors
« Reply #1 on: February 20, 2016, 05:41:59 am »
I just tested with 1.7 (but the editor options, should be the same as in 1.6), and it works.

Check in menu "view" > ide internals > about ide
where your primary config path is.
on windows it normally is C:\Users\USERNAME\AppData\Local\lazarus
on linux ~/.lazarus

the folder within it should be "userschemes" (that may be case sensitive)

and the file name.xml
not sure spaces should be fine in name, but try without.

And yes it should be in the dropdown you mentioned.

the file looks like
Code: [Select]
<?xml version="1.0"?>
<CONFIG>
  <Lazarus>
    <ColorSchemes Version="6">
      <Names Count="1">
        <Item1 Value="Buenanoche"/>
      </Names>
      <Globals Version="6">
        <SchemeBuenanoche>

And there may be the issue. if the name had a space, maybe it created invalid xml. (see last line in quote , and matching closing tag. They must have the name from Item1). If there is a space, you can correct it in the xml

Pontiac

  • New Member
  • *
  • Posts: 20
Re: Import IDE Colors
« Reply #2 on: February 20, 2016, 05:45:29 am »
Excellent.  The IDE Internals was the part that I'm missing as there isn't any mention of the config directory in the UI configs.

I'm going to look up that Wiki and make an adjustment indicating where exactly to find that directory.  (If I have access)

Edit: And done.  Works as advertised under 1.6.
« Last Edit: February 20, 2016, 05:51:02 am by Pontiac »

 

TinyPortal © 2005-2018