mirror of
https://github.com/aome510/spotify-player.git
synced 2026-04-26 09:25:49 +03:00
[PR #118] [MERGED] More flexible theme config #1569
Labels
No labels
bug
documentation
enhancement
good first issue
help wanted
pull-request
question
third-party
third-party
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-player#1569
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/aome510/spotify-player/pull/118
Author: @daschw
Created: 2/3/2023
Status: ✅ Merged
Merged: 2/3/2023
Merged by: @aome510
Base:
master← Head:theme📝 Commits (6)
daf93efAllow specifying only some of the component styles in theme.tomlbb9d1e7Don't require palette in theme config2c72820Implement border component style7f31fd5Implement selection component style591568dImplement review suggestions54f8541update example theme config file andtheme_parsescript📊 Changes
8 files changed (+157 additions, -90 deletions)
View changed files
📝
docs/config.md(+7 -3)📝
examples/theme.toml(+10 -0)📝
scripts/theme_parse(+2 -0)📝
spotify_player/src/config/theme.rs(+119 -78)📝
spotify_player/src/ui/page.rs(+6 -3)📝
spotify_player/src/ui/playback.rs(+2 -1)📝
spotify_player/src/ui/popup.rs(+7 -3)📝
spotify_player/src/ui/utils.rs(+4 -2)📄 Description
Hi, thanks for this awesome piece of software!
I just recently came across this project and played around with the theme config a little. At some point I thought it would be nice to have darker borders. However, I could not find this option anywhere in the component styles. So I thought I'd try to implement this myself. After I had finished, I realized that this would require every user to update their theme.toml files because without the new
borderoption spotify_player would not be able to parse them and error. Furthermore I saw that you recently refactored the theming config and deletedfg_selectedandbg_selected(or how they were called) and I saw the TODO comment to find a solution to not having to set each component style when adding this section in theme.toml.Hence I thought, before I add an option to change the border I'll try to figure out a way to solve this TODO. Afterwards, adding new component styles would not be an issue, because it would not affect older configs, that did not set this attribute. So that is what I ended up doing. With this PR
borderselectionI am quite sure that none of these changes affect any existing theme configs.
With this I could now have a theme.toml like this
that would look like this with my terminal colors:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.