mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 20:56:43 +01:00
move cpu indicator into status bar
This commit is contained in:
parent
935b5b7720
commit
b2386b2992
3 changed files with 26 additions and 19 deletions
|
|
@ -3,7 +3,7 @@ use crate::*;
|
|||
impl Content for SequencerTui {
|
||||
type Engine = Tui;
|
||||
fn content (&self) -> impl Widget<Engine = Tui> {
|
||||
lay!(
|
||||
SequencerStatusBar::with(self, lay!(
|
||||
col!(
|
||||
TransportView::from(self),
|
||||
Split::right(20,
|
||||
|
|
@ -11,10 +11,13 @@ impl Content for SequencerTui {
|
|||
widget(&PhraseView2::from(self)),
|
||||
).min_y(20)
|
||||
),
|
||||
self.perf.percentage()
|
||||
.map(|cpu|format!("{cpu:.03}%"))
|
||||
.fg(Color::Rgb(255,128,0))
|
||||
.align_sw(),
|
||||
)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
impl Content for SequencerStatusBar {
|
||||
type Engine = Tui;
|
||||
fn content (&self) -> impl Widget<Engine = Tui> {
|
||||
widget(&self.cpu).fg(Color::Rgb(255,128,0)).align_se().fill_x()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue