XIDE Plugin for themes

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
Irwin
Posts: 81
Joined: Wed Mar 23, 2022 10:24 am
Location: España

XIDE Plugin for themes

Post by Irwin »

Hi Chris, I would like to create a plugin that makes XIDE to support themes in the editor but I don't know where XIDE loads the editor themes configurations.

Any help would be appreciated.

Thank you!
User avatar
Chris
Posts: 4978
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: XIDE Plugin for themes

Post by Chris »

Hi Irwin,

Can you please further explain what you want to be able to change in detail? I will add support for what you need in the plugin system.

Btw, I'll be offline for the next 24 hours, so will get back to you tomorrow!
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
Irwin
Posts: 81
Joined: Wed Mar 23, 2022 10:24 am
Location: España

Re: XIDE Plugin for themes

Post by Irwin »

Chris wrote: Tue Dec 10, 2024 12:22 pm Hi Irwin,

Can you please further explain what you want to be able to change in detail? I will add support for what you need in the plugin system.

Btw, I'll be offline for the next 24 hours, so will get back to you tomorrow!
As you know, in the Tools->Preferences->Editor->Colors you can change the editor colors. This is ok but if you want to create another colors pallete then you need to restore or change the colors again and loose your previous configuration (theme). I was thinking of creating a Plugin to support themes by creating several versions of the file where XIDE loads the colors from (if it exists of course).

Image
User avatar
Chris
Posts: 4978
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: XIDE Plugin for themes

Post by Chris »

Hi Irwin,

Those are saved and loaded from XIDE.cfg, in the section colors:

[Colors]
ColorText=0
ColorReserved=255

The color is specified as an integer (can also be saved in hex format, if prefixed with "0x") in the form required by the WinAPI CreateSolidBrush() that I am using in the editor (see https://learn.microsoft.com/en-us/windo ... i/colorref).

But I think it's better not to save data directly there, instead I can add methods in the plugin system to get/set the color for each item, then you can save themes as separate files and let the user load/save them as they wish. What do you think?
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
Irwin
Posts: 81
Joined: Wed Mar 23, 2022 10:24 am
Location: España

Re: XIDE Plugin for themes

Post by Irwin »

Chris wrote: Tue Dec 10, 2024 12:50 pm Hi Irwin,

Those are saved and loaded from XIDE.cfg, in the section colors:

[Colors]
ColorText=0
ColorReserved=255

The color is specified as an integer (can also be saved in hex format, if prefixed with "0x") in the form required by the WinAPI CreateSolidBrush() that I am using in the editor (see https://learn.microsoft.com/en-us/windo ... i/colorref).

But I think it's better not to save data directly there, instead I can add methods in the plugin system to get/set the color for each item, then you can save themes as separate files and let the user load/save them as they wish. What do you think?
Hi Chris, that would be great if you add some helpers methods or callbacks for updating the editor colors. That way I could create a more practical plugin to suppor themes.

regards.
Post Reply