diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-08-17 11:26:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-17 11:26:05 +0200 |
commit | be42f1bf6cd1fa18321bbd24b77955ddcd535f7e (patch) | |
tree | 2dfc3206e49ed8819b26041f978246eabbe01897 /editor/plugins/canvas_item_editor_plugin.cpp | |
parent | c7a7163dff974fbfaa17ff934e03dea3b5ff9885 (diff) | |
parent | 108f9646f544076708f1b7418960193950cb6208 (diff) |
Merge pull request #31399 from Calinou/box-selection-add-borders
Add an outline to box selection rectangles for better visibility
Diffstat (limited to 'editor/plugins/canvas_item_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 98c2f21e45..cc707dbf44 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -2918,10 +2918,15 @@ void CanvasItemEditor::_draw_selection() { Point2 bsfrom = transform.xform(drag_from); Point2 bsto = transform.xform(box_selecting_to); - VisualServer::get_singleton()->canvas_item_add_rect( - ci, + viewport->draw_rect( Rect2(bsfrom, bsto - bsfrom), - get_color("accent_color", "Editor") * Color(1, 1, 1, 0.375)); + get_color("box_selection_fill_color", "Editor")); + + viewport->draw_rect( + Rect2(bsfrom, bsto - bsfrom), + get_color("box_selection_stroke_color", "Editor"), + false, + Math::round(EDSCALE)); } if (drag_type == DRAG_ROTATE) { |