Skip to content

Add darktheme prototype: WIP#7

Closed
JojiiOfficial wants to merge 1 commit intojpochyla:miniaudiofrom
JojiiOfficial:miniaudio
Closed

Add darktheme prototype: WIP#7
JojiiOfficial wants to merge 1 commit intojpochyla:miniaudiofrom
JojiiOfficial:miniaudio

Conversation

@JojiiOfficial
Copy link
Copy Markdown

I created a dark-theme implementation prototype. I couldn't come up with an idea how to implement the dark theme for the menu buttons properly, since they are constants and can't be made variables easily. So this is WIP for now. I thought about making dark-theme a feature but tbh I prefer it to be an option which should become a preference in some kind of option/config menu later on.

@jpochyla
Copy link
Copy Markdown
Owner

jpochyla commented Jan 3, 2021

Thanks! Real theming support would indeed require:

  • Refactoring all current use of color constants from ui/theme.rs to env keys.
  • Figuring out all the colors etc.
  • Implementing custom widget that switches between the themes in a performant manner (i.e. similar to EnvScope but caching the env and updating it only when the theme selector from State changes).
  • Adding it to the config dialog.
  • Bonus points: implementing OS-theme retrieval support to druid-shell, ideally with some "theme changed" event.

@JojiiOfficial
Copy link
Copy Markdown
Author

But on MacOS it would not be cross platform. Or what exactly are you talking about?

@thvdveld
Copy link
Copy Markdown

thvdveld commented Jan 4, 2021

For later on: I prefer using a config file, like alacritty does with YAML, or Starship with TOML. This gives more flexibility than environment variables IMO. Just my two cents!

@JojiiOfficial
Copy link
Copy Markdown
Author

Yeah a config file sounds good... But for this, as @jpochyla already said, quite some things need to be done first.

@jpochyla
Copy link
Copy Markdown
Owner

jpochyla commented Jan 14, 2021

As of 408e8ab there is a simple dark theme added. More work on colors is needed, it's not very pleasant right now, but it's a start. I'll close this, please re-open with any color customizations on top of master. Thank you!

Screenshot 2021-01-14 at 19 13 05

@jpochyla jpochyla closed this Jan 14, 2021
@JojiiOfficial JojiiOfficial deleted the miniaudio branch January 14, 2021 18:27
@JojiiOfficial JojiiOfficial restored the miniaudio branch January 14, 2021 18:28
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.

3 participants