This is an automated email from the ASF dual-hosted git repository.
mseidel pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/AOO41X by this push:
new 0406e650f5 Use line break when Tooltip > 100 characters
0406e650f5 is described below
commit 0406e650f5976ecb08a09d8623c16d4a678400cc
Author: mseidel <[email protected]>
AuthorDate: Sun Jul 27 17:19:00 2025 +0200
Use line break when Tooltip > 100 characters
(cherry picked from commit 1b113e19b42463c2de2f3f1722dcd5dddbae9745)
---
main/vcl/source/app/help.cxx | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/main/vcl/source/app/help.cxx b/main/vcl/source/app/help.cxx
index 2fd7e2de7e..4d3c4c3d9d 100644
--- a/main/vcl/source/app/help.cxx
+++ b/main/vcl/source/app/help.cxx
@@ -41,7 +41,7 @@
#define HELPWINSTYLE_BALLOON 1
#define HELPTEXTMARGIN_QUICK 4
-#define HELPTEXTMARGIN_BALLOON 4
+#define HELPTEXTMARGIN_BALLOON 4 // same margin as quickhelp
#define HELPDELAY_NORMAL 1
#define HELPDELAY_SHORT 2
@@ -398,7 +398,7 @@ HelpTextWindow::~HelpTextWindow()
void HelpTextWindow::SetHelpText( const String& rHelpText )
{
maHelpText = rHelpText;
- if ( mnHelpWinStyle == HELPWINSTYLE_QUICK )
+ if ( mnHelpWinStyle == HELPWINSTYLE_QUICK && maHelpText.Len() < 100 )
{
Size aSize;
aSize.Height() = GetTextHeight();
@@ -465,7 +465,7 @@ void HelpTextWindow::Paint( const Rectangle& )
}
// paint text
- if ( mnHelpWinStyle == HELPWINSTYLE_QUICK )
+ if ( mnHelpWinStyle == HELPWINSTYLE_QUICK && maHelpText.Len() < 100 )
{
if ( mnStyle & QUICKHELP_CTRLTEXT )
DrawCtrlText( maTextRect.TopLeft(), maHelpText );
@@ -486,7 +486,7 @@ void HelpTextWindow::Paint( const Rectangle& )
{
Size aSz = GetOutputSizePixel();
DrawRect( Rectangle( Point(), aSz ) );
-// if ( mnHelpWinStyle == HELPWINSTYLE_BALLOON )
+// if ( mnHelpWinStyle == HELPWINSTYLE_BALLOON ) // same border as
quickhelp
// {
// aSz.Width() -= 2;
// aSz.Height() -= 2;
@@ -754,20 +754,20 @@ void ImplSetHelpWindowPos( Window* pHelpWin, sal_uInt16
nHelpWinStyle, sal_uInt1
aPos.Y() = devHelpArea.Bottom();
}
- // Welche Richtung?
+ // Which direction?
if ( nStyle & QUICKHELP_LEFT )
;
else if ( nStyle & QUICKHELP_RIGHT )
aPos.X() -= aSz.Width();
else
- aPos.X() -= aSz.Width()/2;
+ aPos.X() -= aSz.Width() / 2;
if ( nStyle & QUICKHELP_TOP )
;
else if ( nStyle & QUICKHELP_BOTTOM )
aPos.Y() -= aSz.Height();
else
- aPos.Y() -= aSz.Height()/2;
+ aPos.Y() -= aSz.Height() / 2;
}
if ( aPos.X() < aScreenRect.Left() )