mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 19:20:09 +00:00
Fix extra space in editor's viewport showing big images.
This commit is contained in:
parent
adf18dfb18
commit
c630c950cd
@ -1065,8 +1065,8 @@ void Editor::editor_request_size(int *w, int *h)
|
||||
View* view = View::getView(this);
|
||||
Rect vp = view->getViewportBounds();
|
||||
|
||||
m_offset_x = vp.w - m_sprite->getWidth()/2;
|
||||
m_offset_y = vp.h - m_sprite->getHeight()/2;
|
||||
m_offset_x = std::max<int>(vp.w/2, vp.w - m_sprite->getWidth()/2);
|
||||
m_offset_y = std::max<int>(vp.h/2, 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