Widget 2.0: Tableview row contentHeight/width issue

How come the row.contentHeight and row.contentWidth are always 2 pixels taller/wider than the actual height/width? There are two other properties called .height and .width, but they return the same values as the aforementioned properties.

I can get the actual height and width by accessing the private properties ._height and ._width, but I’m curious as to what the discrepancy is about.

I think I’ve figured this out.

It turns out that the line between rows is created by adding a 1 pixel border around each row.

This has the effect that the row’s height and width is expanded on by 1 pixel on each side (left/right and top/bottom), resulting in a 2 pixel wider/taller row.

What threw me off a bit is that even if ‘noLines=true’ is given as an option for the tableView, there’s still a line added around each row. It’s just that the color is set to the default row color.

I think I’ve figured this out.

It turns out that the line between rows is created by adding a 1 pixel border around each row.

This has the effect that the row’s height and width is expanded on by 1 pixel on each side (left/right and top/bottom), resulting in a 2 pixel wider/taller row.

What threw me off a bit is that even if ‘noLines=true’ is given as an option for the tableView, there’s still a line added around each row. It’s just that the color is set to the default row color.