more combobox appearance fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -253,7 +253,7 @@ void wxPopupComboWindow::PositionNearCombo()
|
|||||||
// the origin point must be in screen coords
|
// the origin point must be in screen coords
|
||||||
wxPoint ptOrigin = m_combo->ClientToScreen(wxPoint(0, 0));
|
wxPoint ptOrigin = m_combo->ClientToScreen(wxPoint(0, 0));
|
||||||
|
|
||||||
#ifdef __WXUNIVERSAL__
|
#if 0 //def __WXUNIVERSAL__
|
||||||
// account for the fact that (0, 0) is not the top left corner of the
|
// account for the fact that (0, 0) is not the top left corner of the
|
||||||
// window: there is also the border
|
// window: there is also the border
|
||||||
wxRect rectBorders = m_combo->GetRenderer()->
|
wxRect rectBorders = m_combo->GetRenderer()->
|
||||||
|
@@ -53,7 +53,7 @@
|
|||||||
// constants (to be removed, for testing only)
|
// 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
|
// wxGTKRenderer: draw the GUI elements in GTK style
|
||||||
@@ -858,7 +858,7 @@ void wxGTKRenderer::DrawBorder(wxDC& dc,
|
|||||||
switch ( border )
|
switch ( border )
|
||||||
{
|
{
|
||||||
case wxBORDER_SUNKEN:
|
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);
|
DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight);
|
||||||
DrawShadedRect(dc, &rect, m_penBlack, m_penLightGrey);
|
DrawShadedRect(dc, &rect, m_penBlack, m_penLightGrey);
|
||||||
@@ -866,21 +866,21 @@ void wxGTKRenderer::DrawBorder(wxDC& dc,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case wxBORDER_STATIC:
|
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);
|
DrawShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxBORDER_RAISED:
|
case wxBORDER_RAISED:
|
||||||
for ( width = 0; width < BORDER_THICKNESS / 2; width++ )
|
for ( width = 0; width < BORDER_THICKNESS; width++ )
|
||||||
{
|
{
|
||||||
DrawRaisedBorder(dc, &rect);
|
DrawRaisedBorder(dc, &rect);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxBORDER_DOUBLE:
|
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_penLightGrey, m_penBlack);
|
||||||
DrawShadedRect(dc, &rect, m_penHighlight, m_penDarkGrey);
|
DrawShadedRect(dc, &rect, m_penHighlight, m_penDarkGrey);
|
||||||
@@ -964,7 +964,7 @@ void wxGTKRenderer::DrawTextBorder(wxDC& dc,
|
|||||||
{
|
{
|
||||||
wxRect rect = rectOrig;
|
wxRect rect = rectOrig;
|
||||||
|
|
||||||
for ( size_t width = 0; width < BORDER_THICKNESS / 2; width++ )
|
if ( border != wxBORDER_NONE )
|
||||||
{
|
{
|
||||||
if ( flags & wxCONTROL_FOCUSED )
|
if ( flags & wxCONTROL_FOCUSED )
|
||||||
{
|
{
|
||||||
@@ -994,7 +994,7 @@ void wxGTKRenderer::DrawButtonBorder(wxDC& dc,
|
|||||||
// button pressed: draw a black border around it and an inward shade
|
// button pressed: draw a black border around it and an inward shade
|
||||||
DrawRect(dc, &rect, m_penBlack);
|
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_penDarkGrey, m_penHighlight);
|
||||||
DrawAntiShadedRect(dc, &rect, m_penBlack, m_penDarkGrey);
|
DrawAntiShadedRect(dc, &rect, m_penBlack, m_penDarkGrey);
|
||||||
@@ -1016,7 +1016,7 @@ void wxGTKRenderer::DrawButtonBorder(wxDC& dc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// now draw a normal button
|
// 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);
|
DrawShadedRect(dc, &rect, m_penHighlight, m_penBlack);
|
||||||
DrawAntiShadedRect(dc, &rect,
|
DrawAntiShadedRect(dc, &rect,
|
||||||
@@ -1492,13 +1492,11 @@ void wxGTKRenderer::DrawRadioButton(wxDC& dc,
|
|||||||
// text control
|
// text control
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
static const int TEXT_BORDER = 2;
|
|
||||||
|
|
||||||
wxRect wxGTKRenderer::GetTextTotalArea(const wxTextCtrl *text,
|
wxRect wxGTKRenderer::GetTextTotalArea(const wxTextCtrl *text,
|
||||||
const wxRect& rect)
|
const wxRect& rect)
|
||||||
{
|
{
|
||||||
wxRect rectTotal = rect;
|
wxRect rectTotal = rect;
|
||||||
rectTotal.Inflate(TEXT_BORDER);
|
rectTotal.Inflate(2*BORDER_THICKNESS);
|
||||||
return rectTotal;
|
return rectTotal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1507,7 +1505,7 @@ wxRect wxGTKRenderer::GetTextClientArea(const wxTextCtrl *text,
|
|||||||
wxCoord *extraSpaceBeyond)
|
wxCoord *extraSpaceBeyond)
|
||||||
{
|
{
|
||||||
wxRect rectText = rect;
|
wxRect rectText = rect;
|
||||||
rectText.Inflate(-TEXT_BORDER);
|
rectText.Inflate(-2*BORDER_THICKNESS);
|
||||||
|
|
||||||
if ( text->WrapLines() )
|
if ( text->WrapLines() )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user