Opened 5 years ago

#5943 new Bug

Cell size calculation is wrong with over-long torrent names

Reported by: nagisa Owned by: jordan
Priority: Normal Milestone: None Set
Component: GTK+ Client Version: 2.84
Severity: Normal Keywords:
Cc:

Description

If torrent name is long and doesn’t fit into size allocated for the workarea cell width calculation will be wrong in at least gtk+3.16, though I do remember it being wrong before as well.

The issue here is that, first, horizontal scrolling is disabled. Then the client will request area for cell as if it was drawn without ellipsization and proceed trying to draw with some, even though it gets enough space to draw without ellipsization. The end result is depicted well in the attached screenshot.

To solve this a few things need to be done:

  1. Horizontal scrolling should not be disabled, but only happen if non-ellipsizable elements (icon + status text + progress bar in compact mode, for example) do not fit anymore.
  2. Only request enough space to draw non-ellipsizable elements:
    1. MAX(icon_width + status_text_width + progress_bar_width, workarea_width) in compact mode;
    2. MAX(icon_width + status_text_width + status_text2_width, workarea_width) in regular mode.
  3. Ellipsize the torrent title in both modes.

Attachments (1)

Screenshot from 2015-05-04 21-32-45.png (51.6 KB) - added by nagisa 5 years ago.

Download all attachments as: .zip

Change History (1)

Changed 5 years ago by nagisa

Note: See TracTickets for help on using tickets.