Skip to content

Commit 75fb648

Browse files
committed
fix branch_sort popup style
1 parent 7d174fe commit 75fb648

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

src/popups/branch_sort.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
use anyhow::Result;
22
use crossterm::event::Event;
33
use ratatui::{
4-
layout::{Alignment, Margin, Rect},
5-
text::{Line, Span},
6-
widgets::{Block, Borders, Clear, Paragraph},
7-
Frame,
4+
layout::{Alignment, Margin, Rect}, style::Stylize, text::{Line, Span}, widgets::{Block, Borders, Clear, Paragraph}, Frame
85
};
96
use strum::{EnumCount, IntoEnumIterator};
107

@@ -89,7 +86,7 @@ impl BranchSortPopup {
8986
.map(|t| {
9087
Line::from(vec![Span::styled(
9188
t.clone(),
92-
self.theme.text(true, t.starts_with("[X]")),
89+
self.theme.text(t.starts_with("[X]"), false),
9390
)])
9491
})
9592
.collect()
@@ -130,7 +127,7 @@ impl DrawableComponent for BranchSortPopup {
130127
.borders(Borders::NONE)
131128
.border_style(self.theme.block(true)),
132129
)
133-
.alignment(Alignment::Left),
130+
.alignment(Alignment::Left).not_bold(),
134131
area,
135132
);
136133
}

src/strings.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -366,37 +366,37 @@ pub fn rename_branch_popup_msg(
366366

367367
pub fn sort_branch_by_name_msg(selected: bool) -> String {
368368
format!(
369-
"[{}] branch name (a -> z)",
369+
"[{}] branch name (a z)",
370370
if selected { "X" } else { " " }
371371
)
372372
}
373373
pub fn sort_branch_by_name_rev_msg(selected: bool) -> String {
374374
format!(
375-
"[{}] branch name (z -> a)",
375+
"[{}] branch name (z a)",
376376
if selected { "X" } else { " " }
377377
)
378378
}
379379
pub fn sort_branch_by_time_msg(selected: bool) -> String {
380380
format!(
381-
"[{}] last commit time (new -> old)",
381+
"[{}] last commit time (new old)",
382382
if selected { "X" } else { " " }
383383
)
384384
}
385385
pub fn sort_branch_by_time_rev_msg(selected: bool) -> String {
386386
format!(
387-
"[{}] last commit time (old -> new)",
387+
"[{}] last commit time (old new)",
388388
if selected { "X" } else { " " }
389389
)
390390
}
391391
pub fn sort_branch_by_author_msg(selected: bool) -> String {
392392
format!(
393-
"[{}] last commit author (a -> z)",
393+
"[{}] last commit author (a z)",
394394
if selected { "X" } else { " " }
395395
)
396396
}
397397
pub fn sort_branch_by_author_rev_msg(selected: bool) -> String {
398398
format!(
399-
"[{}] last commit author (z -> a)",
399+
"[{}] last commit author (z a)",
400400
if selected { "X" } else { " " }
401401
)
402402
}

0 commit comments

Comments
 (0)