static const int FRAME_BUTTON_WIDTH = 16;
static const int FRAME_BUTTON_HEIGHT = 14;
+// the margin between listbox item text and its rectangle
+static const int ITEM_MARGIN = 1;
+
// ============================================================================
// wxStdRenderer implementation
// ============================================================================
wxCoord wxStdRenderer::GetListboxItemHeight(wxCoord fontHeight)
{
- return fontHeight + 2;
+ return fontHeight + 2*ITEM_MARGIN;
}
void wxStdRenderer::DrawTextBorder(wxDC& dc,
dc.DrawRectangle(rect);
}
+ // horizontal adjustment is arbitrary
wxRect rectText = rect;
- rectText.x += 2;
- rectText.width -= 2;
+ rectText.Deflate(2, ITEM_MARGIN);
dc.DrawLabel(label, wxNullBitmap, rectText);
if ( flags & wxCONTROL_FOCUSED )