Skip to content

Commit

Permalink
fix: styling of some Props not working (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
mierak authored Dec 30, 2024
1 parent 06f5861 commit 4915f65
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 37 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
### Fixed

- `ToggleConsume` and `ToggleSingle` causing playback to stop
- Styling not being applied to Bitrate and Crossfade props

## [0.7.0] - 2024-12-24

Expand Down
2 changes: 0 additions & 2 deletions docs/src/content/docs/next/assets/example_theme.ron
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
#![enable(unwrap_newtypes)]
#![enable(unwrap_variant_newtypes)]
(
album_art_position: Left,
album_art_width_percent: 40,
default_album_art_path: None,
show_song_table_header: true,
draw_borders: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
#![enable(unwrap_newtypes)]
#![enable(unwrap_variant_newtypes)]
(
album_art_position: Right,
album_art_width_percent: 40,
default_album_art_path: None,
draw_borders: false,
show_song_table_header: false,
Expand Down
2 changes: 0 additions & 2 deletions docs/src/content/docs/next/assets/themes/default/theme.ron
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
#![enable(unwrap_newtypes)]
#![enable(unwrap_variant_newtypes)]
(
album_art_position: Left,
album_art_width_percent: 40,
default_album_art_path: None,
show_song_table_header: true,
draw_borders: true,
Expand Down
11 changes: 0 additions & 11 deletions docs/src/content/docs/next/configuration/theme.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,6 @@ directory and then configuring the `theme` property in the config file filename

Below is a list of properties that can be changed.

### album_art_position

<ConfigValue name="album_art_position" type={["Left", "Right"]} />
Determines which side of the queue tab to display the album art on. Default is `Left`.

### album_art_width_percent

<ConfigValue name="album_art_width_percent" type="number" />

Percentage of the queue tab width to use for the album art. Default is `40`.

### default_album_art_path

<ConfigValue name="default_album_art_path" type="string" optional />
Expand Down
2 changes: 0 additions & 2 deletions docs/src/content/docs/release/assets/example_theme.ron
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
#![enable(unwrap_newtypes)]
#![enable(unwrap_variant_newtypes)]
(
album_art_position: Left,
album_art_width_percent: 40,
default_album_art_path: None,
show_song_table_header: true,
draw_borders: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
#![enable(unwrap_newtypes)]
#![enable(unwrap_variant_newtypes)]
(
album_art_position: Right,
album_art_width_percent: 40,
default_album_art_path: None,
draw_borders: false,
show_song_table_header: false,
Expand Down
2 changes: 0 additions & 2 deletions docs/src/content/docs/release/assets/themes/default/theme.ron
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
#![enable(unwrap_newtypes)]
#![enable(unwrap_variant_newtypes)]
(
album_art_position: Left,
album_art_width_percent: 40,
default_album_art_path: None,
show_song_table_header: true,
draw_borders: true,
Expand Down
11 changes: 0 additions & 11 deletions docs/src/content/docs/release/configuration/theme.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,6 @@ directory and then configuring the `theme` property in the config file filename

Below is a list of properties that can be changed.

### album_art_position

<ConfigValue name="album_art_position" type={["Left", "Right"]} />
Determines which side of the queue tab to display the album art on. Default is `Left`.

### album_art_width_percent

<ConfigValue name="album_art_width_percent" type="number" />

Percentage of the queue tab width to use for the album art. Default is `40`.

### default_album_art_path

<ConfigValue name="default_album_art_path" type="string" optional />
Expand Down
5 changes: 2 additions & 3 deletions src/ui/panes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ use playlists::PlaylistsPane;
use queue::QueuePane;
use ratatui::{
prelude::Rect,
style::Style,
text::{Line, Span},
Frame,
};
Expand Down Expand Up @@ -645,11 +644,11 @@ impl Property<'static, PropertyKind> {
StatusProperty::Single => Some(Either::Left(Span::styled(status.single.to_string(), style))),
StatusProperty::Bitrate => status.bitrate.as_ref().map_or_else(
|| self.default_as_span(song, status),
|v| Some(Either::Left(Span::styled(v.to_string(), Style::default()))),
|v| Some(Either::Left(Span::styled(v.to_string(), style))),
),
StatusProperty::Crossfade => status.xfade.as_ref().map_or_else(
|| self.default_as_span(song, status),
|v| Some(Either::Left(Span::styled(v.to_string(), Style::default()))),
|v| Some(Either::Left(Span::styled(v.to_string(), style))),
),
},
PropertyKindOrText::Property(PropertyKind::Widget(w)) => match w {
Expand Down

0 comments on commit 4915f65

Please sign in to comment.