broken
This commit is contained in:
@@ -10,7 +10,7 @@ use crate::app::App;
|
||||
use crate::engine::{LinkState, SequencerSnapshot};
|
||||
use crate::model::SourceSpan;
|
||||
use crate::page::Page;
|
||||
use crate::state::{Modal, PanelFocus, PatternField, SidePanel};
|
||||
use crate::state::{FlashKind, Modal, PanelFocus, PatternField, SidePanel};
|
||||
use crate::views::highlight::{self, highlight_line, highlight_line_with_runtime};
|
||||
use crate::widgets::{ConfirmModal, ModalFrame, NavMinimap, NavTile, SampleBrowser, TextInputModal};
|
||||
|
||||
@@ -524,9 +524,11 @@ fn render_modal(frame: &mut Frame, app: &App, snapshot: &SequencerSnapshot, term
|
||||
let height = (term.height * 60 / 100).max(10);
|
||||
let step_num = app.editor_ctx.step + 1;
|
||||
|
||||
let flash_color = app.ui.flash_color();
|
||||
let border_color = match flash_color {
|
||||
Some(c) => c,
|
||||
let flash_kind = app.ui.flash_kind();
|
||||
let border_color = match flash_kind {
|
||||
Some(FlashKind::Error) => Color::Red,
|
||||
Some(FlashKind::Info) => Color::White,
|
||||
Some(FlashKind::Success) => Color::Green,
|
||||
None => Color::Rgb(100, 160, 180),
|
||||
};
|
||||
|
||||
@@ -566,11 +568,11 @@ fn render_modal(frame: &mut Frame, app: &App, snapshot: &SequencerSnapshot, term
|
||||
let editor_area = Rect::new(inner.x, inner.y, inner.width, inner.height.saturating_sub(1));
|
||||
let hint_area = Rect::new(inner.x, inner.y + editor_area.height, inner.width, 1);
|
||||
|
||||
if let Some(c) = flash_color {
|
||||
let bg = match c {
|
||||
Color::Red => Color::Rgb(60, 10, 10),
|
||||
Color::White => Color::Rgb(30, 30, 40),
|
||||
_ => Color::Rgb(10, 30, 10),
|
||||
if let Some(kind) = flash_kind {
|
||||
let bg = match kind {
|
||||
FlashKind::Error => Color::Rgb(60, 10, 10),
|
||||
FlashKind::Info => Color::Rgb(30, 30, 40),
|
||||
FlashKind::Success => Color::Rgb(10, 30, 10),
|
||||
};
|
||||
let flash_block = Block::default().style(Style::default().bg(bg));
|
||||
frame.render_widget(flash_block, editor_area);
|
||||
|
||||
Reference in New Issue
Block a user