Opened 6 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:
- 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.
- Only request enough space to draw non-ellipsizable elements:
- MAX(icon_width + status_text_width + progress_bar_width, workarea_width) in compact mode;
- MAX(icon_width + status_text_width + status_text2_width, workarea_width) in regular mode.
- Ellipsize the torrent title in both modes.
Attachments (1)
Note: See
TracTickets for help on using
tickets.