mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-14 04:19:12 +00:00
Fix scrollable Timeline area to avoid hiding all layers
This commit is contained in:
parent
03c74ceeb7
commit
ae2acf62f7
@ -2317,8 +2317,8 @@ gfx::Size Timeline::getScrollableSize() const
|
||||
{
|
||||
if (m_sprite) {
|
||||
return gfx::Size(
|
||||
m_sprite->totalFrames() * FRMSIZE + bounds().w/2,
|
||||
m_layers.size() * LAYSIZE + bounds().h/2);
|
||||
m_sprite->totalFrames() * FRMSIZE + getCelsBounds().w/2,
|
||||
m_layers.size() * LAYSIZE + LAYSIZE);
|
||||
}
|
||||
else
|
||||
return gfx::Size(0, 0);
|
||||
@ -2328,8 +2328,8 @@ gfx::Point Timeline::getMaxScrollablePos() const
|
||||
{
|
||||
if (m_sprite) {
|
||||
gfx::Size size = getScrollableSize();
|
||||
int max_scroll_x = size.w - bounds().w/2;
|
||||
int max_scroll_y = size.h - bounds().h/2;
|
||||
int max_scroll_x = size.w - getCelsBounds().w + 1*guiscale();
|
||||
int max_scroll_y = size.h - getCelsBounds().h + 1*guiscale();
|
||||
max_scroll_x = MAX(0, max_scroll_x);
|
||||
max_scroll_y = MAX(0, max_scroll_y);
|
||||
return gfx::Point(max_scroll_x, max_scroll_y);
|
||||
|
Loading…
x
Reference in New Issue
Block a user