Bug 162297 - KDE desktop has issue with long extended tips, text line does not fold
Summary: KDE desktop has issue with long extended tips, text line does not fold
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
24.2.5.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Rafael Lima
URL:
Whiteboard: target:25.2.0 target:24.8.1
Keywords:
: 162478 (view as bug list)
Depends on:
Blocks: KDE, KF5 Tooltip
  Show dependency treegraph
 
Reported: 2024-08-01 15:34 UTC by Olivier Hallot
Modified: 2024-08-15 06:22 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of KDE desktop with long extended tips. (163.79 KB, image/png)
2024-08-01 15:34 UTC, Olivier Hallot
Details
Tooltips in kf5 with proposed patch (43.48 KB, image/png)
2024-08-02 14:33 UTC, Rafael Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Hallot 2024-08-01 15:34:24 UTC
Created attachment 195638 [details]
Screenshot of KDE desktop with long extended tips.

The KDE desktop has issues with long extended tips. 

The text does not fold into multiple lines and scrolls horizontally out of the screen.

See attached image.

Version: 24.2.5.2 (X86_64) / LibreOffice Community
Build ID: bffef4ea93e59bebbeaf7f431bb02b1a39ee8a59
CPU threads: 8; OS: Linux 6.8; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-US (pt_BR.UTF-8); UI: en-US
Calc: default
Comment 1 Rafael Lima 2024-08-02 14:19:29 UTC
I can confirm this issue. On Windows the same tooltip wraps into 3 lines, which is visually much better.

Tooltips in kf5 are not very nice... they should behave more like on Windows.

Tested with:

Version: 24.2.4.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Ubuntu package version: 4:24.2.4-0ubuntu0.24.04.2
Calc: threaded
Comment 2 Rafael Lima 2024-08-02 14:33:50 UTC
Created attachment 195668 [details]
Tooltips in kf5 with proposed patch

I created a patch for the qt5 VCL that wraps tooltips. Here's a screenshot of how it looks now.

I'll be submitting this patch on Gerrit later.
Comment 3 Rafael Lima 2024-08-02 17:33:25 UTC
Proposed patch here.

https://gerrit.libreoffice.org/c/core/+/171411
Comment 4 Commit Notification 2024-08-03 06:32:36 UTC
Rafael Lima committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/fa89130d4980662642cb81a05ec044dbe21fd5d0

tdf#162297 Wrap tooltips in Qt5

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2024-08-03 10:30:04 UTC
Rafael Lima committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/25335198fb2c8138247225330b24865987693d2f

tdf#162297 Wrap tooltips in Qt5

It will be available in 24.8.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Rafael Lima 2024-08-07 18:50:45 UTC
Setting this to FIXED.

@Michael, I tested this on my other machine (Fedora KDE) where I have a kf6 build. The tooltips are wrapping there as well.

Is this expected? (since this patch focused only kf5)
Comment 7 Michael Weghorn 2024-08-08 07:01:22 UTC
(In reply to Rafael Lima from comment #6)
> Setting this to FIXED.

Verified (when testing the Gerrit change already).

> @Michael, I tested this on my other machine (Fedora KDE) where I have a kf6
> build. The tooltips are wrapping there as well.
> 
> Is this expected? (since this patch focused only kf5)

Yes. qt5/qt6/kf5/kf6 share almost all of the code.

The Qt 6 based implementation generally just has `#include`s for the Qt 5 one, see e.g. how `vcl/qt6/QtWidget.cxx` just has:

    #include "../qt5/QtWidget.cxx"

So your change applies for Qt 6 just as well without having to do anything else.

(Where necessary, Qt 5 or Qt 6 specific aspects can still be handled in the same source file by using version-specific code using `QT_VERSION_CHECK`.)
Comment 8 Michael Weghorn 2024-08-15 06:19:36 UTC
*** Bug 162478 has been marked as a duplicate of this bug. ***