From d4a8b75b21a28e25cbfdc27f4954dd13968c9e33 Mon Sep 17 00:00:00 2001 From: chenall Date: Wed, 17 Sep 2014 08:03:02 +0800 Subject: [PATCH] =?UTF-8?q?2014-09-17=20=E7=AE=80=E5=8D=95=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E4=B8=AD=E6=96=87=E5=AD=97=E7=AC=A6=E9=95=BF=E5=BA=A6?= =?UTF-8?q?=E9=97=AE=E9=A2=98(=E4=B8=8D=E6=98=AF=E5=BE=88=E5=AE=8C?= =?UTF-8?q?=E7=BE=8E,=E4=BD=86=E4=B8=80=E8=88=AC=E5=86=B5=E4=B8=8B?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E4=BB=80=E4=B9=88=E9=97=AE=E9=A2=98).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/update.log | 3 +++ src/ALMRunVersion.h | 4 ++-- src/MerryListBoxPanel.cpp | 18 +++++++++++++++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/doc/update.log b/doc/update.log index 3f53f90..edf7b2a 100644 --- a/doc/update.log +++ b/doc/update.log @@ -1,3 +1,6 @@ +### [v1.2.0.68](https://github.com/chenall/ALMRun/archive/v1.2.0.68_BIN.zip) + 2014-09-17 简单修正中文字符长度问题(不是很完美,但一般况下没有什么问题). + ### [v1.2.0.67](https://github.com/chenall/ALMRun/archive/v1.2.0.67_BIN.zip) 一些代码调整,整合ojeo的代码,增加两个新的插件命令EV和doc. diff --git a/src/ALMRunVersion.h b/src/ALMRunVersion.h index 7ffe472..48b859c 100644 --- a/src/ALMRunVersion.h +++ b/src/ALMRunVersion.h @@ -1,6 +1,6 @@ #ifndef _ALMRUN_VERSION_H_ #define _ALMRUN_VERSION_H_ -#define VERSION_INT 1,2,0,67 -#define VERSION_STR "1,2,0,67" +#define VERSION_INT 1,2,0,68 +#define VERSION_STR "1,2,0,68" #define VERSION_DATE "2014/09/16" #endif diff --git a/src/MerryListBoxPanel.cpp b/src/MerryListBoxPanel.cpp index 1d71b33..fa16814 100644 --- a/src/MerryListBoxPanel.cpp +++ b/src/MerryListBoxPanel.cpp @@ -371,7 +371,23 @@ void MerryListBoxPanel::DrawBackground(MerryPaintDC& dc) const wxString printfmt(long n,const wxString &str) { - return wxString::Format("%*.*s",n,abs(n),str); + size_t max = abs(n); + size_t str_len = str.size(); + size_t len = 0,i = 0; + for(len = 0;i < max && lenlen) + { + i -= len; + n -= (n > 0)?i:-i; + } + return wxString::Format("%*.*s",n,len,str); } void MerryListBoxPanel::DrawItem(MerryPaintDC& dc,size_t item)