Vertically center the color swatch in grid layer selector.

(cherry picked from commit 5f153eef7f)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
This commit is contained in:
dsa-t 2024-05-21 02:35:49 +00:00
parent c248993a84
commit be2f317f6d
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, LAYER_SELECTOR::DrawColorSwatch( bitmap,
cs->GetColor( ToLAYER_ID( LAYER_PCB_BACKGROUND ) ), cs->GetColor( ToLAYER_ID( LAYER_PCB_BACKGROUND ) ),
cs->GetColor( ToLAYER_ID( value ) ) ); 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 // draw the text
PCB_LAYER_ID layer = ToLAYER_ID( value ); PCB_LAYER_ID layer = ToLAYER_ID( value );