After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 613964 - StScrollView: fix scrollbar allocation when one axis is GTK_POLICY_NEVER
StScrollView: fix scrollbar allocation when one axis is GTK_POLICY_NEVER
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-03-25 22:32 UTC by Dan Winship
Modified: 2010-03-26 15:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
StScrollView: fix scrollbar allocation when one axis is GTK_POLICY_NEVER (3.20 KB, patch)
2010-03-25 22:32 UTC, Dan Winship
none Details | Review
StScrollView: fix scrollbar allocation when one scrollbar isn't shown (1.50 KB, patch)
2010-03-25 22:50 UTC, Dan Winship
needs-work Details | Review
StScrollView: fix scrollbar allocation when one scrollbar isn't shown (1.59 KB, patch)
2010-03-26 13:03 UTC, Dan Winship
committed Details | Review

Description Dan Winship 2010-03-25 22:32:27 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.
Comment 1 Dan Winship 2010-03-25 22:32:30 UTC
Created attachment 157119 [details] [review]
StScrollView: fix scrollbar allocation when one axis is GTK_POLICY_NEVER
Comment 2 Owen Taylor 2010-03-25 22:40:53 UTC
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.
Comment 3 Dan Winship 2010-03-25 22:50:00 UTC
Created attachment 157120 [details] [review]
StScrollView: fix scrollbar allocation when one scrollbar isn't shown

ah, we just need to do that sooner then
Comment 4 Owen Taylor 2010-03-25 22:55:56 UTC
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.
Comment 5 Dan Winship 2010-03-26 13:03:28 UTC
Created attachment 157158 [details] [review]
StScrollView: fix scrollbar allocation when one scrollbar isn't shown
Comment 6 Owen Taylor 2010-03-26 15:04:23 UTC
Review of attachment 157158 [details] [review]:

Looks good
Comment 7 Dan Winship 2010-03-26 15:06:58 UTC
Attachment 157158 [details] pushed as 3f5bb8f - StScrollView: fix scrollbar allocation when one scrollbar isn't shown