[aseprite] 47/250: Fix minor issues drawing transparent scrollbars in Timeline
Tobias Hansen
thansen at moszumanska.debian.org
Sun Dec 20 15:27:10 UTC 2015
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository aseprite.
commit 43b3df52b94fd25d6f51711e40167e696e40bb61
Author: David Capello <davidcapello at gmail.com>
Date: Thu Sep 17 16:06:56 2015 -0300
Fix minor issues drawing transparent scrollbars in Timeline
---
src/app/ui/timeline.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/app/ui/timeline.cpp b/src/app/ui/timeline.cpp
index 61ced18..a2d71d1 100644
--- a/src/app/ui/timeline.cpp
+++ b/src/app/ui/timeline.cpp
@@ -1196,9 +1196,10 @@ void Timeline::getDrawableLayers(ui::Graphics* g, LayerIndex* first_layer, Layer
void Timeline::getDrawableFrames(ui::Graphics* g, frame_t* first_frame, frame_t* last_frame)
{
- *first_frame = frame_t((m_separator_w + getViewScroll().x) / FRMSIZE);
- *last_frame = *first_frame
- + frame_t((getClientBounds().w - m_separator_w) / FRMSIZE);
+ int availW = (getClientBounds().w - m_separator_x);
+
+ *first_frame = frame_t(getViewScroll().x / FRMSIZE);
+ *last_frame = *first_frame + frame_t(availW / FRMSIZE) + ((availW % FRMSIZE) > 0 ? 1: 0);
}
void Timeline::drawPart(ui::Graphics* g, const gfx::Rect& bounds,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git
More information about the Pkg-games-commits
mailing list