diff --git a/devel/213_22.md b/devel/213_22.md new file mode 100644 index 0000000000..39147f327e --- /dev/null +++ b/devel/213_22.md @@ -0,0 +1,9 @@ +# [213_22] Replace focus border with translucent background + +Issue: https://github.com/MoganLab/mogan/issues/2759 + +Replace the cyan border (`#0ff`) used to indicate focused structures (tables, math formulas, etc.) with a translucent background fill, improving visual clarity and reducing distraction. + +## Changes +- `src/Typeset/Env/env_default.cpp`: Changed `FOCUS_COLOR` from `#0ff` (opaque cyan border) to `#0ff1a` (translucent cyan background) +- `src/Edit/Interface/edit_repaint.cpp`: Changed `draw_rectangles` to `draw_selection` for `foc_rects` rendering under Qt, which uses fill instead of border drawing diff --git a/src/Edit/Interface/edit_repaint.cpp b/src/Edit/Interface/edit_repaint.cpp index 797f1248dc..1f2e914fa0 100644 --- a/src/Edit/Interface/edit_repaint.cpp +++ b/src/Edit/Interface/edit_repaint.cpp @@ -67,7 +67,11 @@ edit_interface_rep::draw_env (renderer ren) { if (!is_nil (foc_rects)) { color col= get_env_color (FOCUS_COLOR); ren->set_pencil (pencil (col, ren->pixel)); +#ifdef QTTEXMACS + ren->draw_selection (foc_rects); +#else ren->draw_rectangles (foc_rects); +#endif } if (!is_nil (sem_rects)) { if (sem_correct) { diff --git a/src/Typeset/Env/env_default.cpp b/src/Typeset/Env/env_default.cpp index 910f1f9f7e..9e70628e7c 100644 --- a/src/Typeset/Env/env_default.cpp +++ b/src/Typeset/Env/env_default.cpp @@ -59,7 +59,7 @@ initialize_default_env () { env (CURSOR_COLOR) = "#000000"; // cursor color in user interface env (MATH_CURSOR_COLOR) = "#b0f"; // cursor color in math mode - env (FOCUS_COLOR) = "#0ff"; // color of focus rectangles + env (FOCUS_COLOR) = "#0ff1a"; // color of focus background env (CONTEXT_COLOR) = "#00555518"; // color of context rectangles env (SELECTION_COLOR) = "#2d69f033"; // color of selections env (TABLE_SELECTION_COLOR)= "#50f3"; // color of selections of table cells