gitbutler icon indicating copy to clipboard operation
gitbutler copied to clipboard

Custom theming support

Open PavelLaptev opened this issue 11 months ago • 2 comments

Right now, GitButler supports only two themes — dark and light. It would be nice to support custom themes, e.g. support more presets or allow making fully custom via config.

image

PavelLaptev avatar Mar 04 '24 12:03 PavelLaptev

If we implement #2932 then this should be a pretty trivial shuttling of information between that and the frontend. @PavelLaptev what do you think about having a fourth "Appearance" selection (from the screenshot in the OP) that is shown if you have a [theme] section in the config file?

We could have a base field that indicates if the CSS var overrides are based on the dark/light theme, and then the rest of the fields would be CSS vars we whitelist, shuttle that down to the frontend via a function/event (we can fswatch it for changes, too). Then the frontend just calls whatever.style.setProperty(--${varName}, varValue).

Qix- avatar Mar 04 '24 15:03 Qix-

@Qix- yes, that's should work 🙂

PavelLaptev avatar Mar 04 '24 23:03 PavelLaptev