Skip to content

Commit 8d8f65d

Browse files
committed
add ability to theme playback_context
1 parent 0f1e7bf commit 8d8f65d

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

spotify_player/src/config/theme.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ struct ComponentStyle {
7070
playback_album: Option<Style>,
7171
playback_genres: Option<Style>,
7272
playback_metadata: Option<Style>,
73+
playback_context: Option<Style>,
7374
playback_progress_bar: Option<Style>,
7475
playback_progress_bar_unfilled: Option<Style>,
7576
current_playing: Option<Style>,
@@ -274,6 +275,14 @@ impl Theme {
274275
.style(&self.palette)
275276
}
276277

278+
pub fn playback_context(&self) -> style::Style {
279+
self.component_style
280+
.playback_context
281+
.as_ref()
282+
.unwrap_or(&Style::default().fg(StyleColor::BrightBlack))
283+
.style(&self.palette)
284+
}
285+
277286
pub fn playback_progress_bar(&self) -> style::Style {
278287
self.component_style
279288
.playback_progress_bar

spotify_player/src/ui/playback.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ fn construct_playback_text(
371371
.clone()
372372
})
373373
.unwrap_or(String::from("unknown"));
374-
(context_name, ui.theme.playback_metadata())
374+
(context_name, ui.theme.playback_context())
375375
}
376376
_ => continue,
377377
};

0 commit comments

Comments
 (0)