With the fix in gtk/font.cpp and switching to an wxplicit wxBOLD, it
should be okay to uncomment the code setting the label font. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1238,14 +1238,14 @@ void wxGridCellBoolEditor::SetSize(const wxRect& r)
|
|||||||
int vAlign = wxALIGN_CENTRE;
|
int vAlign = wxALIGN_CENTRE;
|
||||||
if (GetCellAttr())
|
if (GetCellAttr())
|
||||||
GetCellAttr()->GetAlignment(& hAlign, & vAlign);
|
GetCellAttr()->GetAlignment(& hAlign, & vAlign);
|
||||||
|
|
||||||
int x = 0, y = 0;
|
int x = 0, y = 0;
|
||||||
if (hAlign == wxALIGN_LEFT)
|
if (hAlign == wxALIGN_LEFT)
|
||||||
{
|
{
|
||||||
x = r.x + 2;
|
x = r.x + 2;
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
x += 2;
|
x += 2;
|
||||||
#endif
|
#endif
|
||||||
y = r.y + r.height/2 - size.y/2;
|
y = r.y + r.height/2 - size.y/2;
|
||||||
}
|
}
|
||||||
else if (hAlign == wxALIGN_RIGHT)
|
else if (hAlign == wxALIGN_RIGHT)
|
||||||
@@ -1258,7 +1258,7 @@ void wxGridCellBoolEditor::SetSize(const wxRect& r)
|
|||||||
x = r.x + r.width/2 - size.x/2;
|
x = r.x + r.width/2 - size.x/2;
|
||||||
y = r.y + r.height/2 - size.y/2;
|
y = r.y + r.height/2 - size.y/2;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_control->Move(x, y);
|
m_control->Move(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1575,7 +1575,7 @@ void wxGridCellRenderer::Draw(wxGrid& grid,
|
|||||||
{
|
{
|
||||||
dc.SetBrush( wxBrush(attr.GetBackgroundColour(), wxSOLID) );
|
dc.SetBrush( wxBrush(attr.GetBackgroundColour(), wxSOLID) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dc.SetBrush(wxBrush(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE), wxSOLID));
|
dc.SetBrush(wxBrush(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE), wxSOLID));
|
||||||
@@ -1995,7 +1995,7 @@ void wxGridCellBoolRenderer::Draw(wxGrid& grid,
|
|||||||
// draw a border around checkmark
|
// draw a border around checkmark
|
||||||
int vAlign, hAlign;
|
int vAlign, hAlign;
|
||||||
attr.GetAlignment(& hAlign, &vAlign);
|
attr.GetAlignment(& hAlign, &vAlign);
|
||||||
|
|
||||||
wxRect rectBorder;
|
wxRect rectBorder;
|
||||||
if (hAlign == wxALIGN_CENTRE)
|
if (hAlign == wxALIGN_CENTRE)
|
||||||
{
|
{
|
||||||
@@ -2009,14 +2009,14 @@ void wxGridCellBoolRenderer::Draw(wxGrid& grid,
|
|||||||
rectBorder.x = rect.x + 2;
|
rectBorder.x = rect.x + 2;
|
||||||
rectBorder.y = rect.y + rect.height/2 - size.y/2;
|
rectBorder.y = rect.y + rect.height/2 - size.y/2;
|
||||||
rectBorder.width = size.x;
|
rectBorder.width = size.x;
|
||||||
rectBorder.height = size.y;
|
rectBorder.height = size.y;
|
||||||
}
|
}
|
||||||
else if (hAlign == wxALIGN_RIGHT)
|
else if (hAlign == wxALIGN_RIGHT)
|
||||||
{
|
{
|
||||||
rectBorder.x = rect.x + rect.width - size.x - 2;
|
rectBorder.x = rect.x + rect.width - size.x - 2;
|
||||||
rectBorder.y = rect.y + rect.height/2 - size.y/2;
|
rectBorder.y = rect.y + rect.height/2 - size.y/2;
|
||||||
rectBorder.width = size.x;
|
rectBorder.width = size.x;
|
||||||
rectBorder.height = size.y;
|
rectBorder.height = size.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool value;
|
bool value;
|
||||||
@@ -3963,8 +3963,7 @@ void wxGrid::Init()
|
|||||||
// TODO: something better than this ?
|
// TODO: something better than this ?
|
||||||
//
|
//
|
||||||
m_labelFont = this->GetFont();
|
m_labelFont = this->GetFont();
|
||||||
// m_labelFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
m_labelFont.SetWeight( wxBOLD );
|
||||||
// m_labelFont.SetWeight( m_labelFont.GetWeight() + 2 );
|
|
||||||
|
|
||||||
m_rowLabelHorizAlign = wxALIGN_CENTRE;
|
m_rowLabelHorizAlign = wxALIGN_CENTRE;
|
||||||
m_rowLabelVertAlign = wxALIGN_CENTRE;
|
m_rowLabelVertAlign = wxALIGN_CENTRE;
|
||||||
@@ -4008,8 +4007,8 @@ void wxGrid::Init()
|
|||||||
m_selectingBottomRight = wxGridNoCellCoords;
|
m_selectingBottomRight = wxGridNoCellCoords;
|
||||||
// m_selectionBackground = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT);
|
// m_selectionBackground = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT);
|
||||||
// m_selectionForeground = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
|
// m_selectionForeground = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
|
||||||
m_selectionBackground = *wxBLACK;
|
m_selectionBackground = *wxBLACK;
|
||||||
m_selectionForeground = *wxWHITE;
|
m_selectionForeground = *wxWHITE;
|
||||||
|
|
||||||
m_editable = TRUE; // default for whole grid
|
m_editable = TRUE; // default for whole grid
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user