@@ -217,14 +217,16 @@ export class FeatherGrid extends Widget {
217217 this . _defaultRenderer = new TextRenderer ( {
218218 font : '12px sans-serif' ,
219219 textColor : Theme . getFontColor ( ) ,
220- backgroundColor : Theme . getBackgroundColor ( ) ,
220+ backgroundColor :
221+ this . grid . style . backgroundColor || Theme . getBackgroundColor ( ) ,
221222 horizontalAlignment : 'center' ,
222223 verticalAlignment : 'center' ,
223224 } ) ;
224225
225226 this . _rowHeaderRenderer = new TextRenderer ( {
226227 textColor : Theme . getFontColor ( 1 ) ,
227- backgroundColor : Theme . getBackgroundColor ( 2 ) ,
228+ backgroundColor :
229+ this . grid . style . headerBackgroundColor || Theme . getBackgroundColor ( 2 ) ,
228230 horizontalAlignment : 'center' ,
229231 verticalAlignment : 'center' ,
230232 } ) ;
@@ -392,15 +394,17 @@ export class FeatherGrid extends Widget {
392394 set columnHeaderRenderer ( renderer : CellRenderer ) {
393395 const textRenderer = renderer as TextRenderer ;
394396
395- // Need to create a HeadeRenderer object as TextRenderer
396- // objects do not support merged cell rendering.
397+ // HeaderRenderer adds the filter dialogue box overlay
397398 this . _columnHeaderRenderer = new HeaderRenderer ( {
398399 textOptions : {
399400 font : textRenderer . font ,
400401 wrapText : textRenderer . wrapText ,
401402 elideDirection : textRenderer . elideDirection ,
402403 textColor : textRenderer . textColor ,
403- backgroundColor : textRenderer . backgroundColor ,
404+ backgroundColor :
405+ this . grid . style . headerBackgroundColor ||
406+ textRenderer . backgroundColor ||
407+ Theme . getBackgroundColor ( ) ,
404408 verticalAlignment : textRenderer . verticalAlignment ,
405409 horizontalAlignment : textRenderer . horizontalAlignment ,
406410 format : textRenderer . format ,
@@ -492,7 +496,6 @@ export class FeatherGrid extends Widget {
492496 this . grid . copyToClipboard = this . copyToClipboard . bind ( this . grid ) ;
493497
494498 this . grid . dataModel = this . _dataModel ;
495- //@ts -ignore **added so we can remove basickeyhandler.ts from fork
496499 this . grid . keyHandler = new KeyHandler ( ) ;
497500 const mouseHandler = new FeatherGridMouseHandler ( this ) ;
498501 mouseHandler . cellClicked . connect (
@@ -512,15 +515,14 @@ export class FeatherGrid extends Widget {
512515 } ) ;
513516 } ,
514517 ) ;
515- // @ts -ignore added so we don't have to add basicmousehandler.ts fork
518+
516519 this . grid . mouseHandler = mouseHandler ;
517520 this . grid . selectionModel = this . _selectionModel ;
518521 this . grid . editingEnabled = this . _editable ;
519522
520523 this . updateGridStyle ( ) ;
521524 this . _updateGridRenderers ( ) ;
522525 this . _updateColumnWidths ( ) ;
523- this . setGridStyle ( ) ;
524526 }
525527
526528 public setGridStyle ( ) {
@@ -557,7 +559,7 @@ export class FeatherGrid extends Widget {
557559 selectionFillColor :
558560 this . grid . style . selectionFillColor || Theme . getBrandColor ( 2 , 0.4 ) ,
559561 selectionBorderColor :
560- this . grid . style . headerSelectionBorderColor || Theme . getBrandColor ( 1 ) ,
562+ this . grid . style . selectionBorderColor || Theme . getBrandColor ( 1 ) ,
561563 headerSelectionFillColor :
562564 this . grid . style . headerSelectionFillColor ||
563565 Theme . getBackgroundColor ( 3 , 0.4 ) ,
@@ -572,37 +574,39 @@ export class FeatherGrid extends Widget {
572574 }
573575
574576 public updateGridStyle ( ) {
577+ this . setGridStyle ( ) ;
575578 this . _updateHeaderRenderer ( ) ;
576579
577580 if ( ! this . _defaultRendererSet ) {
578- this . _defaultRenderer = new TextRenderer ( {
581+ this . defaultRenderer = new TextRenderer ( {
579582 font : '12px sans-serif' ,
580583 textColor : Theme . getFontColor ( ) ,
581- backgroundColor : Theme . getBackgroundColor ( ) ,
584+ backgroundColor :
585+ this . grid . style . backgroundColor || Theme . getBackgroundColor ( ) ,
582586 horizontalAlignment : 'left' ,
583587 verticalAlignment : 'center' ,
584588 } ) ;
585589 }
586590
587591 this . _rowHeaderRenderer = new TextRenderer ( {
588592 textColor : Theme . getFontColor ( 1 ) ,
589- backgroundColor : Theme . getBackgroundColor ( 2 ) ,
593+ backgroundColor :
594+ this . grid . style . headerBackgroundColor || Theme . getBackgroundColor ( 2 ) ,
590595 horizontalAlignment : 'center' ,
591596 verticalAlignment : 'center' ,
592597 } ) ;
593598
594599 this . _columnHeaderRenderer = new HeaderRenderer ( {
595600 textOptions : {
596601 textColor : Theme . getFontColor ( 1 ) ,
597- backgroundColor : Theme . getBackgroundColor ( 2 ) ,
602+ backgroundColor :
603+ this . grid . style . headerBackgroundColor || Theme . getBackgroundColor ( 2 ) ,
598604 horizontalAlignment : 'left' ,
599605 verticalAlignment : 'center' ,
600606 } ,
601607 isLightTheme : this . _isLightTheme ,
602608 grid : this . grid ,
603609 } ) ;
604-
605- this . setGridStyle ( ) ;
606610 }
607611
608612 copyToClipboard ( ) : void {
0 commit comments