vcl/source/app/help.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit 7ce5b485302802519068d5dd995e37a9f5d2ca47 Author: Karthik Godha <m...@karthikreddy.org> AuthorDate: Fri Apr 18 05:43:38 2025 +0000 Commit: Heiko Tietze <heiko.tie...@documentfoundation.org> CommitDate: Mon Apr 28 16:31:51 2025 +0200 tdf#166153 Fix width of HelpTip on mouseOver Fix width being too large for mouse over HelpTips in the navigator panel. Change-Id: I84479cd825299e9fbd809ed917b88cb873ebd0ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184347 Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org> Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index 1d109d3b16f8..fc8340a489fb 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -335,10 +335,11 @@ void HelpTextWindow::SetHelpText( const OUString& rHelpText ) else // HelpWinStyle::Balloon { sal_Int32 nCharsInLine; - if (meHelpWinStyle == HelpWinStyle::Quick) - nCharsInLine = maHelpText.getLength(); + sal_Int32 nHelpTextLength = maHelpText.getLength(); + if (meHelpWinStyle == HelpWinStyle::Quick && nHelpTextLength < 100) + nCharsInLine = nHelpTextLength; else - nCharsInLine = 35 + ((maHelpText.getLength() / 100) * 5); + nCharsInLine = 35 + ((nHelpTextLength / 100) * 5); // average width to have all windows consistent OUStringBuffer aBuf(nCharsInLine); comphelper::string::padToLength(aBuf, nCharsInLine, 'x');