Always word-wrap tooltips on Windows.

This commit is contained in:
Moritz Bunkus 2010-01-22 22:18:13 +01:00
parent 0e816dc5ad
commit d7e1892eb2
2 changed files with 5 additions and 17 deletions

View File

@ -1,3 +1,7 @@
2010-01-22 Moritz Bunkus <moritz@bunkus.org>
* mmg: bug fix: Tooltips were not word-wrapped on Windows.
2010-01-20 Moritz Bunkus <moritz@bunkus.org>
* mmg: new feature: Added a control for mkvmerge's "--cropping"

View File

@ -265,23 +265,7 @@ format_date_time(time_t date_time) {
#if defined(SYS_WINDOWS)
wxString
format_tooltip(const wxString &s) {
static bool first = true;
wxString tooltip(s), nl(wxT("\n"));
unsigned int i;
if (!first)
return s;
for (i = 60; i < tooltip.length(); ++i)
if (wxT(' ') == tooltip[i]) {
first = false;
return tooltip.Left(i) + nl + tooltip.Right(tooltip.length() - i - 1);
} else if (wxT('(') == tooltip[i]) {
first = false;
return tooltip.Left(i) + nl + tooltip.Right(tooltip.length() - i);
}
return tooltip;
return format_paragraph(s.c_str(), 0, L"", L"", 80);
}
#endif