mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 11:54:01 +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>
|
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
|
* mmg: bug fix: It was possible to select a file for appending
|
||||||
even though no file was added first.
|
even though no file was added first.
|
||||||
|
|
||||||
|
@ -501,14 +501,21 @@ format_date_time(time_t date_time) {
|
|||||||
#if defined(SYS_WINDOWS)
|
#if defined(SYS_WINDOWS)
|
||||||
wxString
|
wxString
|
||||||
format_tooltip(const wxString &s) {
|
format_tooltip(const wxString &s) {
|
||||||
|
static bool first = true;
|
||||||
wxString tooltip(s), nl(wxT("\n"));
|
wxString tooltip(s), nl(wxT("\n"));
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for (i = 30; i < tooltip.length(); ++i)
|
if (!first)
|
||||||
if (wxT(' ') == tooltip[i])
|
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);
|
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.Left(i) + nl + tooltip.Right(tooltip.length() - i);
|
||||||
|
}
|
||||||
|
|
||||||
return tooltip;
|
return tooltip;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user