Skip to content

Cosmetic: Elements of the History-List row do not line-up vertically #679

Closed

Description

@goneng

In a single history row the short SHA, the ref labels, the subject and the date do not sit on the same line.
The difference is small but constant, so a long list looks ragged.

Visual Example

Before

Image

 

After

Image

 

Highlights

  1. Main text is positioned a bit higher in the line (see the M and the #674 for example)
  2. Backgrounds of Labels/Tags (like master and origin/master) are sitting at the vertical center of the line - OK
  3. The text on the labels is positioned a bit lower on the label background (see the / in origin/master for example)

Technical Description

The cause is that one row is laid out by three different rules.

1. The plain columns. ShortSHAColumn, AuthorColumn, DateColumn and RelativeDateColumn are stock textFieldCell inside their own tableCellView, so AppKit centres them.

2. The subject column is PBGitRevisionCell, an NSTableCellView that moves its own text field in -layout:

frame.origin.y = floor((self.bounds.size.height - frame.size.height) / 2) - 1;

Two things there. The - 1 is an unexplained nudge away from centre, and the whole block runs only if (cellInfo), so a row with no graph line info never gets repositioned at all and keeps whatever frame the nib gave it.

3. The ref labels are centred separately, on their own text height, against the rect left over after the graph column is divided off:

newRect.origin.y = rect.origin.y + (rect.size.height - newRect.size.height) / 2;

So the labels follow the label text metrics while the subject beside them follows the text field's frame height, minus one.

Suggested fix

Pick one rule for the row. Either let autolayout centre the subject text field with a centerY constraint and delete the manual frame arithmetic, or centre the labels and the subject against the same rect with the same metric and drop the - 1.

Whichever way, the if (cellInfo) path needs an answer for rows without line info, since today they are the odd ones out.

Worth checking the result at more than one row height: the table is view-based with rowHeight="20" and rowSizeStyle="automatic", so a different control size changes these numbers.

Activity

  1. self-assigned this
    on Sep 19, 2026
  2. changed the title [-]History pane: the elements of a row do not line up vertically[/-] [+]Cosmetic: Elements of the History-List row do not line-up vertically[/+] on Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions