mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 19:20:09 +00:00
Fix Editor::editor_request_size() to return more viewport space (at least 1/4 of sprite is visible).
This commit is contained in:
parent
1526e30f4c
commit
7ca8ed8688
@ -1033,8 +1033,8 @@ void Editor::editor_request_size(int *w, int *h)
|
||||
View* view = View::getView(this);
|
||||
Rect vp = view->getViewportBounds();
|
||||
|
||||
m_offset_x = vp.w/2 - 1;
|
||||
m_offset_y = vp.h/2 - 1;
|
||||
m_offset_x = vp.w - m_sprite->getWidth()/2;
|
||||
m_offset_y = vp.h - m_sprite->getHeight()/2;
|
||||
|
||||
*w = (m_sprite->getWidth() << m_zoom) + m_offset_x*2;
|
||||
*h = (m_sprite->getHeight() << m_zoom) + m_offset_y*2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user