Feat: saving screen during perfs
This commit is contained in:
@@ -139,10 +139,7 @@ fn handle_scroll(ctx: &mut InputContext, col: u16, row: u16, term: Rect, up: boo
|
||||
}
|
||||
}
|
||||
Page::Dict => {
|
||||
let (header_area, [cat_area, words_area]) = dict_view::layout(body);
|
||||
if contains(header_area, col, row) {
|
||||
return;
|
||||
}
|
||||
let [cat_area, words_area] = dict_view::layout(body);
|
||||
if contains(cat_area, col, row) {
|
||||
if up {
|
||||
ctx.dispatch(AppCommand::DictPrevCategory);
|
||||
@@ -300,7 +297,7 @@ fn handle_body_click(ctx: &mut InputContext, col: u16, row: u16, body: Rect) {
|
||||
// --- Main page (grid) ---
|
||||
|
||||
fn handle_main_click(ctx: &mut InputContext, col: u16, row: u16, area: Rect) {
|
||||
let [_patterns_area, _, main_area, _, _vu_area] = main_view::layout(area);
|
||||
let [main_area, _, _vu_area] = main_view::layout(area);
|
||||
|
||||
if !contains(main_area, col, row) {
|
||||
return;
|
||||
@@ -533,7 +530,7 @@ fn handle_help_click(ctx: &mut InputContext, col: u16, row: u16, area: Rect) {
|
||||
// --- Dict page ---
|
||||
|
||||
fn handle_dict_click(ctx: &mut InputContext, col: u16, row: u16, area: Rect) {
|
||||
let (_header_area, [cat_area, words_area]) = dict_view::layout(area);
|
||||
let [cat_area, words_area] = dict_view::layout(area);
|
||||
|
||||
if contains(cat_area, col, row) {
|
||||
use crate::model::categories::{self, CatEntry, CATEGORIES};
|
||||
|
||||
@@ -26,6 +26,7 @@ pub(crate) fn cycle_option_value(ctx: &mut InputContext, right: bool) {
|
||||
OptionsFocus::ShowSpectrum => ctx.dispatch(AppCommand::ToggleSpectrum),
|
||||
OptionsFocus::ShowCompletion => ctx.dispatch(AppCommand::ToggleCompletion),
|
||||
OptionsFocus::ShowPreview => ctx.dispatch(AppCommand::TogglePreview),
|
||||
OptionsFocus::PerformanceMode => ctx.dispatch(AppCommand::TogglePerformanceMode),
|
||||
OptionsFocus::Font => {
|
||||
const FONTS: &[&str] = &["6x13", "7x13", "8x13", "9x15", "9x18", "10x20"];
|
||||
let pos = FONTS.iter().position(|f| *f == ctx.app.ui.font).unwrap_or(2);
|
||||
|
||||
Reference in New Issue
Block a user