Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-120188

Don't use -1 to denote no individual corner radius

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7
    • Quick: Other
    • None

    Description

      Qt 6.7 added properties for topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius. However, it uses -1 to denote “no specific radius” for that corner and falls back to using the generic radius.

      This leads to unexpected results when using e.g. a calculation or animation that happens to animate via -1 where for a split frame it goes from “no radius” to “global radius” and then starts animating up from zero.

      Setting a negative radius has no effect on the Rectagle, and (needlessly) prints a warning for the corner radii.

      What it could to (to avoid four additional bool ...RadiusExplicitlySet members is to use qNaN as an indication of “no value provided”, or use a bitfield I suppose. If one wants to unset the radius, undefined will do the job via the RESET property anyway.

      -1 should be treated as if the radius was explicitly set to 0 to match the behavior of radius.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            broulik Kai Uwe Broulik
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes