darker default color for transport

This commit is contained in:
🪞👃🪞 2024-12-12 23:56:18 +01:00
parent 46467d3972
commit 391a3dba08
3 changed files with 4 additions and 10 deletions

View file

@ -75,7 +75,7 @@ impl<T: HasClock> From<(&T, Option<ItemPalette>, bool)> for TransportView {
let sr = format!("{:.1}k", clock.timebase.sr.get() / 1000.0);
let bpm = format!("{:.3}", clock.timebase.bpm.get());
let ppq = format!("{:.0}", clock.timebase.ppq.get());
let color = color.unwrap_or(ItemPalette::from(ItemColor::from(TuiTheme::g(100))));
let color = color.unwrap_or(ItemPalette::from(ItemColor::from(TuiTheme::g(32))));
let bg = if focused { color.light.rgb } else { color.dark.rgb };
if let Some(started) = clock.started.read().unwrap().as_ref() {
let current_sample = (clock.global.sample.get() - started.sample.get())/1000.;

View file

@ -9,10 +9,7 @@ pub struct TuiOutput {
impl Output<Tui> for TuiOutput {
#[inline] fn area (&self) -> [u16;4] { self.area }
#[inline] fn area_mut (&mut self) -> &mut [u16;4] { &mut self.area }
#[inline] fn render_in (&mut self,
area: [u16;4],
widget: &dyn Render<Tui>
) -> Usually<()> {
#[inline] fn render_in (&mut self, area: [u16;4], widget: &dyn Render<Tui>) -> Usually<()> {
let last = self.area();
*self.area_mut() = area;
widget.render(self)?;
@ -22,10 +19,7 @@ impl Output<Tui> for TuiOutput {
}
impl TuiOutput {
pub fn buffer_update (&mut self,
area: [u16;4],
callback: &impl Fn(&mut Cell, u16, u16)
) {
pub fn buffer_update (&mut self, area: [u16;4], callback: &impl Fn(&mut Cell, u16, u16)) {
buffer_update(&mut self.buffer, area, callback);
}
pub fn fill_bold (&mut self, area: [u16;4], on: bool) {

View file

@ -44,7 +44,7 @@ render!(|self: PianoHorizontal|{
note_hi: 0,
note_point: None
}, lay!([
self.size,
//self.size,
PianoHorizontalNotes {
source: &self.buffer,
time_start: 0,