st-scroll-view: Make the fade effect and offset themable

Theme authors now have the power (and responsibility) of creating fade
effects with the new CSS length property '-st-fade-offset'. A value of
0 disables the effect.

This new CSS approach replaces the current programmatic toggle of
the 'vfade' property. A new CSS style class name 'vfade' is used as
a replacement for the old property.

https://bugzilla.gnome.org/show_bug.cgi?id=651813
This commit is contained in:
Jasper St. Pierre
2011-06-03 17:44:57 -04:00
parent 31bde574de
commit e7289378b7
8 changed files with 41 additions and 46 deletions

View File

@ -338,7 +338,7 @@ function toggleFade(button) {
button.label = 'No';
break;
}
scrollView.set_vfade(vfade.label == 'Yes');
scrollView.set_style_class_name(button.label == 'Yes' ? 'vfade' : '');
}
vfade.connect('clicked', function() { toggleFade(vfade); });