Bug 116920 - Bounding box indicators are rendered erroneously on higher-resolution screen
Summary: Bounding box indicators are rendered erroneously on higher-resolution screen
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
6.0.2.1 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 119698 (view as bug list)
Depends on:
Blocks: HiDPI
  Show dependency treegraph
 
Reported: 2018-04-10 12:00 UTC by Kohei Yoshida
Modified: 2019-05-08 19:42 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Purple bounding box (2.44 KB, image/png)
2018-04-10 12:04 UTC, Kohei Yoshida
Details
Green bounding box on a curved line (3.15 KB, image/png)
2018-04-10 12:04 UTC, Kohei Yoshida
Details
Funny-looking file open icon on higher-res screen (19.04 KB, image/png)
2018-04-10 12:24 UTC, Kohei Yoshida
Details
LO About dialog (32.86 KB, image/png)
2018-11-21 18:19 UTC, Gabriele Ponzo
Details
150% DPI scaling withOUT focus correction (235.79 KB, image/png)
2018-11-21 18:21 UTC, Gabriele Ponzo
Details
150% DPI scaling WITH focus correction (203.83 KB, image/png)
2018-11-21 18:21 UTC, Gabriele Ponzo
Details
150% DPI scaling start center (74.68 KB, image/png)
2018-11-21 18:24 UTC, Gabriele Ponzo
Details
150% DPI scaling WITH focus correction BREEZE (54.26 KB, image/png)
2018-11-21 18:26 UTC, Gabriele Ponzo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kohei Yoshida 2018-04-10 12:00:32 UTC
Description:
When a drawing object is inserted and selected, LibreOffice displays a set of small squares around its bounding box to indicate that it's been selected.  But these small squares don't look right.  I'll post a screenshot shortly.

I first noticed this in Draw, but I can see it in Calc as well.  This is most likely independent of the application.

I'm using the 64-bit Windows build.

Steps to Reproduce:
1. Create an empty Draw document.
2. Select View/Toolbars/Drawing to turn on the drawing toolbar if it's not already visible.
3. Insert, say, a line.

Actual Results:  
A line gets drawn with weird-looking squares at either end.

Expected Results:
A line gets drawn with solid squares at either end.


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
Comment 1 Kohei Yoshida 2018-04-10 12:04:29 UTC
Created attachment 141257 [details]
Purple bounding box
Comment 2 Kohei Yoshida 2018-04-10 12:04:50 UTC
Created attachment 141258 [details]
Green bounding box on a curved line
Comment 3 Kohei Yoshida 2018-04-10 12:22:07 UTC
Actually this may be dependent on the screen resolution.  The machine I used to reproduce this has a higher-than-normal resolution screen.  Even the Open icon looks funny (will post a screenshot).
Comment 4 Kohei Yoshida 2018-04-10 12:24:21 UTC
Created attachment 141259 [details]
Funny-looking file open icon on higher-res screen
Comment 5 Xisco Faulí 2018-06-12 11:31:04 UTC
Thank you for reporting the bug. To be certain the reported issue is not
related to corruption in the user profile, could you please reset your
Libreoffice profile ( https://wiki.documentfoundation.org/UserProfile ) and
re-test?

I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the issue is still present
Comment 6 Kohei Yoshida 2018-08-24 12:45:06 UTC
It is very much present and I nuked the user config.

You need to test this on a HiDPI monitor.  It's probably related to that.  On a normal DPI monitor it looks fine.
Comment 7 Kohei Yoshida 2018-08-24 12:46:22 UTC
Still present in 6.1.0.3 (on Windows HiDPI).
Comment 8 Regina Henschel 2018-09-28 17:56:59 UTC
I can produce a similar result, if I set the display to 200% (resulting in 192dpi) in the system settings of Window 10, although I have a normal monitor.

The markers are contained in the files markers.png and cropmarkers.png in the folder svx/res in the images_???.zip file. Instead of ??? use the theme, you have selected. The needed markers are cut from that images.

There is method CountDPIScaleFactor(sal_Int32 nDPI) in windows.cxx which generates a scaling factor. In my case of 192dpi it would generate 200%.

I have taken the "cropmarkers" of an image as example. The resulting markers look as if the pixel offset, which is needed to cut the desired marker from the large image, is multiplied with this 200% and therefore the wrong part of the image is taken as "marker".

Do you have a display resolution in Windows set, which is different from the normal 100%? Or is such value set by the device driver?
Comment 9 Regina Henschel 2018-10-26 21:27:54 UTC
If you use a larger scaling in your OS, e.g. 150%, LibreOffice generates a subfolder in folder "cache", which contains enlarged icons. It has the same name as the icon-theme, e.g. colibre. Therein is a subfolder corresponding to your scaling factor, e.g. 150. Therein are similar folders as can be found in images_colibre.zip in share/config, when you would unpack it. Therein is a folder svx/res. It has a file "markers.png" with a size of 175x138 (for 150%) in case of that in cache, whereas the original file in images_colibre has a size of 117x92.

Neither the folder in "cache" nor the original folder in images_colibre.zip has single images of name "marker-rect9-6.png" or similar. Thus the fallback "markers.png" with all markers in one image is used. But the method, which cut of the desired marker from the total image, expects a size of 117x92 and therefore cuts the wrong parts out of the file of 175x138 size.

The same problem is with the crop markers. The original file has size 153x63 and the enlarged on 229x94.

As quick workaround, you can copy the original file and put it at the same place in the folder in cache.
Comment 10 Gabriele Ponzo 2018-11-21 18:19:44 UTC
Created attachment 146885 [details]
LO About dialog
Comment 11 Gabriele Ponzo 2018-11-21 18:21:07 UTC
Created attachment 146886 [details]
150% DPI scaling withOUT focus correction
Comment 12 Gabriele Ponzo 2018-11-21 18:21:39 UTC
Created attachment 146887 [details]
150% DPI scaling WITH focus correction
Comment 13 Gabriele Ponzo 2018-11-21 18:23:59 UTC
I've been reported the same behavior from a friend on LO 6.1.3.2 (x64)on Windows 10.

It looks like it may also depend on a Windows option to avoid the out of focus effect.
But, as Regina said, the icons size matters, breeze isn't affected while colibre is.

Please see attachments.
Comment 14 Gabriele Ponzo 2018-11-21 18:24:51 UTC
Created attachment 146888 [details]
150% DPI scaling start center
Comment 15 Gabriele Ponzo 2018-11-21 18:26:09 UTC
Created attachment 146889 [details]
150% DPI scaling WITH focus correction BREEZE
Comment 16 Regina Henschel 2018-11-21 19:09:47 UTC
Gabriele: Your examples belong to bug 119020. The reason is different from the bounding box indicators. Bug 119020 is fixed for LO 6.1.4. So you should get a developer version from https://dev-builds.libreoffice.org/daily/libreoffice-6-1/ and test it.
Comment 17 Gabriele Ponzo 2018-11-21 21:07:58 UTC
Thank you Regina, and sorry for having posted on the wrong bug.

I'll (let) try this dev version then.
Comment 18 Buovjaga 2019-05-08 19:42:56 UTC
*** Bug 119698 has been marked as a duplicate of this bug. ***