mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-11 14:50:11 +00:00
Don't use layer pair in common code
This commit is contained in:
parent
d75c3d5791
commit
c989a7ba83
@ -160,12 +160,12 @@ std::unique_ptr<wxBitmap> LAYER_PRESENTATION::CreateLayerPairIcon( const COLOR4D
|
||||
}
|
||||
|
||||
|
||||
std::unique_ptr<wxBitmap> LAYER_PRESENTATION::CreateLayerPairIcon( const LAYER_PAIR& aPair,
|
||||
int aScale ) const
|
||||
std::unique_ptr<wxBitmap> LAYER_PRESENTATION::CreateLayerPairIcon( int aLeftLayer, int aRightLayer,
|
||||
int aScale ) const
|
||||
{
|
||||
const COLOR4D bgColor = getLayerColor( LAYER_PCB_BACKGROUND );
|
||||
const COLOR4D topColor = getLayerColor( aPair.GetLayerA() );
|
||||
const COLOR4D bottomColor = getLayerColor( aPair.GetLayerB() );
|
||||
const COLOR4D topColor = getLayerColor( aLeftLayer );
|
||||
const COLOR4D bottomColor = getLayerColor( aRightLayer );
|
||||
|
||||
return CreateLayerPairIcon( bgColor, topColor, bottomColor, aScale );
|
||||
}
|
@ -26,7 +26,6 @@
|
||||
|
||||
#include <gal/color4d.h>
|
||||
#include <layer_ids.h>
|
||||
#include "../pcbnew/layer_pairs.h"
|
||||
|
||||
class wxBitmap;
|
||||
|
||||
@ -67,7 +66,8 @@ public:
|
||||
* Create a layer pair "side-by-side swatch" icon for the given
|
||||
* layer pair with the style of this presentation.
|
||||
*/
|
||||
std::unique_ptr<wxBitmap> CreateLayerPairIcon( const LAYER_PAIR& aPair, int aScale ) const;
|
||||
std::unique_ptr<wxBitmap> CreateLayerPairIcon( int aLeftLayer, int aRightLayer,
|
||||
int aScale ) const;
|
||||
};
|
||||
|
||||
#endif // LAYER_PRESENTATION_H
|
||||
|
@ -453,8 +453,9 @@ private:
|
||||
aLayerPairInfo.IsEnabled() ? wxT( "1" ) : wxT( "0" ) );
|
||||
|
||||
// Set the color swatch
|
||||
std::unique_ptr<wxBitmap>& swatch = m_swatches.emplace_back(
|
||||
m_layerPresentation.CreateLayerPairIcon( layerPair, KiIconScale( &m_grid ) ) );
|
||||
std::unique_ptr<wxBitmap>& swatch =
|
||||
m_swatches.emplace_back( m_layerPresentation.CreateLayerPairIcon(
|
||||
layerPair.GetLayerA(), layerPair.GetLayerB(), KiIconScale( &m_grid ) ) );
|
||||
|
||||
m_grid.SetCellRenderer( aRow, (int) COLNUMS::SWATCH,
|
||||
new GRID_CELL_ICON_RENDERER( *swatch ) );
|
||||
|
Loading…
Reference in New Issue
Block a user