mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-23 19:31:44 +00:00
For Windows you have to insert exactly one newline in a tooltip. All other tooltips for that frame (?) will be word wrapped at that newline's position automatically.
This commit is contained in:
parent
505423bab6
commit
a35af06d0b
@ -1,5 +1,8 @@
|
||||
2005-02-27 Moritz Bunkus <moritz@bunkus.org>
|
||||
|
||||
* mmg: bug fix: Improved the word wrapping of the tooltips on
|
||||
Windows.
|
||||
|
||||
* mmg: bug fix: It was possible to select a file for appending
|
||||
even though no file was added first.
|
||||
|
||||
|
@ -501,14 +501,21 @@ 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;
|
||||
|
||||
for (i = 30; i < tooltip.length(); ++i)
|
||||
if (wxT(' ') == tooltip[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])
|
||||
} else if (wxT('(') == tooltip[i]) {
|
||||
first = false;
|
||||
return tooltip.Left(i) + nl + tooltip.Right(tooltip.length() - i);
|
||||
}
|
||||
|
||||
return tooltip;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user