mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 01:59:31 +00:00
parent
6d55e0572d
commit
451cba8b47
Notes:
sideshowbarker
2024-07-18 04:14:17 +09:00
Author: https://github.com/mustafaquraish
Commit: 451cba8b47
Pull-request: https://github.com/SerenityOS/serenity/pull/9974
Issue: https://github.com/SerenityOS/serenity/issues/9971
Reviewed-by: https://github.com/Granddave ✅
Reviewed-by: https://github.com/TobyAsE
1 changed files with 2 additions and 2 deletions
|
@ -88,8 +88,8 @@ void ImageEditor::paint_event(GUI::PaintEvent& event)
|
||||||
|
|
||||||
const float pixel_grid_threshold = 15.0f;
|
const float pixel_grid_threshold = 15.0f;
|
||||||
if (m_show_pixel_grid && m_scale > pixel_grid_threshold) {
|
if (m_show_pixel_grid && m_scale > pixel_grid_threshold) {
|
||||||
auto grid_rect = m_editor_image_rect.intersected(event.rect());
|
auto event_image_rect = enclosing_int_rect(editor_rect_to_image_rect(event.rect())).inflated(1, 1);
|
||||||
auto image_rect = enclosing_int_rect(editor_rect_to_image_rect(grid_rect)).inflated(1, 1);
|
auto image_rect = m_image->rect().inflated(1, 1).intersected(event_image_rect);
|
||||||
|
|
||||||
for (auto i = image_rect.left(); i < image_rect.right(); i++) {
|
for (auto i = image_rect.left(); i < image_rect.right(); i++) {
|
||||||
auto start_point = image_position_to_editor_position({ i, image_rect.top() }).to_type<int>();
|
auto start_point = image_position_to_editor_position({ i, image_rect.top() }).to_type<int>();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue