Backported edit point colour fix from master.
Fixes: lp:1846372 * https://bugs.launchpad.net/kicad/+bug/1846372
This commit is contained in:
parent
fb9b12a982
commit
d4a8ff4872
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* This program source code file is part of KICAD, a free EDA CAD application.
|
* This program source code file is part of KICAD, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2014-2017 CERN
|
* Copyright (C) 2014-2019 CERN
|
||||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
|
@ -23,6 +23,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <gal/graphics_abstraction_layer.h>
|
#include <gal/graphics_abstraction_layer.h>
|
||||||
|
#include <gal/color4d.h>
|
||||||
#include "edit_points.h"
|
#include "edit_points.h"
|
||||||
|
|
||||||
bool EDIT_POINT::WithinPoint( const VECTOR2I& aPoint, unsigned int aSize ) const
|
bool EDIT_POINT::WithinPoint( const VECTOR2I& aPoint, unsigned int aSize ) const
|
||||||
|
@ -241,6 +242,9 @@ void EDIT_POINTS::ViewDraw( int aLayer, KIGFX::VIEW* aView ) const
|
||||||
{
|
{
|
||||||
auto gal = aView->GetGAL();
|
auto gal = aView->GetGAL();
|
||||||
|
|
||||||
|
if( aView->GetGAL()->GetClearColor().GetBrightness() > 0.5 )
|
||||||
|
gal->SetFillColor( KIGFX::COLOR4D( 0, 0, 0, 1.0 ) );
|
||||||
|
else
|
||||||
gal->SetFillColor( KIGFX::COLOR4D( 1.0, 1.0, 1.0, 1.0 ) );
|
gal->SetFillColor( KIGFX::COLOR4D( 1.0, 1.0, 1.0, 1.0 ) );
|
||||||
gal->SetIsFill( true );
|
gal->SetIsFill( true );
|
||||||
gal->SetIsStroke( false );
|
gal->SetIsStroke( false );
|
||||||
|
|
Loading…
Reference in New Issue