@@ -392,32 +392,19 @@ var Notification = class Notification {
392392 _setBodyArea ( text , allowMarkup ) {
393393 if ( text ) {
394394 if ( ! this . _scrollArea ) {
395- /* FIXME: vscroll should be enabled
396- * -vfade covers too much for this size of scrollable
397- * -scrollview min-height is broken inside tray with a scrollview
398- *
399- * TODO: when scrollable:
400- *
401- * applet connects to this signal to enable captured-event passthru so you can grab the scrollbar:
402- * let vscroll = this._scrollArea.get_vscroll_bar();
403- * vscroll.connect('scroll-start', () => { this.emit('scrolling-changed', true) });
404- * vscroll.connect('scroll-stop', () => { this.emit('scrolling-changed', false) });
405- *
406- * `enable_mouse_scrolling` makes it difficult to scroll when there are many notifications
407- * in the tray because most of the area is these smaller scrollviews which capture the event.
408- * ideally, this should only be disabled when the notification is in the tray and there are
409- * many notifications.
410- */
411395 this . _scrollArea = new St . ScrollView ( {
412396 name : 'notification-scrollview' ,
413- vscrollbar_policy : St . PolicyType . NEVER ,
397+ vscrollbar_policy : St . PolicyType . AUTOMATIC ,
414398 hscrollbar_policy : St . PolicyType . NEVER ,
415- enable_mouse_scrolling : false /* ,
416- style_class: 'vfade'*/ } ) ;
399+ enable_mouse_scrolling : true ,
400+ style_class : 'vfade' } ) ;
417401
418402 this . _table . add ( this . _scrollArea , {
419403 row : 1 ,
420- col : 2
404+ col : 2 ,
405+ y_expand : false ,
406+ y_fill : false ,
407+ y_align : St . Align . START
421408 } ) ;
422409
423410 let content = new St . BoxLayout ( {
@@ -463,6 +450,12 @@ var Notification = class Notification {
463450 adjustment . value = adjustment . upper ;
464451 }
465452
453+ setMouseScrolling ( enabled ) {
454+ if ( this . _scrollArea ) {
455+ this . _scrollArea . enable_mouse_scrolling = enabled ;
456+ }
457+ }
458+
466459 _updateLayout ( ) {
467460 if ( this . _imageBin || this . _scrollArea || this . _actionArea ) {
468461 this . _table . add_style_class_name ( 'multi-line-notification' ) ;
@@ -504,7 +497,8 @@ var Notification = class Notification {
504497 x_expand : false ,
505498 y_expand : false ,
506499 x_fill : false ,
507- y_fill : false
500+ y_fill : false ,
501+ y_align : St . Align . START
508502 } ) ;
509503 this . _updateLayout ( ) ;
510504 }
0 commit comments