mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
PixelPaint: Don't scale preview thickness for polygonal select tool
This is consistent with other editors and makes it a little easier to precisely select things when zoomed in.
This commit is contained in:
parent
0482190bc8
commit
fccda26ef9
Notes:
sideshowbarker
2024-07-17 20:22:04 +09:00
Author: https://github.com/MacDue Commit: https://github.com/SerenityOS/serenity/commit/fccda26ef9 Pull-request: https://github.com/SerenityOS/serenity/pull/16226
1 changed files with 2 additions and 2 deletions
|
@ -142,12 +142,12 @@ void PolygonalSelectTool::on_second_paint(Layer const* layer, GUI::PaintEvent& e
|
|||
for (size_t i = 0; i < m_polygon_points.size() - 1; i++) {
|
||||
auto preview_start = editor_stroke_position(m_polygon_points.at(i), 1);
|
||||
auto preview_end = editor_stroke_position(m_polygon_points.at(i + 1), 1);
|
||||
painter.draw_line(preview_start, preview_end, Color::Black, AK::max(m_editor->scale(), 1));
|
||||
painter.draw_line(preview_start, preview_end, Color::Black, 1);
|
||||
}
|
||||
|
||||
auto last_line_start = editor_stroke_position(m_polygon_points.at(m_polygon_points.size() - 1), 1);
|
||||
auto last_line_stop = editor_stroke_position(m_last_selecting_cursor_position, 1);
|
||||
painter.draw_line(last_line_start, last_line_stop, Color::Black, AK::max(m_editor->scale(), 1));
|
||||
painter.draw_line(last_line_start, last_line_stop, Color::Black, 1);
|
||||
}
|
||||
|
||||
bool PolygonalSelectTool::on_keydown(GUI::KeyEvent const& key_event)
|
||||
|
|
Loading…
Reference in a new issue