Improve Legibility of preview of rectangle annotation
AbandonedPublic

Authored by ahmedbilal on Apr 7 2019, 1:32 PM.

Details

Reviewers
okular-devel
ngraham
Group Reviewers
Okular
Summary

Before

After

Result in both cases

Note, that the preview of rectangle is the same color as the resulting rectangle and the width of preview rectangle is also increased to make it more legible

Diff Detail

Repository
R223 Okular
Branch
rectangle_preview_improved
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 10577
Build 10595: arc lint + arc unit
ahmedbilal created this revision.Apr 7 2019, 1:32 PM
Restricted Application added a project: Okular. · View Herald TranscriptApr 7 2019, 1:32 PM
Restricted Application added a subscriber: okular-devel. · View Herald Transcript
ahmedbilal requested review of this revision.Apr 7 2019, 1:32 PM
ahmedbilal edited the summary of this revision. (Show Details)Apr 7 2019, 2:49 PM
This comment was removed by ahmedbilal.
ahmedbilal retitled this revision from Increase width of preview of rectangle annotation (dashed rectangle) and set its color same as the color of rectangle that will be created once mouseup event happen. to Improve Legibility of preview of rectangle annotation and make it same color as resulting rectangle.Apr 7 2019, 7:02 PM
ahmedbilal edited the summary of this revision. (Show Details)
aacid added a subscriber: aacid.Apr 7 2019, 7:56 PM

3 is an arbitrary width, so -1 for this change

I'm also not really convinced about he color, but that's less contentious than having a random 3 in there.

3 is an arbitrary width, so -1 for this change

I'm not a huge fan either, but not because it's arbitrary (everything visual is arbitrary) but rather because this makes it look too thick to my eye.

3 is an arbitrary width, so -1 for this change

I'm not a huge fan either, but not because it's arbitrary (everything visual is arbitrary) but rather because this makes it look too thick to my eye.

There is issue with the preview rectangle. May be its just me or may be its for everyone. The rectangle has right and bottom sides thicker than the top and the left sides. Sometimes, top and sometime left even disappears. If we make the width >= 2 the top and left side doesn't disappear atleast.

3 is an arbitrary width, so -1 for this change

I'm not a huge fan either, but not because it's arbitrary (everything visual is arbitrary) but rather because this makes it look too thick to my eye.

There is issue with the preview rectangle. May be its just me or may be its for everyone. The rectangle has right and bottom sides thicker than the top and the left sides. Sometimes, top and sometime left even disappears. If we make the width >= 2 the top and left side doesn't disappear atleast.

Then it seems like the chosen value of 3 is just working around a deeper issue. In such cases, it's universally preferred to investigate and fix that issue rather than work around it.

sander added a subscriber: sander.Apr 9 2019, 8:22 AM

I like the color part of this patch.

As for the line width: As mentioned, '3' is arbitrary. You need to find a width that takes current dpi into account. Ideally, the width should be what later gets written into the pdf file.

The fact that the rectangle is currently not completely drawn sounds like a Qt bug. What is the pen width without your patch? Even if it has width 0 it should paint a 1-pixel line. Or is the page downscaled somewhere after rendering?

ahmedbilal added a comment.EditedApr 9 2019, 9:17 AM

I like the color part of this patch.

As for the line width: As mentioned, '3' is arbitrary. You need to find a width that takes current dpi into account. Ideally, the width should be what later gets written into the pdf file.

The fact that the rectangle is currently not completely drawn sounds like a Qt bug. What is the pen width without your patch? Even if it has width 0 it should paint a 1-pixel line. Or is the page downscaled somewhere after rendering?

@sander I managed to make it the same size as the resultant rectangle. However, @ngraham and @aacid says that the width (3px) is too much for their eyes. So, I think it should be at max 2 or something like that. By default, the pen width is 0 which is actually 1-pixel wide as you mentioned. I will look into it whether it is downscaled or not. Thanks for such nice and helpful comment.

Consider splitting the color change into a separate patch. That part seems to be uncontroversial.

The problem with the '3' is that its perceived thickness depends on your screen size and resolution. What looks good to you may look bad on somebody else's computer.

Consider splitting the color change into a separate patch. That part seems to be uncontroversial.

The problem with the '3' is that its perceived thickness depends on your screen size and resolution. What looks good to you may look bad on somebody else's computer.

Got It. I still can't figure out what is making the top and left side lighter :|

ahmedbilal retitled this revision from Improve Legibility of preview of rectangle annotation and make it same color as resulting rectangle to Improve Legibility of preview of rectangle annotation.Apr 9 2019, 1:23 PM
ahmedbilal abandoned this revision.Apr 10 2019, 6:02 PM