Gradient fill splitter window sash. This won't
look good in brushed metal theme.. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -244,11 +244,40 @@ wxRendererMac::DrawSplitterSash(wxWindow *win,
|
|||||||
// a brushed metal one as they look quite differently... this is
|
// a brushed metal one as they look quite differently... this is
|
||||||
// completely bogus anyhow, of course (TODO)
|
// completely bogus anyhow, of course (TODO)
|
||||||
|
|
||||||
|
#if 0
|
||||||
dc.SetPen(*wxLIGHT_GREY_PEN);
|
dc.SetPen(*wxLIGHT_GREY_PEN);
|
||||||
dc.SetBrush(*wxWHITE_BRUSH);
|
dc.SetBrush(*wxWHITE_BRUSH);
|
||||||
if ( orient == wxVERTICAL )
|
if ( orient == wxVERTICAL )
|
||||||
dc.DrawRectangle(position, 0, 7, size.y);
|
dc.DrawRectangle(position, 0, 7, size.y);
|
||||||
else
|
else
|
||||||
dc.DrawRectangle(0, position, size.x, 7);
|
dc.DrawRectangle(0, position, size.x, 7);
|
||||||
|
#else
|
||||||
|
// Do the gradient fill:
|
||||||
|
static int grayValues[] =
|
||||||
|
{
|
||||||
|
0xA0, 0xF6, 0xED, 0xE4, 0xE2, 0xD0, 0xA0
|
||||||
|
};
|
||||||
|
dc.SetBrush( *wxTRANSPARENT_BRUSH );
|
||||||
|
if ( orient == wxVERTICAL )
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i=0; i < (int)WXSIZEOF(grayValues); i++)
|
||||||
|
{
|
||||||
|
dc.SetPen( wxPen( wxColour( grayValues[i] , grayValues[i] , grayValues[i] ),
|
||||||
|
1 , wxSOLID ) );
|
||||||
|
dc.DrawRectangle( position+i, 0, 1, size.y );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i=0; i < (int)WXSIZEOF(grayValues); i++)
|
||||||
|
{
|
||||||
|
dc.SetPen( wxPen( wxColour( grayValues[i] , grayValues[i] , grayValues[i] ),
|
||||||
|
1 , wxSOLID ) );
|
||||||
|
dc.DrawRectangle( 0, position+i, size.x, 1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -244,11 +244,40 @@ wxRendererMac::DrawSplitterSash(wxWindow *win,
|
|||||||
// a brushed metal one as they look quite differently... this is
|
// a brushed metal one as they look quite differently... this is
|
||||||
// completely bogus anyhow, of course (TODO)
|
// completely bogus anyhow, of course (TODO)
|
||||||
|
|
||||||
|
#if 0
|
||||||
dc.SetPen(*wxLIGHT_GREY_PEN);
|
dc.SetPen(*wxLIGHT_GREY_PEN);
|
||||||
dc.SetBrush(*wxWHITE_BRUSH);
|
dc.SetBrush(*wxWHITE_BRUSH);
|
||||||
if ( orient == wxVERTICAL )
|
if ( orient == wxVERTICAL )
|
||||||
dc.DrawRectangle(position, 0, 7, size.y);
|
dc.DrawRectangle(position, 0, 7, size.y);
|
||||||
else
|
else
|
||||||
dc.DrawRectangle(0, position, size.x, 7);
|
dc.DrawRectangle(0, position, size.x, 7);
|
||||||
|
#else
|
||||||
|
// Do the gradient fill:
|
||||||
|
static int grayValues[] =
|
||||||
|
{
|
||||||
|
0xA0, 0xF6, 0xED, 0xE4, 0xE2, 0xD0, 0xA0
|
||||||
|
};
|
||||||
|
dc.SetBrush( *wxTRANSPARENT_BRUSH );
|
||||||
|
if ( orient == wxVERTICAL )
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i=0; i < (int)WXSIZEOF(grayValues); i++)
|
||||||
|
{
|
||||||
|
dc.SetPen( wxPen( wxColour( grayValues[i] , grayValues[i] , grayValues[i] ),
|
||||||
|
1 , wxSOLID ) );
|
||||||
|
dc.DrawRectangle( position+i, 0, 1, size.y );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i=0; i < (int)WXSIZEOF(grayValues); i++)
|
||||||
|
{
|
||||||
|
dc.SetPen( wxPen( wxColour( grayValues[i] , grayValues[i] , grayValues[i] ),
|
||||||
|
1 , wxSOLID ) );
|
||||||
|
dc.DrawRectangle( 0, position+i, size.x, 1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user