mBorderOnlyWidth( 8 ),
mWhitePen( wxColour(255,255,255), 1, wxSOLID ),
- mGrayPen ( wxColour(192,192,192), 1, wxSOLID ),
- mDarkPen ( wxColour(128,128,128), 1, wxSOLID ),
+ mLightPen( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DHIGHLIGHT), 1, wxSOLID),
+ mGrayPen ( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE), 1, wxSOLID ),
+ mDarkPen ( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DSHADOW), 1, wxSOLID ),
mBlackPen( wxColour( 0, 0, 0), 1, wxSOLID ),
// state variables
// layer 1 (upper white)
DrawShadedRect( curX+0, curY+0, xSize-0, ySize-0,
- mWhitePen, mBlackPen, dc );
+ mLightPen, mBlackPen, dc );
// layer 2 (upper gray)
DrawShadedRect( curX+1, curY+1, xSize-2-1, ySize-2-1,
// layer 3 (upper darkGray)
DrawShadedRect( curX+2, curY+2, xSize-3-2, ySize-3-2,
- mDarkPen, mWhitePen, dc );
+ mDarkPen, mLightPen, dc );
// layer 4 (upper black)
DrawShadedRect( curX+3, curY+3, xSize-4-3, ySize-4-3,
dc.DrawLine( curX+1, curY-1, curX+xSize-2, curY-1 );
}
- dc.SetPen( mWhitePen );
+ dc.SetPen( mLightPen );
if ( tabNo == mActiveTab )
dc.DrawLine( curX, curY-2, curX, curY+ySize-2 );
curY + ( ySize - tab.ImgHeight() ) / 2,
tab.ImgWidth(),
tab.ImgHeight(),
- &tmpDc, 0, 0, wxCOPY
+ &tmpDc, 0, 0, wxCOPY,true
);
}
wxFont wxTabbedWindow::GetLabelingFont()
{
+#if 0
wxFont font;
#ifdef __WINDOWS__
font.SetFaceName("MS Sans Serif");
#else
- font.SetFamily( wxSWISS );
+ font.SetFamily( wxDEFAULT );
#endif
- font.SetStyle(40);
- font.SetWeight(40);
+ font.SetStyle(wxNORMAL);
+ font.SetWeight(wxNORMAL);
font.SetPointSize( 8 );
#ifdef __WINDOWS__
#endif
return font;
+#endif
+ return wxSystemSettings::GetSystemFont(wxSYS_SYSTEM_FONT);
}
void wxTabbedWindow::RecalcLayout(bool andRepaint)
void wxTabbedWindow::OnSize ( wxSizeEvent& event )
{
- SetBackgroundColour( wxColour( 192,192,192 ) );
+ SetBackgroundColour( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE) );
RecalcLayout(TRUE);
}
mTabTrianGap(4),
mWhiteBrush( wxColour(255,255,255), wxSOLID ),
- mGrayBrush ( wxColour(192,192,192), wxSOLID ),
+ mGrayBrush ( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE), wxSOLID ),
mCurentRowOfs( 0 ),
mAdjustableTitleRowLen( 300 ),
wxFont wxPaggedWindow::GetLabelingFont()
{
+#if 0
wxFont font;
#ifdef __WINDOWS__
font.SetFaceName("Arial");
#else
- font.SetFamily( wxSWISS );
+ font.SetFamily( wxDEFAULT );
#endif
- font.SetStyle(40);
- font.SetWeight(40);
+ font.SetStyle(wxNORMAL);
+ font.SetWeight(wxNORMAL);
font.SetPointSize( 8 );
#ifdef __WINDOWS__
#endif
return font;
+#endif
+ return wxSystemSettings::GetSystemFont(wxSYS_SYSTEM_FONT);
}
void wxPaggedWindow::OnTabAdded( twTabInfo* pInfo )
y + ( tab.mDims.y - tab.ImgHeight() ) / 2,
tab.ImgWidth(),
tab.ImgHeight(),
- &tmpDc, 0, 0, wxCOPY
+ &tmpDc, 0, 0, wxCOPY,true
);
}
int ySize = height - mVertGap*2;
DrawShadedRect( curX, curY, xSize, ySize,
- mDarkPen, mWhitePen, dc );
+ mDarkPen, mLightPen, dc );
DrawShadedRect( curX+1, curY+1, xSize-2, ySize-2,
mBlackPen, mGrayPen, dc );
{
DrawPaperBar( tab, curX, curY, mWhiteBrush, mBlackPen, tmpDc );
- tmpDc.SetPen( mWhitePen );
+ tmpDc.SetPen( mLightPen );
tmpDc.DrawLine( curX - mTabTrianGap+1, curY,
curX + tab.mDims.x + mTabTrianGap, curY );
curX = mTitleRowLen - 6;
DrawShadedRect( curX+0, 0+0, 6, mTitleHeight, mGrayPen, mBlackPen, tmpDc );
- DrawShadedRect( curX+1, 0+1, 6-2, mTitleHeight-2, mWhitePen, mDarkPen, tmpDc );
+ DrawShadedRect( curX+1, 0+1, 6-2, mTitleHeight-2, mLightPen, mDarkPen, tmpDc );
DrawShadedRect( curX+2, 0+2, 6-4, mTitleHeight-4, mGrayPen, mGrayPen, tmpDc );
// public properties (invoke ReclaclLayout(TRUE) to apply changes)
wxPen mWhitePen; // default: RGB(255,255,255)
- wxPen mGrayPen; // default: RGB(192,192,192)
- wxPen mDarkPen; // default: RGB(128,128,128)
+ wxPen mLightPen; // wxSYS_COLOUR_3DHIGHLIGHT
+ wxPen mGrayPen; // wxSYS_COLOUR_3DFACE
+ wxPen mDarkPen; // wxSYS_COLOUR_3DSHADOW
wxPen mBlackPen; // default: RGB( 0, 0, 0)
int mVertGap; // default: 3
: mpFrame ( NULL ),
mpFrameClient( NULL ),
- mDarkPen ( wxColour(128,128,128), 1, wxSOLID ),
- mLightPen ( wxColour(255,255,255), 1, wxSOLID ),
- mGrayPen ( wxColour(192,192,192), 1, wxSOLID ),
+ mDarkPen ( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DSHADOW), 1, wxSOLID ),
+ mLightPen ( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DHILIGHT), 1, wxSOLID ),
+ mGrayPen ( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE), 1, wxSOLID ),
mBlackPen ( wxColour( 0, 0, 0), 1, wxSOLID ),
- mBorderPen( wxColour(192,192,192), 1, wxSOLID ),
+ mBorderPen( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE), 1, wxSOLID ),
mpPaneInFocus( NULL ),
mpLRUPane ( NULL ),
mpTopPlugin ( NULL ),
mpCaputesInput( NULL ),
- mRecalcPending( TRUE ),
mCheckFocusWhenIdle( FALSE ),
+ mRecalcPending( TRUE ),
mClientWndRefreshPending( FALSE )
{
CreateCursors();
: mpFrame( pParentFrame ),
mpFrameClient(pFrameClient),
- mDarkPen ( wxColour(128,128,128), 1, wxSOLID ),
- mLightPen ( wxColour(255,255,255), 1, wxSOLID ),
- mGrayPen ( wxColour(192,192,192), 1, wxSOLID ),
+ mDarkPen ( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DSHADOW), 1, wxSOLID ),
+ mLightPen ( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DHILIGHT), 1, wxSOLID ),
+ mGrayPen ( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE), 1, wxSOLID ),
mBlackPen ( wxColour( 0, 0, 0), 1, wxSOLID ),
- mBorderPen( wxColour(192,192,192), 1, wxSOLID ),
+ mBorderPen( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE), 1, wxSOLID ),
mpPaneInFocus( NULL ),
mpLRUPane ( NULL ),
// DBG:: set RED color of frame's background for the
// prurpose of tracking engine bugs "visually"
- GetParentFrame().SetBackgroundColour( wxColour(192,192,192) );
+ GetParentFrame().SetBackgroundColour( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE) );
}
mFloatingOn = CanReparent();
// pens for decoration and shades
- wxPen mDarkPen; // default wxColour(128,128,128)
- wxPen mLightPen; // default white
- wxPen mGrayPen; // default wxColour(192,192,192)
+ wxPen mDarkPen; // default wxSYS_COLOUR_3DSHADOW
+ wxPen mLightPen; // default wxSYS_COLOUR_3DHILIGHT
+ wxPen mGrayPen; // default wxSYS_COLOUR_3DFACE
wxPen mBlackPen; // default wxColour( 0, 0, 0)
- wxPen mBorderPen; // default wxColour(128,192,192)
+ wxPen mBorderPen; // default wxSYS_COLOUR_3DFACE
wxPen mNullPen; // transparent pen
{
Create(parent, id, pos, size, style, orientation, RowsOrColumns, name);
- SetBackgroundColour( wxColour(192,192,192) );
+ SetBackgroundColour( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_3DFACE) );
}
bool wxDynamicToolBar::Create(wxWindow *parent, const wxWindowID id,
if ( ! wxWindow::Create(parent, id, pos, size, style, name) )
return FALSE;
- SetBackgroundColour( wxColour( 192,192,192 ) );
+ SetBackgroundColour( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_3DFACE ));
return TRUE;
}
wxColour bgCol;
dc.GetPixel( 0, 0, &bgCol );
- wxPen darkPen ( wxColour(128,128,128),1, wxSOLID );
- wxPen lightPen( wxColour(255,255,255),1, wxSOLID );
+ wxPen darkPen ( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DSHADOW),1, wxSOLID );
+ wxPen lightPen( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DHIGHLIGHT),1, wxSOLID );
wxPen bgPen ( bgCol, 1, wxSOLID );
int* src = create_array( width, height, MASK_BG );
mTextToLabelGap ( textToLabelGap ),
mBlackPen( wxColour( 0, 0, 0), 1, wxSOLID ),
- mDarkPen ( wxColour(128,128,128), 1, wxSOLID ),
- mGrayPen ( wxColour(192,192,192),
- 1, wxSOLID ),
- mLightPen( wxColour(255,255,255), 1, wxSOLID ),
+ mDarkPen ( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DSHADOW), 1, wxSOLID ),
+ mGrayPen ( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE), 1, wxSOLID ),
+ mLightPen( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DHIGHLIGHT), 1, wxSOLID ),
mFiredEventType( firedEventType ),
mIsSticky( isSticky ),
mTextToLabelGap ( 2 ),
mBlackPen( wxColour( 0, 0, 0), 1, wxSOLID ),
- mDarkPen ( wxColour(128,128,128), 1, wxSOLID ),
- mGrayPen ( wxColour(192,192,192),
- 1, wxSOLID ),
- mLightPen( wxColour(255,255,255), 1, wxSOLID ),
+ mDarkPen ( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DSHADOW), 1, wxSOLID ),
+ mGrayPen ( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE), 1, wxSOLID ),
+ mLightPen( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DHIGHLIGHT), 1, wxSOLID ),
mFiredEventType( wxEVT_COMMAND_MENU_SELECTED ),
mIsSticky( FALSE ),
wxMemoryDC srcDc;
srcDc.SelectObject( *srcBmp );
- wxFont fnt( 9, wxDECORATIVE , wxNORMAL, wxNORMAL );
bool hasText = ( mTextAlignment != NB_NO_TEXT ) &&
( mLabelText.length() != 0 );
{
long txtWidth, txtHeight;
- srcDc.SetFont( fnt );
+ srcDc.SetFont( wxSystemSettings::GetSystemFont(wxSYS_SYSTEM_FONT) );
srcDc.GetTextExtent( mLabelText, &txtWidth, &txtHeight );
if ( mTextAlignment == NB_ALIGN_TEXT_RIGHT )
wxMemoryDC destDc;
destDc.SelectObject( *destBmp );
- // FOR NOW:: hard-coded label background
- wxBrush grayBrush( wxColour(192,192,192), wxSOLID );
+ wxBrush grayBrush( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_3DFACE), wxSOLID );
wxPen nullPen( wxColour(0,0,0), 1, wxTRANSPARENT );
destDc.SetBrush( grayBrush );
destDc.Blit( imgPos.x, imgPos.y,
srcBmp->GetWidth()+1,
srcBmp->GetHeight()+1,
- &srcDc, 0,0, wxCOPY );
+ &srcDc, 0,0, wxCOPY,TRUE );
}
if ( hasText )
pTopWnd = pParent;
} while(1);
- destDc.SetFont( fnt );
+ destDc.SetFont( wxSystemSettings::GetSystemFont( wxSYS_SYSTEM_FONT) );
- // FOR NOW:: hard-coded text colors
- destDc.SetTextForeground( wxColour( 0, 0, 0) );
- destDc.SetTextBackground( wxColour(192,192,192) );
+ // Should be wxSYS_COLOUR_BTNTEXT, but gtk gives white?
+ destDc.SetTextForeground( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNTEXT) );
+ destDc.SetTextBackground( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE) );
destDc.DrawText( mLabelText, txtPos.x, txtPos.y );
}