mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 20:42:21 +00:00
PixelPaint: Inherit from AbstractZoomPanWidget
This commit is contained in:
parent
b21d128075
commit
7974fee800
Notes:
sideshowbarker
2024-07-17 20:55:32 +09:00
Author: https://github.com/mustafaquraish
Commit: 7974fee800
Pull-request: https://github.com/SerenityOS/serenity/pull/11719
Reviewed-by: https://github.com/TobyAsE ✅
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/kleinesfilmroellchen
Reviewed-by: https://github.com/sppmacd
12 changed files with 69 additions and 244 deletions
|
@ -102,7 +102,7 @@ void CloneTool::on_second_paint(Layer const*, GUI::PaintEvent& event)
|
|||
GUI::Painter painter(*m_editor);
|
||||
painter.add_clip_rect(event.rect());
|
||||
|
||||
auto sample_pos = m_editor->image_position_to_editor_position(m_sample_location.value());
|
||||
auto sample_pos = m_editor->content_to_frame_position(m_sample_location.value());
|
||||
// We don't want the marker to be a single pixel and hide the color.
|
||||
auto offset = AK::max(2, size() / 2);
|
||||
Gfx::IntRect rect = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue