diff options
author | Tim Oram <dev@mitmaro.ca> | 2024-03-07 09:35:21 -0330 |
---|---|---|
committer | Tim Oram <dev@mitmaro.ca> | 2024-03-08 08:58:25 -0330 |
commit | b2f058479f4331f8cc2fca1b63440876154c10d2 (patch) | |
tree | d974effbd6b9dda32f2d095981127d14bfcb9c04 /src/modules/show_commit/view_builder.rs | |
parent | ea756cf3529705c1af3b26d42090f227a902e77c (diff) |
Move LineSegment styles to bitflags Struct
Diffstat (limited to 'src/modules/show_commit/view_builder.rs')
-rw-r--r-- | src/modules/show_commit/view_builder.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/modules/show_commit/view_builder.rs b/src/modules/show_commit/view_builder.rs index 81ae94e..1e5c5e5 100644 --- a/src/modules/show_commit/view_builder.rs +++ b/src/modules/show_commit/view_builder.rs @@ -6,7 +6,7 @@ use crate::{ get_partition_index_on_whitespace_for_line, get_stat_item_segments, }, - view::{LineSegment, ViewDataUpdater, ViewLine}, + view::{LineSegment, LineSegmentOptions, ViewDataUpdater, ViewLine}, }; const PADDING_CHARACTER: char = '\u{2015}'; // '―' @@ -253,7 +253,7 @@ impl ViewBuilder { for delta in status.deltas() { updater.push_line(ViewLine::new_empty_line()); updater.push_line(ViewLine::from(vec![ - LineSegment::new_with_color_and_style("@@", DisplayColor::Normal, true, false, false), + LineSegment::new_with_color_and_style("@@", DisplayColor::Normal, LineSegmentOptions::DIMMED), LineSegment::new_with_color( format!( " -{},{} +{},{} ", @@ -265,7 +265,7 @@ impl ViewBuilder { .as_str(), DisplayColor::DiffContextColor, ), - LineSegment::new_with_color_and_style("@@", DisplayColor::Normal, true, false, false), + LineSegment::new_with_color_and_style("@@", DisplayColor::Normal, LineSegmentOptions::DIMMED), LineSegment::new_with_color( format!(" {}", delta.context()).as_str(), DisplayColor::DiffContextColor, @@ -274,9 +274,7 @@ impl ViewBuilder { updater.push_line(ViewLine::new_pinned(vec![]).set_padding_with_color_and_style( PADDING_CHARACTER, DisplayColor::Normal, - true, - false, - false, + LineSegmentOptions::DIMMED, )); for line in delta.lines() { |