Jump to content
Sign in to follow this  
Yaron

Can I create my own delphi dark theme (for v10.3.3+)

Recommended Posts

I'm aware that with recent versions, the theming has been rewritten so I'm wondering if there's any tool/editor supporting the latest Delphi theming features that would let me specify my own RGB values for each UI element.

 

I would like to create an alternative dark theme that's more utilitarian.

While I prefer a dark theme for eye strain, I find the current dark theme too flat with UI elements that I expect to be on a different plane (color) becoming merged visually (e.g. Scrollbars widgets).

I'm aware there are a few other dark'ish themes included, but they too suffer from their own issues so I would rather create (and share of course) my own color-theme.

Share this post


Link to post

There are few problems here.

 

First, IDE themes are slightly different from general VCL Styles so you cannot use them because some parts of IDE will not be painted properly. Next VCL Style editor is rather hard to use for creating any theme from scratch. 

 

Your best option would be to extract theme resource from darktheme260.bpl (haven't checked if this is the right bpl, as I have customized light theme), and then use that resource as starting point for your customization. 

 

IDE themes are copyrighted, so you should not distribute such hacked theme.

Share this post


Link to post
14 minutes ago, Dalija Prasnikar said:

There are few problems here.

 

First, IDE themes are slightly different from general VCL Styles so you cannot use them because some parts of IDE will not be painted properly. Next VCL Style editor is rather hard to use for creating any theme from scratch. 

 

Your best option would be to extract theme resource from darktheme260.bpl (haven't checked if this is the right bpl, as I have customized light theme), and then use that resource as starting point for your customization. 

 

IDE themes are copyrighted, so you should not distribute such hacked theme.

What do I use to extract the resources and what do I use to them rebuilt the file and make it accessible in the IDE?

Remember, I only need to change a few RGB values, not really anything too complex.

 

I guess if I can't share my work, I'll just document which values I changed.

Edited by Yaron

Share this post


Link to post
10 minutes ago, Yaron said:

What do I use to extract the resources and what do I use to them rebuilt the file and make it accessible in the IDE?

Remember, I only need to change a few RGB values, not really anything too complex.

 

I guess if I can't share my work, I'll just document which values I changed.

For extracting resources Google for PE resource editor. You don't have to rebuild bpl again, just put your VCL Style in common path where IDE can find it (where other VCL Styles are located) and then change following keys in registry:

 

Computer\HKEY_CURRENT_USER\Software\Embarcadero\BDS\20.0\Theme

 

Key: Theme

Value: Custom

 

Key: VCLStyle

Value: YourStyleName (That would be the name you give in VCL Style Editor under Name

 

Unfortunately, VCL Styles are bitmap based and you cannot just change few RGB color values, you have to edit bitmaps. You can export complete style as one PNG and then you can edit colors in some image editing tool. After you are done, import new image back in.

You will also need to go to Style -> Assign Colors to apply colors from bitmap back to Colors and SysColors. After that check if all those colors are correct (I think few were not assigned correctly)

 

Depending on how much customizing you need and want, it can be a lot of work. 

 

I modified Light theme to grayscale, but that was rather easy as I just converted whole png to grayscale (except for the close button)

  • Like 1

Share this post


Link to post

I was able to modify the style to me desire, called it "mytheme.vsf",

 

When trying to apply it in the registry by setting "Theme" to "Custom" and "VCLStyle" to "mytheme.vsf" (after placing the file in "c:\Program Files (x86)\Embarcadero\Studio\20.0\Redist\styles\vcl\").

 

However, Delphi doesn't seem to be using the style, what's more, after restoring the registry setting, if i look under the themes pop-up-menu (clicking the little window-moon icon), the "custom" entry is grayed out.

Share this post


Link to post
2 hours ago, Yaron said:

I was able to modify the style to me desire, called it "mytheme.vsf",

 

When trying to apply it in the registry by setting "Theme" to "Custom" and "VCLStyle" to "mytheme.vsf" (after placing the file in "c:\Program Files (x86)\Embarcadero\Studio\20.0\Redist\styles\vcl\").

 

However, Delphi doesn't seem to be using the style, what's more, after restoring the registry setting, if i look under the themes pop-up-menu (clicking the little window-moon icon), the "custom" entry is grayed out.

VCLStyle entry in registry is not the name of the file, but name of the style in Editor - without .vsf.  

 

stylename.png

Share this post


Link to post

Sadly using the value from the "Name" field didn't work.

 

Something else is wrong, I can no longer see any of the custom pre-installed themes from the menu.

Share this post


Link to post
21 hours ago, Yaron said:

after placing the file in "c:\Program Files (x86)\Embarcadero\Studio\20.0\Redist\styles\vcl\"

I have just realized that your path is probably wrong I have it in "C:\Users\Public\Documents\Embarcadero\Studio\20.0\Styles"

Share this post


Link to post

The painful thing about this experimentation is that it wipes my editor color selection each time I try something.

 

I simply can't understand some Embarcadero's UI choices 😞

  • Sad 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×