Opened 16 months ago

Closed 15 months ago

Last modified 15 months ago

#18547 closed bug (fixed)

ShowImage: grey space below status bar after toggling tool bar

Reported by: humdinger Owned by: leavengood
Priority: normal Milestone: R1/beta5
Component: Applications/ShowImage Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

This is hrev57177, 64bit.

  • Open an image
  • Toggle tool bar (ALT+B)

--> A grey area appears below the status bar:

Same happens when viewing in full screen mode and moving the mouse to the upper screen edge to display the tool bar.

Attachments (1)

showimage.png (48.5 KB ) - added by humdinger 16 months ago.

Download all attachments as: .zip

Change History (12)

by humdinger, 16 months ago

Attachment: showimage.png added

comment:1 by waddlesplash, 15 months ago

Milestone: UnscheduledR1/beta5

I don't really understand what's going on here.

The problem occurs at the end of the resize animation: the final update uses ResizeTo instead of ResizeBy (in case there were rounding errors), and it's this that causes everything to go wrong. The "content" view, that the scroll view is contained in, seems to have the correct size, but somehow trying to resize the scroll view to a size derived from this content view goes wrong. It looks like the image view itself may be bigger than the scroll view in normal operation, which looks wrong, but trying to fix that (by using the layout API) just seemed to break other things.

I tried to refactor things to use the layout API, but this seems to break the animation (I'm using SetInsets with negative values to try and animate the toolbar moving) and also the scrollbars randomly disappear outside the view bounds, though resizing usually gets them back. So there's still something wrong. Probably the first problem should be fixed before this is seriously attempted.

comment:2 by waddlesplash, 15 months ago

Is this a regression by any chance?

comment:3 by pulkomandy, 15 months ago

I think there is a related problem in Terminal, sometimes when making the tab bar appear or disappear (closing or opening the second tab), but it only happens rarely and I'm not sure what is the exact conditions for it.

comment:4 by humdinger, 15 months ago

Is this a regression by any chance?

I think so, yes. Though I cannot say when it started...

comment:5 by waddlesplash, 15 months ago

It would probably be useful if that could be determined...

comment:6 by humdinger, 15 months ago

I'll see when I can find the time to try older Haiku images.

in reply to:  3 comment:7 by jmairboeck, 15 months ago

Replying to pulkomandy:

I think there is a related problem in Terminal, sometimes when making the tab bar appear or disappear (closing or opening the second tab), but it only happens rarely and I'm not sure what is the exact conditions for it.

I had this problem in Terminal before when the tab bar was removed. This depends on the window position and possibly the screen and/or window size. In my configuration back then, the Terminal window would increase its size to the top instead of the bottom to not go partially off-screen when adding the tab bar. When the tab bar was removed again, I noticed a gray area at the bottom instead of the window shrinking again.

comment:8 by humdinger, 15 months ago

Alright, finished my binary search. The regression was between hrev57061 and hrev57051. My money would be on BScrollView: Ajust minimum dimensions as little as necessary of hrev57058.

comment:9 by waddlesplash, 15 months ago

It's both that commit and the one to the same file that preceded it causing the problem, it appears.

Last edited 15 months ago by waddlesplash (previous) (diff)

comment:10 by waddlesplash, 15 months ago

Resolution: fixed
Status: newclosed

Fixed in hrev57243.

comment:11 by waddlesplash, 15 months ago

For future reference, the problem was that ShowImage was assuming that BScrollView would only add exactly as much as the scroll bar size to the view, which is not necessarily the case (especially if it's passed a negative frame, which is what was happening here.) BScrollView compensates for this but you can wind up with a scroll view area where the scrollbars are not at the edges of the view because the view itself isn't (in non-layouts mode, anyway.)

Note: See TracTickets for help on using tickets.