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

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

    XMLWordPrintable

Details

    • 727d23503 (dev)
    • Foundation Sprint 122, Foundation Sprint 123, Foundation Sprint 124, Foundation Sprint 125, Foundation Sprint 126

    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

            magdalenas Magdalena Stojek
            broulik Kai Uwe Broulik
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes