XIDE Plugin for themes

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
Irwin
Posts: 103
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: 5055
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: 103
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: 5055
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: 103
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.
stecosta66
Posts: 99
Joined: Mon Sep 26, 2016 12:59 pm
Location: Italy

Re: XIDE Plugin for themes

Post by stecosta66 »

Hi Irwin,

I've dowloaded latest version of your plugin but I get this error on XIDE startup

Image

Ciao
Stefano
User avatar
Chris
Posts: 5055
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: XIDE Plugin for themes

Post by Chris »

Hi Stefano,

That's because the latest version depends on some additions to the plugin system that have not been released yet. If you download and install this XIDE version it should work. It's a beta version for XIDE 2.22 that will be included in X# 2.22, but it's no harm using it already now if you want.

XIDE_Setup_2.22_beta1.zip
(3.57 MiB) Downloaded 94 times
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
stecosta66
Posts: 99
Joined: Mon Sep 26, 2016 12:59 pm
Location: Italy

Re: XIDE Plugin for themes

Post by stecosta66 »

Ahh, thanks!

I'm interested in theme management as I prefer dark color to the white one.

Stefano
stecosta66
Posts: 99
Joined: Mon Sep 26, 2016 12:59 pm
Location: Italy

Re: XIDE Plugin for themes

Post by stecosta66 »

Hi Chris,

downloaded Xide 2.22 but still get the same error.

Image

Stefano
User avatar
Irwin
Posts: 103
Joined: Wed Mar 23, 2022 10:24 am
Location: España

Re: XIDE Plugin for themes

Post by Irwin »

stecosta66 wrote: Fri Jan 03, 2025 6:53 am Hi Chris,

downloaded Xide 2.22 but still get the same error.

Image

Stefano
Hi Stefano, sorry for the delay. Please download this fix https://file.io/QkE2Z4su4tjQ and tell me if it works or not. Don't forget the wxThemes.json file.

Irwin.
Post Reply