fixing linux stuff
This commit is contained in:
@@ -63,7 +63,6 @@ pub fn render(frame: &mut Frame, app: &App, link: &LinkState, area: Rect) {
|
||||
Span::styled(peer_text, Style::new().fg(theme.ui.text_muted)),
|
||||
]);
|
||||
|
||||
let flash_str = format!("{:.0}%", app.ui.flash_brightness * 100.0);
|
||||
let quantum_str = format!("{:.0}", link.quantum());
|
||||
let tempo_str = format!("{:.1} BPM", link.tempo());
|
||||
let beat_str = format!("{:.2}", link.beat());
|
||||
@@ -161,7 +160,6 @@ pub fn render(frame: &mut Frame, app: &App, link: &LinkState, area: Rect) {
|
||||
focus == OptionsFocus::ShowCompletion,
|
||||
&theme,
|
||||
),
|
||||
render_option_line("Flash brightness", &flash_str, focus == OptionsFocus::FlashBrightness, &theme),
|
||||
Line::from(""),
|
||||
link_header,
|
||||
render_divider(content_width, &theme),
|
||||
@@ -215,18 +213,17 @@ pub fn render(frame: &mut Frame, app: &App, link: &LinkState, area: Rect) {
|
||||
OptionsFocus::ShowScope => 6,
|
||||
OptionsFocus::ShowSpectrum => 7,
|
||||
OptionsFocus::ShowCompletion => 8,
|
||||
OptionsFocus::FlashBrightness => 9,
|
||||
OptionsFocus::LinkEnabled => 13,
|
||||
OptionsFocus::StartStopSync => 14,
|
||||
OptionsFocus::Quantum => 15,
|
||||
OptionsFocus::MidiOutput0 => 26,
|
||||
OptionsFocus::MidiOutput1 => 27,
|
||||
OptionsFocus::MidiOutput2 => 28,
|
||||
OptionsFocus::MidiOutput3 => 29,
|
||||
OptionsFocus::MidiInput0 => 33,
|
||||
OptionsFocus::MidiInput1 => 34,
|
||||
OptionsFocus::MidiInput2 => 35,
|
||||
OptionsFocus::MidiInput3 => 36,
|
||||
OptionsFocus::LinkEnabled => 12,
|
||||
OptionsFocus::StartStopSync => 13,
|
||||
OptionsFocus::Quantum => 14,
|
||||
OptionsFocus::MidiOutput0 => 25,
|
||||
OptionsFocus::MidiOutput1 => 26,
|
||||
OptionsFocus::MidiOutput2 => 27,
|
||||
OptionsFocus::MidiOutput3 => 28,
|
||||
OptionsFocus::MidiInput0 => 32,
|
||||
OptionsFocus::MidiInput1 => 33,
|
||||
OptionsFocus::MidiInput2 => 34,
|
||||
OptionsFocus::MidiInput3 => 35,
|
||||
};
|
||||
|
||||
let scroll_offset = if total_lines <= max_visible {
|
||||
|
||||
@@ -7,7 +7,7 @@ use std::time::Instant;
|
||||
use rand::rngs::StdRng;
|
||||
use rand::SeedableRng;
|
||||
use ratatui::layout::{Alignment, Constraint, Layout, Rect};
|
||||
use ratatui::style::{Color, Modifier, Style};
|
||||
use ratatui::style::{Modifier, Style};
|
||||
use ratatui::text::{Line, Span};
|
||||
use ratatui::widgets::{Block, Borders, Cell, Clear, Paragraph, Row, Table};
|
||||
use ratatui::Frame;
|
||||
@@ -150,17 +150,7 @@ pub fn render(frame: &mut Frame, app: &App, link: &LinkState, snapshot: &Sequenc
|
||||
let term = frame.area();
|
||||
|
||||
let theme = theme::get();
|
||||
let bg_color = if app.ui.event_flash > 0.0 {
|
||||
let t = (app.ui.event_flash * app.ui.flash_brightness).min(1.0);
|
||||
let (base_r, base_g, base_b) = theme.ui.bg_rgb;
|
||||
let (tgt_r, tgt_g, tgt_b) = theme.flash.event_rgb;
|
||||
let r = base_r + ((tgt_r as f32 - base_r as f32) * t) as u8;
|
||||
let g = base_g + ((tgt_g as f32 - base_g as f32) * t) as u8;
|
||||
let b = base_b + ((tgt_b as f32 - base_b as f32) * t) as u8;
|
||||
Color::Rgb(r, g, b)
|
||||
} else {
|
||||
theme.ui.bg
|
||||
};
|
||||
let bg_color = theme.ui.bg;
|
||||
|
||||
let blank = " ".repeat(term.width as usize);
|
||||
let lines: Vec<Line> = (0..term.height).map(|_| Line::raw(&blank)).collect();
|
||||
|
||||
Reference in New Issue
Block a user