Bug 163225 - Text in ListBox gets bolder as mouse hovers over its contents
Summary: Text in ListBox gets bolder as mouse hovers over its contents
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
24.2.6.2 release
Hardware: All All
: medium normal
Assignee: Michael Weghorn
URL:
Whiteboard: target:25.2.0
Keywords:
Depends on:
Blocks: GTK3 Qt6
  Show dependency treegraph
 
Reported: 2024-09-30 23:52 UTC by Rafael Lima
Modified: 2024-10-04 00:12 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Minimal test case (15.31 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-09-30 23:52 UTC, Rafael Lima
Details
Video showing the problem (121.49 KB, video/webm)
2024-09-30 23:52 UTC, Rafael Lima
Details
Screenshot (17.41 KB, image/png)
2024-10-01 16:42 UTC, m_a_riosv
Details
Adjusted sample doc that has a listbox with orange background (13.91 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-10-03 19:07 UTC, Michael Weghorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2024-09-30 23:52:16 UTC
Created attachment 196808 [details]
Minimal test case

In a Dialog created using the Dialog Editor, if you add a ListBox with some items and start hovering the mouse over the items, the text starts getting bolder.

Clicking an item restores the text... and hovering starts the issue all over again.

Steps to reproduce:
1) Open attached ODS file
2) Click the "Open Test Dialog" button
3) A dialog with a list box will appear
4) Hover the mouse over the items
5) Notice their text gets bolder as the mouse keeps moving
6) Click an item to make the text return to normal
7) Move the mouse again and the text gets bold

System info

Version: 24.2.6.2 (X86_64)
Build ID: 420(Build:2)
CPU threads: 12; OS: Linux 6.10; UI render: default; VCL: kf6 (cairo+wayland)
Locale: pt-BR (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Rafael Lima 2024-09-30 23:52:46 UTC
Created attachment 196809 [details]
Video showing the problem
Comment 2 m_a_riosv 2024-10-01 16:42:11 UTC
Created attachment 196826 [details]
Screenshot

I cannot reproduce with
Version: 24.2.6.2 (X86_64) / LibreOffice Community
Build ID: ef66aa7e36a1bb8e65bfbc63aba53045a14d0871
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
neither
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8f3e84133628c420b7cc9896d6e92e2d66eae0b2
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 3 Rafael Lima 2024-10-01 19:15:55 UTC
(In reply to m_a_riosv from comment #2)
> I cannot reproduce with

Then there's a chance that this only affects kf5 / kf6.

Later I'll test it on a different machine to make sure.
Comment 4 Rafael Lima 2024-10-03 13:32:47 UTC
I can confirm that this problem does not happen in gen and win.

It happens both in kf5 / kf6.
Comment 5 Michael Weghorn 2024-10-03 18:21:27 UTC
(In reply to Rafael Lima from comment #4)
> It happens both in kf5 / kf6.

I can reproduce with qt6, and it also happens with gtk3.

Might be something related to LO's "native drawing API" (`WidgetDrawInterface::drawNativeControl` etc.) that can be implemented in the platform integration/VCL plugins 

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: fa7848fd2f01353a66d58beeec9bec08e85caa0b
CPU threads: 32; OS: Linux 6.10; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: CL threaded

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: fa7848fd2f01353a66d58beeec9bec08e85caa0b
CPU threads: 32; OS: Linux 6.10; UI render: default; VCL: qt6 (cairo+xcb)
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: CL threaded
Comment 6 Michael Weghorn 2024-10-03 18:28:59 UTC
(In reply to Michael Weghorn from comment #5)
> Might be something related to LO's "native drawing API"
> (`WidgetDrawInterface::drawNativeControl` etc.) that can be implemented in
> the platform integration/VCL plugins 

Indeed, not an issue with qt6 and SAL_VCL_QT_NO_NATIVE=1 (which makes qt6 look similar to gen).
Comment 7 Michael Weghorn 2024-10-03 19:07:33 UTC
Created attachment 196871 [details]
Adjusted sample doc that has a listbox with orange background
Comment 8 Michael Weghorn 2024-10-03 19:13:29 UTC
Bibisecting shows this is a regression from

        commit fd7cb42f7d17d03e4fac6d8c5f1d6c7c49a36fc6
        Author: Michael Weghorn <m.weghorn@posteo.de>
        Date:   Tue Feb 14 16:16:30 2023 +0100
    
            tdf#153520 vcl: Align listbox invalidation with mouseover check

Pending fix:
https://gerrit.libreoffice.org/c/core/+/174438
Comment 9 Commit Notification 2024-10-03 22:40:56 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/427371814dc96ae7798a607de5eb9565d7a023f0

tdf#163225 vcl: Erase listbox bg when redrawing on mouse move

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 10 Rafael Lima 2024-10-04 00:12:04 UTC
Thanks for the quick fix.

Verified with current 25.2 master built from source.