Alter selection area colours based on selection mode

- Left to Right is slightly blue (as current)
- Right to left is slightly green
This commit is contained in:
Oliver Walters 2017-05-05 15:04:29 +10:00 committed by Maciej Suminski
parent c8fe9ffa79
commit 8b49c6e5ed
1 changed files with 7 additions and 0 deletions

View File

@ -29,6 +29,10 @@
using namespace KIGFX::PREVIEW;
// Selection area colours
const COLOR4D SELECT_COLOR_L2R( 0.3, 0.3, 0.5, 0.3 ); // Slight blue
const COLOR4D SELECT_COLOR_R2L( 0.3, 0.5, 0.3, 0.3 ); // Slight green
SELECTION_AREA::SELECTION_AREA()
{
@ -50,6 +54,9 @@ const BOX2I SELECTION_AREA::ViewBBox() const
void SELECTION_AREA::drawPreviewShape( KIGFX::GAL& aGal ) const
{
// Set the fill color based on the direction of selection
aGal.SetFillColor( ( m_origin.x <= m_end.x ) ? SELECT_COLOR_L2R : SELECT_COLOR_R2L );
aGal.DrawRectangle( m_origin, m_end );
}