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 659159 - scrollbar is faded
scrollbar is faded
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: st
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-09-15 15:51 UTC by William Jon McCann
Modified: 2011-09-19 16:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (86.96 KB, image/png)
2011-09-15 15:51 UTC, William Jon McCann
  Details
st-scroll-view-fade: Add the padding to the scrollbar size (2.66 KB, patch)
2011-09-16 16:34 UTC, drago01
accepted-commit_now Details | Review
st-scroll-view-fade: Take the padding into account when excluding the scrollbar (6.24 KB, patch)
2011-09-16 16:52 UTC, drago01
none Details | Review
st-scroll-view-fade: Pass a precomputed fade area to the shader (6.74 KB, patch)
2011-09-16 17:46 UTC, drago01
none Details | Review
st-scroll-view-fade: Pass a precomputed fade area to the shader (6.55 KB, patch)
2011-09-16 17:52 UTC, drago01
needs-work Details | Review
st-scroll-view-fade: Pass a precomputed fade area to the shader (6.52 KB, patch)
2011-09-16 18:45 UTC, drago01
none Details | Review
scroll-view-sizing: Add tests for padding / borders (2.39 KB, patch)
2011-09-16 19:04 UTC, drago01
committed Details | Review
st-scroll-view-fade: Pass a precomputed fade area to the shader (6.51 KB, patch)
2011-09-17 08:30 UTC, drago01
none Details | Review
st-scroll-view-fade: Pass a precomputed fade area to the shader (6.71 KB, patch)
2011-09-17 15:06 UTC, drago01
needs-work Details | Review
st-scroll-view-fade: Pass a precomputed fade area to the shader (7.23 KB, patch)
2011-09-19 15:54 UTC, drago01
needs-work Details | Review
st-scroll-view-fade: Pass a precomputed fade area to the shader (7.44 KB, patch)
2011-09-19 16:38 UTC, drago01
committed Details | Review

Description William Jon McCann 2011-09-15 15:51:17 UTC
Created attachment 196648 [details]
screenshot

You can see that half of the scrollbar is faded out.
Comment 1 drago01 2011-09-16 16:34:35 UTC
Created attachment 196748 [details] [review]
st-scroll-view-fade: Add the padding to the scrollbar size

We need to take the padding into account otherwise we will end up fading
the scrollbar when padding is present.
Comment 2 Dan Winship 2011-09-16 16:39:34 UTC
Comment on attachment 196748 [details] [review]
st-scroll-view-fade: Add the padding to the scrollbar size

looks right, although it makes the variable name (scrollbar_width) somewhat wrong... it might make more sense to pass in fade_area_width or something instead.
Comment 3 drago01 2011-09-16 16:52:29 UTC
Created attachment 196750 [details] [review]
st-scroll-view-fade: Take the padding into account when excluding the scrollbar

Instead of passing the scrollbar_width/height to the shader compute the faded area (while taking the padding into account) and pass that instead, so we don't
end up fading the scrollbar.
Comment 4 drago01 2011-09-16 17:46:30 UTC
Created attachment 196760 [details] [review]
st-scroll-view-fade: Pass a precomputed fade area to the shader

Instead of doing complex computations in the shader just pass in the correct
fade area (taking padding, scrollbars and rtl into account) and just work
with that in the shader.

That fixes a bug where we would fade the scrollbar when padding is present.
Comment 5 drago01 2011-09-16 17:52:12 UTC
Created attachment 196764 [details] [review]
st-scroll-view-fade: Pass a precomputed fade area to the shader

Instead of doing complex computations in the shader just pass in the correct
fade area (taking padding, scrollbars and rtl into account) and just work
with that in the shader.

That fixes a bug where we would fade the scrollbar when padding is present.

---

Remove cruft ...
Comment 6 Dan Winship 2011-09-16 18:07:30 UTC
Comment on attachment 196764 [details] [review]
st-scroll-view-fade: Pass a precomputed fade area to the shader

shouldn't the height and width variables in the shader be replaced with fade_area references?

hm... and no idea how that affects the x and y computations...

oh, hm, and you need to take borders into account too... you should just use clutter_actor_get_allocation() and st_theme_node_get_content_box().

I'm thinking we should add some stuff to one of the scrolling tests in tests/interactive/ to verify that this all works...
Comment 7 drago01 2011-09-16 18:11:33 UTC
(In reply to comment #6)
> (From update of attachment 196764 [details] [review])
> shouldn't the height and width variables in the shader be replaced with
> fade_area references?
> 
> hm... and no idea how that affects the x and y computations...

No the shader gets the whole texture so I need the whole width/height to be able to compute the current position in pixels (x and y).

> oh, hm, and you need to take borders into account too... you should just use
> clutter_actor_get_allocation() and st_theme_node_get_content_box().

OK.

> I'm thinking we should add some stuff to one of the scrolling tests in
> tests/interactive/ to verify that this all works...

Should I just add padding / borders there or ... ?
Comment 8 drago01 2011-09-16 18:45:29 UTC
Created attachment 196768 [details] [review]
st-scroll-view-fade: Pass a precomputed fade area to the shader

Instead of doing complex computations in the shader just pass in the correct
fade area (taking padding, scrollbars and rtl into account) and just work
with that in the shader.

That fixes a bug where we would fade the scrollbar when padding is present.

---

So this one should be using the correct content_box (and thus fixing the bug).
Still missing the test though.
Comment 9 drago01 2011-09-16 19:04:20 UTC
Created attachment 196770 [details] [review]
scroll-view-sizing: Add tests for padding / borders

Add tests to verify that the fade works fine with borders and
padding.
Comment 10 drago01 2011-09-17 08:30:12 UTC
Created attachment 196791 [details] [review]
st-scroll-view-fade: Pass a precomputed fade area to the shader

Instead of doing complex computations in the shader just pass in the correct
fade area (taking padding, scrollbars and rtl into account) and just work
with that in the shader.

That fixes a bug where we would fade the scrollbar when padding is present.

---

Fix comment.
Comment 11 drago01 2011-09-17 15:06:43 UTC
Created attachment 196806 [details] [review]
st-scroll-view-fade: Pass a precomputed fade area to the shader

Instead of doing complex computations in the shader just pass in the correct
fade area (taking padding, scrollbars and rtl into account) and just work
with that in the shader.

That fixes a bug where we would fade the scrollbar when padding is present.

---

Remove no longer needed / used rtl_uniform.
Comment 12 Dan Winship 2011-09-19 14:19:51 UTC
Comment on attachment 196806 [details] [review]
st-scroll-view-fade: Pass a precomputed fade area to the shader

playing around with scroll-view-sizing:

  - regardless of borders/padding, the shadow overlaps the scrollbar by one
    pixel

  - with borders enabled and padding disabled, the shadow overlaps the left
    border entirely, a top shadow overlaps the top border entirely, and a
    bottom shadow overlaps the bottom border by one pixel.
Comment 13 drago01 2011-09-19 15:54:27 UTC
Created attachment 196958 [details] [review]
st-scroll-view-fade: Pass a precomputed fade area to the shader

Instead of doing complex computations in the shader just pass in the correct
fade area (taking padding, scrollbars and rtl into account) and just work
with that in the shader.

That fixes a bug where we would fade the scrollbar when padding is present.
Comment 14 drago01 2011-09-19 16:13:21 UTC
(In reply to comment #13)
> Created an attachment (id=196958) [details] [review]
> st-scroll-view-fade: Pass a precomputed fade area to the shader
> 
> Instead of doing complex computations in the shader just pass in the correct
> fade area (taking padding, scrollbars and rtl into account) and just work
> with that in the shader.
> 
> That fixes a bug where we would fade the scrollbar when padding is present.

Forgot to add a comment this should fix the issues pointed out in #c12
Comment 15 Dan Winship 2011-09-19 16:20:29 UTC
Comment on attachment 196958 [details] [review]
st-scroll-view-fade: Pass a precomputed fade area to the shader

ok, still one problem that I didn't notice before: when the scrollbar is not at the top of the scroll area, there is a partial shadow (with an abrupt cutoff) at the bottom (in addition to the correct shadow on the top)
Comment 16 drago01 2011-09-19 16:38:27 UTC
Created attachment 196966 [details] [review]
st-scroll-view-fade: Pass a precomputed fade area to the shader

Instead of doing complex computations in the shader just pass in the correct
fade area (taking padding, scrollbars and rtl into account) and just work
with that in the shader.

That fixes a bug where we would fade the scrollbar when padding is present.

---

*) Fix handling of overlapping
Comment 17 drago01 2011-09-19 16:51:36 UTC
Attachment 196770 [details] pushed as 247ad9d - scroll-view-sizing: Add tests for padding / borders
Attachment 196966 [details] pushed as 09fe12d - st-scroll-view-fade: Pass a precomputed fade area to the shader