// constants (to be removed, for testing only)
// ----------------------------------------------------------------------------
-static const size_t BORDER_THICKNESS = 2;
+static const size_t BORDER_THICKNESS = 1;
// ----------------------------------------------------------------------------
// wxGTKRenderer: draw the GUI elements in GTK style
switch ( border )
{
case wxBORDER_SUNKEN:
- for ( width = 0; width < BORDER_THICKNESS / 2; width++ )
+ for ( width = 0; width < BORDER_THICKNESS; width++ )
{
DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight);
DrawShadedRect(dc, &rect, m_penBlack, m_penLightGrey);
break;
case wxBORDER_STATIC:
- for ( width = 0; width < BORDER_THICKNESS / 2; width++ )
+ for ( width = 0; width < BORDER_THICKNESS; width++ )
{
DrawShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight);
}
break;
case wxBORDER_RAISED:
- for ( width = 0; width < BORDER_THICKNESS / 2; width++ )
+ for ( width = 0; width < BORDER_THICKNESS; width++ )
{
DrawRaisedBorder(dc, &rect);
}
break;
case wxBORDER_DOUBLE:
- for ( width = 0; width < BORDER_THICKNESS / 3; width++ )
+ for ( width = 0; width < BORDER_THICKNESS; width++ )
{
DrawShadedRect(dc, &rect, m_penLightGrey, m_penBlack);
DrawShadedRect(dc, &rect, m_penHighlight, m_penDarkGrey);
{
wxRect rect = rectOrig;
- for ( size_t width = 0; width < BORDER_THICKNESS / 2; width++ )
+ if ( border != wxBORDER_NONE )
{
if ( flags & wxCONTROL_FOCUSED )
{
// button pressed: draw a black border around it and an inward shade
DrawRect(dc, &rect, m_penBlack);
- for ( size_t width = 0; width < BORDER_THICKNESS / 2; width++ )
+ for ( size_t width = 0; width < BORDER_THICKNESS; width++ )
{
DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight);
DrawAntiShadedRect(dc, &rect, m_penBlack, m_penDarkGrey);
}
// now draw a normal button
- for ( size_t width = 0; width < BORDER_THICKNESS / 2; width++ )
+ for ( size_t width = 0; width < BORDER_THICKNESS; width++ )
{
DrawShadedRect(dc, &rect, m_penHighlight, m_penBlack);
DrawAntiShadedRect(dc, &rect,
// text control
// ----------------------------------------------------------------------------
-static const int TEXT_BORDER = 2;
-
wxRect wxGTKRenderer::GetTextTotalArea(const wxTextCtrl *text,
const wxRect& rect)
{
wxRect rectTotal = rect;
- rectTotal.Inflate(TEXT_BORDER);
+ rectTotal.Inflate(2*BORDER_THICKNESS);
return rectTotal;
}
wxCoord *extraSpaceBeyond)
{
wxRect rectText = rect;
- rectText.Inflate(-TEXT_BORDER);
+ rectText.Inflate(-2*BORDER_THICKNESS);
if ( text->WrapLines() )
{