mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 18:23:15 +02:00
eeschema: Set modifying transparency on edits
While modifying elements in eeschema/libedit, they are overdrawn on the rest of the schematic. This prevents alignment with existing elements as the underlying elements are not visible. We set a slight transparency on elements while being modified to allow the user to view existing elements at the same time. Fixes: lp:1817233 * https://bugs.launchpad.net/kicad/+bug/1817233
This commit is contained in:
parent
d36fbba1f3
commit
f002382b4a
@ -300,6 +300,10 @@ bool SCH_PAINTER::setColors( const LIB_ITEM* aItem, int aLayer )
|
|||||||
{
|
{
|
||||||
COLOR4D color = getOverlayColor( aItem, m_schSettings.GetLayerColor( LAYER_DEVICE_BACKGROUND ), true );
|
COLOR4D color = getOverlayColor( aItem, m_schSettings.GetLayerColor( LAYER_DEVICE_BACKGROUND ), true );
|
||||||
|
|
||||||
|
// These actions place the item over others, so allow a modest transparency here
|
||||||
|
if( aItem->IsMoving() || aItem->IsDragging() || aItem->IsResized() )
|
||||||
|
color = color.WithAlpha( 0.75 );
|
||||||
|
|
||||||
m_gal->SetIsFill( true );
|
m_gal->SetIsFill( true );
|
||||||
m_gal->SetFillColor( color );
|
m_gal->SetFillColor( color );
|
||||||
|
|
||||||
@ -310,6 +314,10 @@ bool SCH_PAINTER::setColors( const LIB_ITEM* aItem, int aLayer )
|
|||||||
{
|
{
|
||||||
COLOR4D color = getOverlayColor( aItem, m_schSettings.GetLayerColor( LAYER_DEVICE ), false );
|
COLOR4D color = getOverlayColor( aItem, m_schSettings.GetLayerColor( LAYER_DEVICE ), false );
|
||||||
|
|
||||||
|
// These actions place the item over others, so allow a modest transparency here
|
||||||
|
if( aItem->IsMoving() || aItem->IsDragging() || aItem->IsResized() )
|
||||||
|
color = color.WithAlpha( 0.75 );
|
||||||
|
|
||||||
m_gal->SetIsStroke( true );
|
m_gal->SetIsStroke( true );
|
||||||
m_gal->SetStrokeColor( color );
|
m_gal->SetStrokeColor( color );
|
||||||
m_gal->SetLineWidth( aItem->GetPenSize() );
|
m_gal->SetLineWidth( aItem->GetPenSize() );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user