Skip to content

Page: Fix title delegate elision glitch

ivan tkachenko requested to merge work/ratijas/title into master

Implicitly sized items like QtQuick/Text don't play nicely with Loader, and generally with kinda-recursive bindings on Layout.* properties.

This combination of two fixes does the trick:

  1. Use extra TextMetrics for reliable width/height values.
  2. Round up text's advance width, so that container loader or layout won't ever round it down (which it did with implicitWidth before).

Before:
image

and also can't reproduce now, but I'm pretty sure I got the same glitch in Discover too.

After: No unnecessary eliding occurs, only when there's not enough space.

Merge request reports