Drawing improvements for symbol & footprint diffs.

Moves forced-transparency setting down into VIEW_ITEM so that it can
be used to place forced-transparent objects in a different target.
This keeps EnableDepthTest() from equalizing the alpha values between
the two symbols (or two footprints).
This commit is contained in:
Jeff Young
2023-03-11 12:45:16 +00:00
parent 4737e3b8a7
commit c9351dfd67
9 changed files with 58 additions and 31 deletions
+4 -4
View File
@@ -95,12 +95,12 @@ void FOOTPRINT_DIFF_WIDGET::onSlider( wxScrollEvent& aEvent )
else
val = ( pct - 0.5 ) * 2;
m_boardItemCopy->SetForceTransparency( val );
m_boardItemCopy->SetForcedTransparency( val );
m_boardItemCopy->RunOnChildren(
[&]( BOARD_ITEM* child )
{
child->SetForceTransparency( val );
child->SetForcedTransparency( val );
} );
}
@@ -113,12 +113,12 @@ void FOOTPRINT_DIFF_WIDGET::onSlider( wxScrollEvent& aEvent )
else
val = 1.0 - ( pct * 2 );
m_libraryItem->SetForceTransparency( val );
m_libraryItem->SetForcedTransparency( val );
m_libraryItem->RunOnChildren(
[&]( BOARD_ITEM* child )
{
child->SetForceTransparency( val );
child->SetForcedTransparency( val );
} );
}