Vertically center the color swatch in grid layer selector.

This commit is contained in:
Alex Shvartzkop 2024-05-21 03:43:36 +03:00
parent 4e306a7d76
commit 5f153eef7f
1 changed files with 3 additions and 1 deletions

View File

@ -76,7 +76,9 @@ void GRID_CELL_LAYER_RENDERER::Draw( wxGrid& aGrid, wxGridCellAttr& aAttr, wxDC&
LAYER_SELECTOR::DrawColorSwatch( bitmap,
cs->GetColor( ToLAYER_ID( LAYER_PCB_BACKGROUND ) ),
cs->GetColor( ToLAYER_ID( value ) ) );
aDC.DrawBitmap( bitmap, rect.GetLeft() + 4, rect.GetTop() + 3, true );
aDC.DrawBitmap( bitmap, rect.GetLeft() + 4,
rect.GetTop() + ( rect.GetHeight() - bitmap.GetHeight() ) / 2, true );
// draw the text
PCB_LAYER_ID layer = ToLAYER_ID( value );