@@ -392,32 +392,20 @@ 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' // Looks a bit bad with some themes
401+ } ) ;
417402
418403 this . _table . add ( this . _scrollArea , {
419404 row : 1 ,
420- col : 2
405+ col : 2 ,
406+ y_expand : false ,
407+ y_fill : false ,
408+ y_align : St . Align . START
421409 } ) ;
422410
423411 let content = new St . BoxLayout ( {
@@ -463,6 +451,12 @@ var Notification = class Notification {
463451 adjustment . value = adjustment . upper ;
464452 }
465453
454+ setMouseScrolling ( enabled ) {
455+ if ( this . _scrollArea ) {
456+ this . _scrollArea . enable_mouse_scrolling = enabled ;
457+ }
458+ }
459+
466460 _updateLayout ( ) {
467461 if ( this . _imageBin || this . _scrollArea || this . _actionArea ) {
468462 this . _table . add_style_class_name ( 'multi-line-notification' ) ;
@@ -504,7 +498,8 @@ var Notification = class Notification {
504498 x_expand : false ,
505499 y_expand : false ,
506500 x_fill : false ,
507- y_fill : false
501+ y_fill : false ,
502+ y_align : St . Align . START
508503 } ) ;
509504 this . _updateLayout ( ) ;
510505 }
0 commit comments