Skip to content

fix(gui): created dynamic theme for code editor#2471

Merged
skylot merged 1 commit intoskylot:masterfrom
MrIkso:themed_code_viewer
May 2, 2025
Merged

fix(gui): created dynamic theme for code editor#2471
skylot merged 1 commit intoskylot:masterfrom
MrIkso:themed_code_viewer

Conversation

@MrIkso
Copy link
Copy Markdown
Contributor

@MrIkso MrIkso commented May 2, 2025

This PR add new theme for code editor based on current app theme and dynamic update if theme changed. Maybe fixed #1763, #1735
Preview: Googe Drive

jadx_editor_theme_720p.mp4

@skylot skylot merged commit fbebcb9 into skylot:master May 2, 2025
4 checks passed
@skylot
Copy link
Copy Markdown
Owner

skylot commented May 2, 2025

@MrIkso look awesome, thanks 👍

Although, the option name is a little confusing, because it is unclear what it does. Also, this should be an entry in editor themes combo box, I will check if this can be done. As for naming: something like Use UI theme colors will be easier to understand… maybe 🤣

@MrIkso MrIkso deleted the themed_code_viewer branch May 2, 2025 17:09
@skylot
Copy link
Copy Markdown
Owner

skylot commented May 3, 2025

@MrIkso I commit changes to put your dynamic theme in an editor theme combo box. I adjust code so it will be easier to add new themes and also simplify exposing an API for changing editor themes in plugins in the future.

Also, I slightly change your code to use identifiers (most of the text in the code) color from UI theme, this might break some of your intentions, so please check it. And I think we should use less hardcoded colors and use directly or mix more colors from UI theme, this way it will appear much better in my option.

@MrIkso
Copy link
Copy Markdown
Contributor Author

MrIkso commented May 3, 2025

@skylot nice. I forgot to add default color for annotations in dark theme, add it
scheme.getStyle(Token.ANNOTATION).foreground = Color.decode("#B3AE60");
it defaut dark color from Intellij Idea. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] Sync editor and application themes

2 participants