Bug 159075 - Comment triangle is not drawn correctly when zoom factor is not a multiple of 50%
Summary: Comment triangle is not drawn correctly when zoom factor is not a multiple of...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: All All
: low minor
Assignee: Rafael Lima
URL:
Whiteboard: target:24.8.0
Keywords: implementationError
Depends on:
Blocks: Calc-Comments
  Show dependency treegraph
 
Reported: 2024-01-08 23:50 UTC by Rafael Lima
Modified: 2024-01-10 19:33 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot at 360% zoom factor (5.55 KB, image/png)
2024-01-08 23:50 UTC, Rafael Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2024-01-08 23:50:37 UTC
Created attachment 191812 [details]
Screenshot at 360% zoom factor

When the zoom level is not a multiple of 50%, the comment triangle does not close correctly.

Steps to reproduce:
1) Create a blank document and set the zoom level to 100%
2) Insert a comment to any cell
3) Scroll up and down to redraw the triangle (the redrawing issue is being tracked in bug 104261)
4) Now notice we have a perfect triangle
5) Start zooming in (using the zoom slider in the status bar)
6) Notice that when the zoom is 110%, 120%, etc... the triangle is no longer correctly drawn; the lines do not close correctly (see attached screenshot)
7) The triangle is only drawn correctly when the zoom level is a multiple of 50%

I'm on KDE Plasma using 100% scaling factor on a 1080p display.

System info

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8c822b764b35a0116a0865e991a87c8315e005ab
CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL threaded
Comment 1 Telesto 2024-01-09 04:29:47 UTC
Looks fine on macOS
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 40617d867346956588ac023511f31210107217f4
CPU threads: 8; OS: macOS 13.6.3; UI render: default; VCL: osx
Locale: nl-NL (nl_NL.UTF-8); UI: en-US
Calc: threaded

FWIW: is the comment icon supposed to be a rectangle with purple color nowadays? It always was a red square... 🟥  The (squeezed) red square is still visible on insertion
Comment 2 Stéphane Guillou (stragu) 2024-01-09 09:22:07 UTC
Confirmed with gen and gtk3 VCL plugin too, in recent trunk build:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e83c7ec2f4d801365235bf56d7cc8cf31ef4a00e
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Marking as "implementation error" as that broken edge was present at d395b42cdf3ef517d215dee905e5ccf2ae73b2b8 (although the look was a bit different).

(In reply to Telesto from comment #1)
> FWIW: is the comment icon supposed to be a rectangle with purple color
> nowadays? It always was a red square... 🟥  The (squeezed) red square is
> still visible on insertion
It's supposed to be a magenta triangle since 7.6, see bug 91415. You might be seeing a different issue.
Comment 3 Telesto 2024-01-09 13:47:59 UTC Comment hidden (off-topic)
Comment 4 Stéphane Guillou (stragu) 2024-01-09 14:33:02 UTC
(In reply to Telesto from comment #3)
> (In reply to Stéphane Guillou (stragu) from comment #2)
> > It's supposed to be a magenta triangle since 7.6, see bug 91415. You might
> > be seeing a different issue.
> 
> Bit off-topic
> You're right. It's magenta, not purple. Me and colors... I'm asking myself.
> Did UX discuss the change of the default color? Bug 91415 is mostly about
> the rectangle. Mentioning the color in bug 91415 comment 0 in the last
> paragraph. ReleaseNotes don't give any clue either
Sorry, I should have given more details: I think the colour change happened when it was made customisable, in bug 154080. See in particular bug bug 154080 comment 11.

Heiko can give more details.
Comment 5 Rafael Lima 2024-01-09 18:22:06 UTC
This patch fixes the triangle:

https://gerrit.libreoffice.org/c/core/+/161768
Comment 6 Heiko Tietze 2024-01-10 07:10:32 UTC
No issue here 

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4a3804743645730dbb6dda21eacd1c3c93f85509
CPU threads: 32; OS: Linux 6.6; UI render: default; VCL: gtk3/kf5
Locale: de-DE (en_US.UTF-8); UI: en-US
Calc: threaded

(In reply to Telesto from comment #3)
> Bit off-topic
Totally off-topic. In short: design decision; if you disagree open a ticket and find allies who support your view.
Comment 7 Commit Notification 2024-01-10 19:30:15 UTC
Rafael Lima committed a patch related to this issue.
It has been pushed to "master":

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

tdf#159075 Fix drawing comment triangle in Calc

It will be available in 24.8.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.