* Fixed #3042 as suggested by Stippi (looks like I'm quickly following Ingo's
great example at getting senile - at least he told me about this solution before; the same trick is already used in SetZoom()). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39527 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -376,8 +376,7 @@ ShowImageView::SetImage(const entry_ref* ref, BBitmap* bitmap)
|
|||||||
// prepare the display bitmap
|
// prepare the display bitmap
|
||||||
if (fBitmap->ColorSpace() == B_RGBA32)
|
if (fBitmap->ColorSpace() == B_RGBA32)
|
||||||
fDisplayBitmap = compose_checker_background(fBitmap);
|
fDisplayBitmap = compose_checker_background(fBitmap);
|
||||||
|
if (fDisplayBitmap == NULL)
|
||||||
if (!fDisplayBitmap)
|
|
||||||
fDisplayBitmap = fBitmap;
|
fDisplayBitmap = fBitmap;
|
||||||
|
|
||||||
BNode node(ref);
|
BNode node(ref);
|
||||||
@@ -1210,23 +1209,12 @@ ShowImageView::_ScrollRestricted(float x, float y, bool absolute)
|
|||||||
if (y != 0)
|
if (y != 0)
|
||||||
y = _LimitToRange(y, B_VERTICAL, absolute);
|
y = _LimitToRange(y, B_VERTICAL, absolute);
|
||||||
|
|
||||||
// hide the caption when using mouse wheel
|
// We invalidate before we scroll to avoid the caption messing up the
|
||||||
// in full screen mode
|
// image, and to prevent it from flickering
|
||||||
// to prevent the caption from dirtying up the image
|
if (fShowCaption)
|
||||||
// during scrolling.
|
Invalidate();
|
||||||
bool caption = fShowCaption;
|
|
||||||
if (caption) {
|
|
||||||
fShowCaption = false;
|
|
||||||
_UpdateCaption();
|
|
||||||
}
|
|
||||||
|
|
||||||
ScrollBy(x, y);
|
ScrollBy(x, y);
|
||||||
|
|
||||||
if (caption) {
|
|
||||||
// show the caption again
|
|
||||||
fShowCaption = true;
|
|
||||||
_UpdateCaption();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user