@@ -503,13 +503,48 @@ function buildContextMenu(
503
503
504
504
export default [ extension ] ;
505
505
506
+ export const SIZES = {
507
+ rowHeight : 21 ,
508
+ columnWidth : 100 ,
509
+ rowHeaderWidth : 60 ,
510
+ columnHeaderHeight : 24
511
+ } ;
512
+
513
+ const DATATYPE_ICON_SIZE = 15 ;
514
+
506
515
const DATATYPE_ICON = {
507
516
colorLight : '#1e88e5' ,
508
517
colorDark : '#2196f3' ,
509
518
position : {
510
- size : 16 ,
519
+ size : DATATYPE_ICON_SIZE ,
511
520
left : 2 ,
512
- top : 10
521
+ top : SIZES . columnHeaderHeight / 2 - DATATYPE_ICON_SIZE / 2 + 1 / 2
522
+ }
523
+ } ;
524
+
525
+ const GHOST_COLUMN_ICON_SIZE = 16 ;
526
+
527
+ const GHOST_COLUMN_ICON = {
528
+ colorLight : '#616161' ,
529
+ colorDark : '#bdbdbd' ,
530
+ position : {
531
+ size : GHOST_COLUMN_ICON_SIZE ,
532
+ // To center.
533
+ left : SIZES . columnWidth / 2 - GHOST_COLUMN_ICON_SIZE / 2 ,
534
+ top : SIZES . columnHeaderHeight / 2 - GHOST_COLUMN_ICON_SIZE / 2
535
+ }
536
+ } ;
537
+
538
+ const GHOST_ROW_ICON_SIZE = 12 ;
539
+
540
+ const GHOST_ROW_ICON = {
541
+ colorLight : '#616161' ,
542
+ colorDark : '#bdbdbd' ,
543
+ position : {
544
+ size : GHOST_ROW_ICON_SIZE ,
545
+ // To center.
546
+ left : SIZES . rowHeaderWidth / 2 - GHOST_ROW_ICON_SIZE / 2 ,
547
+ top : SIZES . rowHeight / 2 - GHOST_ROW_ICON_SIZE / 2
513
548
}
514
549
} ;
515
550
@@ -519,17 +554,13 @@ export const LIGHT_EXTRA_STYLE: PaintedGrid.ExtraStyle = {
519
554
icons : {
520
555
'ghost-column' : {
521
556
icon : addIcon ,
522
- color : '#616161' ,
523
- size : 18 ,
524
- left : 63 /* set to columnWidth / 2 - size / 2 to make centered */ ,
525
- top : 9 /* set to columnHeaderHeight / 2 - size / 2 to make centered */
557
+ color : GHOST_COLUMN_ICON . colorLight ,
558
+ ...GHOST_COLUMN_ICON . position
526
559
} ,
527
560
'ghost-row' : {
528
561
icon : addIcon ,
529
- color : '#616161' ,
530
- size : 12 ,
531
- left : 26 /* set to rowHeaderWidth / 2 - size / 2 to make centered */ ,
532
- top : 6 /* set to rowHeight / 2 - size / 2 to make centered. */
562
+ color : GHOST_ROW_ICON . colorLight ,
563
+ ...GHOST_ROW_ICON . position
533
564
} ,
534
565
string : {
535
566
icon : new LabIcon ( { name : 'tde:string' , svgstr : stringSvgString } ) ,
@@ -567,17 +598,13 @@ export const DARK_EXTRA_STYLE: PaintedGrid.ExtraStyle = {
567
598
icons : {
568
599
'ghost-column' : {
569
600
icon : addIcon ,
570
- color : '#bdbdbd' ,
571
- size : 18 ,
572
- left : 63 /* set to columnWidth / 2 - size / 2 to make centered */ ,
573
- top : 9 /* set to columnHeaderHeight / 2 - size / 2 to make centered */
601
+ color : GHOST_COLUMN_ICON . colorDark ,
602
+ ...GHOST_COLUMN_ICON . position
574
603
} ,
575
604
'ghost-row' : {
576
605
icon : addIcon ,
577
- color : '#bdbdbd' ,
578
- size : 12 ,
579
- left : 26 /* set to rowHeaderWidth / 2 - size / 2 to make centered */ ,
580
- top : 6 /* set to rowHeight / 2 - size / 2 to make centered. */
606
+ color : GHOST_ROW_ICON . colorDark ,
607
+ ...GHOST_ROW_ICON . position
581
608
} ,
582
609
string : {
583
610
icon : new LabIcon ( { name : 'tde:string' , svgstr : stringSvgString } ) ,
@@ -649,7 +676,7 @@ namespace Private {
649
676
textColor : '#111111' ,
650
677
matchBackgroundColor : '#FAE480' ,
651
678
currentMatchBackgroundColor : '#F5C800' ,
652
- horizontalAlignment : 'center '
679
+ horizontalAlignment : 'left '
653
680
} ;
654
681
655
682
/**
@@ -659,7 +686,7 @@ namespace Private {
659
686
textColor : '#F5F5F5' ,
660
687
matchBackgroundColor : 'rgba(0, 84, 168, 0.5)' ,
661
688
currentMatchBackgroundColor : '#0055AA' ,
662
- horizontalAlignment : 'center '
689
+ horizontalAlignment : 'left '
663
690
} ;
664
691
}
665
692
0 commit comments