Skip to content

Commit d856fef

Browse files
committed
refactor(app): use more fluent methods for setting colors in styles of controller table
1 parent e3303d9 commit d856fef

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/app.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ impl App {
340340
.bottom_margin(1),
341341
)
342342
.block(
343-
Block::default()
343+
Block::bordered()
344344
.title(" Adapter ")
345345
.title_style({
346346
if self.focused_block == FocusedBlock::Adapter {
@@ -349,10 +349,9 @@ impl App {
349349
Style::default()
350350
}
351351
})
352-
.borders(Borders::ALL)
353352
.border_style({
354353
if self.focused_block == FocusedBlock::Adapter {
355-
Style::default().fg(Color::Green)
354+
Style::default().green()
356355
} else {
357356
Style::default()
358357
}
@@ -367,7 +366,7 @@ impl App {
367366
)
368367
.flex(self.config.layout)
369368
.row_highlight_style(if self.focused_block == FocusedBlock::Adapter {
370-
Style::default().bg(Color::DarkGray).fg(Color::White)
369+
Style::default().white().on_dark_gray()
371370
} else {
372371
Style::default()
373372
});

0 commit comments

Comments
 (0)