Skip to content
This repository has been archived by the owner on Jun 18, 2023. It is now read-only.

Commit

Permalink
bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
chenall committed Sep 16, 2014
1 parent e559031 commit 349d747
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/MerryListBoxPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,7 @@ void MerryListBoxPanel::DrawBackground(MerryPaintDC& dc) const

wxString printfmt(long n,const wxString &str)
{
int len = strlen(str.mb_str())-str.Len();
int spaceLen = (n!=0?(n/(abs(n)))*(abs(n)-len):n);//修正中文字符引起的错位
return wxString::Format("%*s",spaceLen,str);
return wxString::Format("%*.*s",n,abs(n),str);
}

void MerryListBoxPanel::DrawItem(MerryPaintDC& dc,size_t item)
Expand Down

0 comments on commit 349d747

Please sign in to comment.