GNOME Bugzilla – Bug 613964
StScrollView: fix scrollbar allocation when one axis is GTK_POLICY_NEVER
Last modified: 2010-03-26 15:07:02 UTC
Currently when allocating an StScrollView's scrollbars, we always leave space for the other scrollbar. This doesn't make sense when the other scrollbar is GTK_POLICY_NEVER. Eg, look at the applications "More" view; the scrollbar starts at the top of the window, but ends sb_height pixels away from the bottom. Patch doesn't change the behavior of GTK_POLICY_AUTOMATIC; we still always leave space for the other scrollbar in that case, even if it's not currently visible.
Created attachment 157119 [details] [review] StScrollView: fix scrollbar allocation when one axis is GTK_POLICY_NEVER
Space isn't meant to be reserved, even in the auto case: /* Fold visibility into the scrollbar sizes to simplify the rest of the computations */ if (!hscrollbar_visible) sb_height = 0; if (!vscrollbar_visible) sb_width = 0; Presumbably there is some bug going on making that not work.
Created attachment 157120 [details] [review] StScrollView: fix scrollbar allocation when one scrollbar isn't shown ah, we just need to do that sooner then
Review of attachment 157120 [details] [review]: Hmm, see the comment above allocating the scrollbars - I think it's OK to just delete some of the comment and give the scrollbars 0xN allocations when they aren't visible.
Created attachment 157158 [details] [review] StScrollView: fix scrollbar allocation when one scrollbar isn't shown
Review of attachment 157158 [details] [review]: Looks good
Attachment 157158 [details] pushed as 3f5bb8f - StScrollView: fix scrollbar allocation when one scrollbar isn't shown