Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions devel/213_22.md
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions src/Edit/Interface/edit_repaint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/Typeset/Env/env_default.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down