small cosmetic fix for wxListCtrl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4855 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -180,7 +180,8 @@ public:
|
||||
private:
|
||||
void SetAttributes(wxDC *dc,
|
||||
const wxListItemAttr *attr,
|
||||
const wxColour& colText, const wxFont& font);
|
||||
const wxColour& colText, const wxFont& font,
|
||||
bool hilight);
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxListLineData);
|
||||
};
|
||||
|
@@ -273,7 +273,8 @@ void MyFrame::FileOpen(wxCommandEvent& WXUNUSED(event) )
|
||||
void MyFrame::FilesOpen(wxCommandEvent& WXUNUSED(event) )
|
||||
{
|
||||
wxFileDialog dialog(this, "Testing open multiple file dialog",
|
||||
"", "", "*.*", wxMULTIPLE);
|
||||
"", "", wxFileSelectorDefaultWildcardStr,
|
||||
wxMULTIPLE);
|
||||
|
||||
if (dialog.ShowModal() == wxID_OK)
|
||||
{
|
||||
|
@@ -586,9 +586,13 @@ int wxListLineData::GetImage( int index )
|
||||
void wxListLineData::SetAttributes(wxDC *dc,
|
||||
const wxListItemAttr *attr,
|
||||
const wxColour& colText,
|
||||
const wxFont& font)
|
||||
const wxFont& font,
|
||||
bool hilight)
|
||||
{
|
||||
if ( attr && attr->HasTextColour() )
|
||||
// don't use foregroud colour for drawing highlighted items - this might
|
||||
// make them completely invisible (and there is no way to do bit
|
||||
// arithmetics on wxColour, unfortunately)
|
||||
if ( !hilight && attr && attr->HasTextColour() )
|
||||
{
|
||||
dc->SetTextForeground(attr->GetTextColour());
|
||||
}
|
||||
@@ -640,7 +644,7 @@ void wxListLineData::DoDraw( wxDC *dc, bool hilight, bool paintBG )
|
||||
// customize the subitems (in report mode) too.
|
||||
wxListItemData *item = (wxListItemData*)m_items.First()->Data();
|
||||
wxListItemAttr *attr = item->GetAttributes();
|
||||
SetAttributes(dc, attr, colText, font);
|
||||
SetAttributes(dc, attr, colText, font, hilight);
|
||||
|
||||
bool hasBgCol = attr && attr->HasBackgroundColour();
|
||||
if ( paintBG || hasBgCol )
|
||||
@@ -869,7 +873,8 @@ void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
||||
if ((i+1 == numColumns) || ( dc.LogicalToDeviceX(x+item.m_width) > w-5))
|
||||
cw = dc.DeviceToLogicalX(w)-x-1;
|
||||
#else
|
||||
if ((i+1 == numColumns) || (x+item.m_width > w-5)) cw = w-x-1;
|
||||
if ((i+1 == numColumns) || (x+item.m_width > w-5))
|
||||
cw = w-x-1;
|
||||
#endif
|
||||
dc.SetPen( *wxWHITE_PEN );
|
||||
|
||||
|
Reference in New Issue
Block a user