From e7d843ef508c593b6fce55caae4b590db9557855 Mon Sep 17 00:00:00 2001 From: Hendrixx-RE Date: Wed, 11 Mar 2026 02:54:06 +0530 Subject: [PATCH 1/3] [202_107]: Changed graphical selection from blue fill to black border (#2963) --- src/Edit/Interface/edit_repaint.cpp | 36 +++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/src/Edit/Interface/edit_repaint.cpp b/src/Edit/Interface/edit_repaint.cpp index 1f2e914fa0..1c281e9f9d 100644 --- a/src/Edit/Interface/edit_repaint.cpp +++ b/src/Edit/Interface/edit_repaint.cpp @@ -65,13 +65,27 @@ edit_interface_rep::draw_env (renderer ren) { ren->draw_rectangles (env_rects); } if (!is_nil (foc_rects)) { - color col= get_env_color (FOCUS_COLOR); - ren->set_pencil (pencil (col, ren->pixel)); + if (inside_active_graphics ()) { + ren->set_pencil (pencil (black, 2 * ren->pixel)); + rectangles rs = foc_rects; + while (!is_nil (rs)) { + rectangle current = rs->item; + ren->line (current->x1, current->y1, current->x2, current->y1); + ren->line (current->x1, current->y2, current->x2, current->y2); + ren->line (current->x1, current->y1, current->x1, current->y2); + ren->line (current->x2, current->y1, current->x2, current->y2); + rs = rs->next; + } + } + else{ + 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) { @@ -174,14 +188,28 @@ edit_interface_rep::draw_selection (renderer ren, rectangle r) { #endif } if (!is_nil (selection_rects)) { - color col= get_env_color (SELECTION_COLOR); - if (table_selection) col= get_env_color (TABLE_SELECTION_COLOR); + if (inside_active_graphics ()) { + ren->set_pencil (pencil (black, 2 * ren->pixel)); + rectangles rs = selection_rects & visible; + while (!is_nil (rs)) { + rectangle current = rs->item; + ren->line (current->x1, current->y1, current->x2, current->y1); + ren->line (current->x1, current->y2, current->x2, current->y2); + ren->line (current->x1, current->y1, current->x1, current->y2); + ren->line (current->x2, current->y1, current->x2, current->y2); + rs = rs->next; + } + } + else{ + color col= get_env_color (SELECTION_COLOR); + if (table_selection) col= get_env_color (TABLE_SELECTION_COLOR); ren->set_pencil (pencil (col, ren->pixel)); #ifdef QTTEXMACS ren->draw_selection (selection_rects & visible); #else ren->draw_rectangles (selection_rects & visible); #endif + } } draw_image_resize_handles (ren); From 4df3305a1a4e39c4905affad43d68b39f5874533 Mon Sep 17 00:00:00 2001 From: Hendrixx-RE Date: Wed, 11 Mar 2026 03:20:50 +0530 Subject: [PATCH 2/3] added the developer document --- devel/202_112.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 devel/202_112.md diff --git a/devel/202_112.md b/devel/202_112.md new file mode 100644 index 0000000000..3df37c5f91 --- /dev/null +++ b/devel/202_112.md @@ -0,0 +1,14 @@ +# [202_112]: Changed graphical selection from blue fill to black border(#2963) + +### What +Changed the Graphical Window selection color to transparent and its instead indicated by a black border + +### Why +Currently, when a user clicks or selects a graphics canvas, the editor applies a semi-transparent blue fill over the entire area. On large canvases or complex drawings, this fill obscures the content and makes it difficult to see the grid or the objects being edited. + +### How +In `src/Edit/Interface/edit_repaint.cpp`: +1. checks if the current selection is inside_active_graphics(). +2. If true, the standard selection fill is bypassed. +3. Implemented a manual 4-line border drawing using ren->line based on the rectangle's bounding coordinates (x1, y1, x2, y2) instead of the filling + From 17d855422ccd7d06f098c0ae6183e765629214de Mon Sep 17 00:00:00 2001 From: Hendrixx-RE Date: Wed, 11 Mar 2026 03:36:19 +0530 Subject: [PATCH 3/3] Changed the developer.md file name --- devel/{202_112.md => 222_54.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename devel/{202_112.md => 222_54.md} (89%) diff --git a/devel/202_112.md b/devel/222_54.md similarity index 89% rename from devel/202_112.md rename to devel/222_54.md index 3df37c5f91..df0ab89910 100644 --- a/devel/202_112.md +++ b/devel/222_54.md @@ -1,4 +1,4 @@ -# [202_112]: Changed graphical selection from blue fill to black border(#2963) +# [222_54]: Changed graphical selection from blue fill to black border(#2963) ### What Changed the Graphical Window selection color to transparent and its instead indicated by a black border