Use grid color for worksheet page borders
This commit is contained in:
parent
5e9e46c7bd
commit
b1fd931251
|
@ -48,6 +48,7 @@ WS_RENDER_SETTINGS::WS_RENDER_SETTINGS()
|
||||||
m_normalColor = RED;
|
m_normalColor = RED;
|
||||||
m_selectedColor = m_normalColor.Brightened( 0.5 );
|
m_selectedColor = m_normalColor.Brightened( 0.5 );
|
||||||
m_brightenedColor = COLOR4D( 0.0, 1.0, 0.0, 0.9 );
|
m_brightenedColor = COLOR4D( 0.0, 1.0, 0.0, 0.9 );
|
||||||
|
m_pageBorderColor = COLOR4D( 0.4, 0.4, 0.4, 1.0 );
|
||||||
|
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
@ -62,6 +63,7 @@ void WS_RENDER_SETTINGS::LoadColors( const COLOR_SETTINGS* aSettings )
|
||||||
m_layerColors[ layer ] = aSettings->GetColor( layer );
|
m_layerColors[ layer ] = aSettings->GetColor( layer );
|
||||||
|
|
||||||
m_backgroundColor = aSettings->GetColor( LAYER_SCHEMATIC_BACKGROUND );
|
m_backgroundColor = aSettings->GetColor( LAYER_SCHEMATIC_BACKGROUND );
|
||||||
|
m_pageBorderColor = aSettings->GetColor( LAYER_SCHEMATIC_GRID );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -370,14 +372,14 @@ void KIGFX::WS_PAINTER::draw( const WS_DRAW_ITEM_PAGE* aItem, int aLayer ) const
|
||||||
m_gal->SetIsStroke( true );
|
m_gal->SetIsStroke( true );
|
||||||
|
|
||||||
// Use a gray color for the border color
|
// Use a gray color for the border color
|
||||||
m_gal->SetStrokeColor( COLOR4D( 0.4, 0.4, 0.4, 1.0 ) );
|
m_gal->SetStrokeColor( m_renderSettings.m_pageBorderColor );
|
||||||
m_gal->SetIsFill( false );
|
m_gal->SetIsFill( false );
|
||||||
m_gal->DrawRectangle( origin, end );
|
m_gal->DrawRectangle( origin, end );
|
||||||
|
|
||||||
// Draw the corner marker
|
// Draw the corner marker
|
||||||
double marker_size = aItem->GetMarkerSize();
|
double marker_size = aItem->GetMarkerSize();
|
||||||
|
|
||||||
m_gal->SetStrokeColor( COLOR4D( 0.4, 0.4, 1.0, 1.0 ) );
|
m_gal->SetStrokeColor( m_renderSettings.m_pageBorderColor );
|
||||||
VECTOR2D pos = VECTOR2D( aItem->GetMarkerPos().x, aItem->GetMarkerPos().y );
|
VECTOR2D pos = VECTOR2D( aItem->GetMarkerPos().x, aItem->GetMarkerPos().y );
|
||||||
|
|
||||||
// Draw a cirle and a X
|
// Draw a cirle and a X
|
||||||
|
@ -397,7 +399,7 @@ void KIGFX::WS_PAINTER::DrawBorder( const PAGE_INFO* aPageInfo, int aScaleFactor
|
||||||
|
|
||||||
m_gal->SetIsStroke( true );
|
m_gal->SetIsStroke( true );
|
||||||
// Use a gray color for the border color
|
// Use a gray color for the border color
|
||||||
m_gal->SetStrokeColor( COLOR4D( 0.4, 0.4, 0.4, 1.0 ) );
|
m_gal->SetStrokeColor( m_renderSettings.m_pageBorderColor );
|
||||||
m_gal->SetIsFill( false );
|
m_gal->SetIsFill( false );
|
||||||
m_gal->DrawRectangle( origin, end );
|
m_gal->DrawRectangle( origin, end );
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,12 +108,13 @@ void WS_PROXY_VIEW_ITEM::ViewDraw( int aLayer, VIEW* aView ) const
|
||||||
gal->Scale( VECTOR2D( -1.0, 1.0 ) );
|
gal->Scale( VECTOR2D( -1.0, 1.0 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
WS_PAINTER ws_painter( gal );
|
WS_PAINTER ws_painter( gal );
|
||||||
WS_RENDER_SETTINGS* ws_settings =static_cast<WS_RENDER_SETTINGS*>( ws_painter.GetSettings() );
|
auto ws_settings = static_cast<WS_RENDER_SETTINGS*>( ws_painter.GetSettings() );
|
||||||
|
|
||||||
ws_settings->SetNormalColor( settings->GetLayerColor( m_colorLayer ) );
|
ws_settings->SetNormalColor( settings->GetLayerColor( m_colorLayer ) );
|
||||||
ws_settings->SetSelectedColor( settings->GetLayerColor( LAYER_SELECT_OVERLAY ) );
|
ws_settings->SetSelectedColor( settings->GetLayerColor( LAYER_SELECT_OVERLAY ) );
|
||||||
ws_settings->SetBrightenedColor( settings->GetLayerColor( LAYER_BRIGHTENED ) );
|
ws_settings->SetBrightenedColor( settings->GetLayerColor( LAYER_BRIGHTENED ) );
|
||||||
|
ws_settings->SetPageBorderColor( settings->GetLayerColor( LAYER_SCHEMATIC_GRID ) );
|
||||||
|
|
||||||
// Draw all the components that make the page layout
|
// Draw all the components that make the page layout
|
||||||
for( WS_DRAW_ITEM_BASE* item = drawList.GetFirst(); item; item = drawList.GetNext() )
|
for( WS_DRAW_ITEM_BASE* item = drawList.GetFirst(); item; item = drawList.GetNext() )
|
||||||
|
|
|
@ -67,6 +67,7 @@ public:
|
||||||
void SetNormalColor( const COLOR4D& aColor ) { m_normalColor = aColor; }
|
void SetNormalColor( const COLOR4D& aColor ) { m_normalColor = aColor; }
|
||||||
void SetSelectedColor( const COLOR4D& aColor ) { m_selectedColor = aColor; }
|
void SetSelectedColor( const COLOR4D& aColor ) { m_selectedColor = aColor; }
|
||||||
void SetBrightenedColor( const COLOR4D& aColor ) { m_brightenedColor = aColor; }
|
void SetBrightenedColor( const COLOR4D& aColor ) { m_brightenedColor = aColor; }
|
||||||
|
void SetPageBorderColor( const COLOR4D& aColor ) { m_pageBorderColor = aColor; }
|
||||||
|
|
||||||
const COLOR4D& GetGridColor() override
|
const COLOR4D& GetGridColor() override
|
||||||
{
|
{
|
||||||
|
@ -87,6 +88,7 @@ private:
|
||||||
|
|
||||||
COLOR4D m_gridColor;
|
COLOR4D m_gridColor;
|
||||||
COLOR4D m_cursorColor;
|
COLOR4D m_cursorColor;
|
||||||
|
COLOR4D m_pageBorderColor;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue