[GH-ISSUE #744] Default theme component behavior on progress_bar? #1378

Closed
opened 2026-03-14 14:35:18 +03:00 by kerem · 4 comments
Owner

Originally created by @repparw on GitHub (Jun 9, 2025).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/744

I need some help around theming, I did a module for stylix that handles spotify-player

I have an issue with some themes, where progress bar text when filled, gets wrong background, with default component behavior

Image

See stylix discussion

This is what I can find on theming but I'm not too familiar with rust

github.com/aome510/spotify-player@0f1405d72d/spotify_player/src/config/theme.rs (L263-L281)

Can I get some help on what could be going wrong?

Originally created by @repparw on GitHub (Jun 9, 2025). Original GitHub issue: https://github.com/aome510/spotify-player/issues/744 I need some help around theming, I did a module for stylix that handles spotify-player I have an issue with some themes, where progress bar text when filled, gets wrong background, with default component behavior ![Image](https://github.com/user-attachments/assets/604db9d6-e5da-4c38-948f-47941e6bbd58) See stylix [discussion](https://github.com/nix-community/stylix/discussions/1376#discussioncomment-13411281) This is what I can find on theming but I'm not too familiar with rust https://github.com/aome510/spotify-player/blob/0f1405d72d1f95ba0d594b7f86e81443c53deb03/spotify_player/src/config/theme.rs#L263-L281 Can I get some help on what could be going wrong?
kerem closed this issue 2026-03-14 14:35:23 +03:00
Author
Owner

@aome510 commented on GitHub (Jun 22, 2025):

By default, the following style is used

 pub fn playback_progress_bar(&self) -> style::Style { 
     self.component_style 
         .playback_progress_bar 
         .as_ref() 
         .unwrap_or( 
             &Style::default() 
                 .bg(StyleColor::BrightBlack) 
                 .fg(StyleColor::Green), 
         ) 
         .style(&self.palette) 
 } 

so background BrightBlack and foreground Green. IIUC, the bar logic is using the above style for unfinished section and a reverse style for the finished section. I'm not familiar with stylix so cannot comment on that

<!-- gh-comment-id:2994401211 --> @aome510 commented on GitHub (Jun 22, 2025): By default, the following style is used ``` pub fn playback_progress_bar(&self) -> style::Style { self.component_style .playback_progress_bar .as_ref() .unwrap_or( &Style::default() .bg(StyleColor::BrightBlack) .fg(StyleColor::Green), ) .style(&self.palette) } ``` so background `BrightBlack` and foreground `Green`. IIUC, the bar logic is using the above style for unfinished section and a reverse style for the finished section. I'm not familiar with `stylix` so cannot comment on that
Author
Owner

@repparw commented on GitHub (Jun 22, 2025):

stylix is only tangentially relevant, it's just a form of setting the same colorscheme to all of the supported apps at the same time.

In this case, it just grabs the 16 defined colors and maps them to spotify-player, I did not change any of the default components behaviors there.

I noticed this only on some themes, my thought was the text background and the progress bar filled were referring to a different color name that's set to the same color in some themes (Green/Bright green?). don't know where the text behavior is defined

<!-- gh-comment-id:2994416570 --> @repparw commented on GitHub (Jun 22, 2025): stylix is only tangentially relevant, it's just a form of setting the same colorscheme to all of the supported apps at the same time. In this case, it just grabs the 16 defined colors and maps them to spotify-player, I did not change any of the default components behaviors there. I noticed this only on some themes, my thought was the text background and the progress bar filled were referring to a different color name that's set to the same color in some themes (Green/Bright green?). don't know where the text behavior is defined
Author
Owner

@aome510 commented on GitHub (Jun 22, 2025):

don't know where the text behavior is defined

You can find that in ratatui library codes: github.com/ratatui/ratatui@488e5f020f/ratatui-widgets/src/gauge.rs (L170-L217)

gauge_style is what is set by playback_progress_bar function above

<!-- gh-comment-id:2994426312 --> @aome510 commented on GitHub (Jun 22, 2025): > don't know where the text behavior is defined You can find that in `ratatui` library codes: https://github.com/ratatui/ratatui/blob/488e5f020f7a1b4c120d8b074c62a97abac0a4b6/ratatui-widgets/src/gauge.rs#L170-L217 `gauge_style` is what is set by `playback_progress_bar` function above
Author
Owner

@aome510 commented on GitHub (Aug 5, 2025):

Close this issue for now cause I don't know what needs to be done from spotify_player side

<!-- gh-comment-id:3155566832 --> @aome510 commented on GitHub (Aug 5, 2025): Close this issue for now cause I don't know what needs to be done from `spotify_player` side
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-player#1378
No description provided.