Bug 111781 - Wrong rendering of selection highlight in animation effect list
Summary: Wrong rendering of selection highlight in animation effect list
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Bán Róbert
URL:
Whiteboard: target:6.1.0
Keywords: difficultyBeginner, easyHack, skillCpp, topicUI
Depends on:
Blocks:
 
Reported: 2017-08-14 00:46 UTC by Tamás Zolnai
Modified: 2017-12-27 09:57 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of wrong rendering of selection highlighting (89.35 KB, image/png)
2017-08-14 00:47 UTC, Tamás Zolnai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tamás Zolnai 2017-08-14 00:46:44 UTC
Description:
On the sidebar we can set animations to the presentation object. From the effect list we can select which kind of animation to use. I can see a small rendering issue with this list. When an element is selected the highlighting shape is wrong a bit heigher at the text area than at the empty space next to the text (see screeshot).

I checked both on Windows and Linux. Can reproduce on both.

Steps to Reproduce:
1. Open Impress
2. Open animations on sidebar
3. Add a presentation object and select somthing from the effect list

Actual Results:  
Wrong highlighting for the selected element

Expected Results:
The right highlighting would be an actual rectangle shape.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36
Comment 1 Tamás Zolnai 2017-08-14 00:47:13 UTC
Created attachment 135527 [details]
Screenshot of wrong rendering of selection highlighting
Comment 2 Telesto 2017-08-14 17:56:34 UTC
Repro with:
Version: 6.0.0.0.alpha0+
Build ID: f1a896c71c495bdef5861eb664581507b6b9b5bb
CPU threads: 4; OS: Windows 6.19; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-08-13_07:38:19
Locale: nl-NL (nl_NL); Calc: CL
Comment 3 Tamás Zolnai 2017-08-14 23:07:07 UTC
Let's turn it into a easy hack. The code of the animation sidebar tab is here:
sd/source/ui/animations/CustomAnimationPane.cxx
Comment 4 Tamás Zolnai 2017-11-22 17:10:59 UTC
Some more infos:
There is ListBox::IsDropDownBox() method, which indicates whether the ListBox has a dropdown list or not, which is related to WB_DROPDOWN flag. So I guess the listbox what we have here is called without this flag and that's why it has a special visual apperance.
The related drawing methods are in vcl/source/control/imp_listbox.cxx. You can find the drawing of selection in ImplListBoxWindow::ImplPaint() method, and the text rendering in ImplListBoxWindow::DrawEntry() method. Would be good to find out what's the difference when calling this drawing code from a dropdown list or calling it from this special listbox.
It's good to know that the rendering properties (fillcolor, textcolor, linecolor) are stored in a RenderContext object which is quasi a global object, so it's properties might be set in a different part of the code, but can affect our use case.
Comment 5 Xisco Faulí 2017-12-23 03:27:31 UTC
A polite ping, still working on this bug?
Comment 6 Bán Róbert 2017-12-23 07:55:35 UTC
Yes, sorry. I forgot about this because of my exams. I'll finish it soon.
Comment 7 Commit Notification 2017-12-27 09:55:41 UTC
Bán Róbert committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5d64ef270b22544a2dcbcaed191050b616d1f956

tdf#111781 Drawing selection highlight twice in listBoxes

It will be available in 6.1.0.

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

Affected users are encouraged to test the fix and report feedback.