BiglyBT icon indicating copy to clipboard operation
BiglyBT copied to clipboard

"Consistent" tag column margins are actually misaligned

Open ferdnyc opened this issue 2 years ago • 2 comments

Since 1be3bde2dceedc1d5ee2e8f26a24873b6f7a0ffb, the tags column is actually drawn one pixel to the right of the column cell, slightly overlapping the column divider line to the right. Easiest to see with a screenshot blown up to 400% size:

Screenshot from 2022-08-03 16-33-22

It's possible this may have to do with the cell margins, something I struggled with when working on ProgressETA as well. It seemed as though the horizontal margin values are only applied to the left edge of the cell area, so if a table cell was set with 1px margins its area would be constrained to the right of the cell area, with 1px of space to the left.

(Or I could be wrong about that. But I notice that the ProgressETA bar also (still) renders 1px out of alignment to the right, though it doesn't overlap the divider line — it just has an empty pixel of space to its left.)

...Actually, I take that back. Currently, there's a TWO pixel imbalance, horizontally — the bar has a 2px margin to its left, and none on the right. So, maybe the issue is that the horizontal margin is all being applied to the left side, instead of evenly on both sides. That would probably explain the tags column misalignment as well. Again, 400% zoom:

image

System block

Java 11.0.15 (64 bit)
  Red Hat, Inc.
/usr/lib/jvm/java-11-openjdk-11.0.15.0.10-1.fc36.x86_64

SWT v4942r22, gtk/3.24.34, zoom=100, dpi=96
Linux v5.17.12-300.fc36.x86_64, amd64 (64 bit)
B3.1.0.1_B15/4 az3

ferdnyc avatar Aug 03 '22 20:08 ferdnyc

Since 1be3bde,

At least, my guess was that it was that commit. I'm not immediately seeing anything in it that would seem to cause this, but it's a fairly recent change AFAICT — the tags column, like ProgressETA, was always drawn slightly right-of-center, but it wasn't drawing OVER the column divider until fairly recently. Unless I'm completely blind/crazy.

I'm also fairly sure that ProgressETA was less off-center until recently — as I started saying originally, I believe it used to be only ONE pixel misaligned to the right, just like the tags column used to be, until some recent change caused them both to exhibit increased off-centeredness (just, in different ways).

ferdnyc avatar Aug 04 '22 06:08 ferdnyc

Meh. you're right, the cell's bounds includes the right-hand pixels used for drawing the column separator.

Big job to change the reported bounds themselves so not going to do that.

For beta versions I'll add some clipping to the draw code so that the cell can't write over the column line - that'll make the problem clear for cells that are assuming they can.

I'll fix up the Tag Colours and Progress columns to act sensibly, are there any others? :)

parg avatar Aug 05 '22 11:08 parg

Very belatedly answering: Not that I've noticed. And the original ones are sorted, so...closing as fixed, thanks!

ferdnyc avatar Nov 04 '22 23:11 ferdnyc