rohanrhu / gdb-frontend

☕ GDBFrontend is an easy, flexible and extensible gui debugger. Try it on https://debugme.dev
https://oguzhaneroglu.com/projects/gdb-frontend/
GNU General Public License v3.0
2.82k stars 101 forks source link

Theme + font configuring? #10

Closed jstaursky closed 3 years ago

jstaursky commented 3 years ago

Any way of editing the theme or the font used? Awesome Project BTW.

rohanrhu commented 3 years ago

Hi, theming is actually simple but we need a CSS file configuration. I will add a setting for choosing themes. Theme will be a CSS file but we also need a theme configuration for the editor so theme folders will contain theme CSS and editor theme.

rohanrhu commented 3 years ago

I just remembered plugin system. Themes can be written as plugins. You can make themes as plugins with name format of theme_THEMENAME.

There is a plugin development tutorial: https://github.com/rohanrhu/gdb-frontend/wiki/Plugin-Development-Tutorial

I added an example theme plugin: https://github.com/rohanrhu/gdb-frontend/tree/master/plugins/theme_light

gdbfrontend-theme-light

You can enable it with commenting the line of "theme_light": https://github.com/rohanrhu/gdb-frontend/blob/c8a9549a621e9c68c754231b5ebdc41fa0323022/config.py#L20-L23

For editor theme, I added a method to FileTabs component. You can see that in example theme: https://github.com/rohanrhu/gdb-frontend/blob/c8a9549a621e9c68c754231b5ebdc41fa0323022/plugins/theme_light/frontend/js/theme_light.js#L12-L14

Note: You must restart GDBFrontend when you edit config.py.


Also I will add an option for changing themes. (Theme plugin names must be start with theme_, so there will be a select box for switching between themes.)

rohanrhu commented 3 years ago

I added theme commands to GDB shell.

So you can change theme like:

gf-theme light

or for default theme:

gf-theme default