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

Add Icon component to Controls

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • None
    • Quick: Controls 2
    • None

    Description

      Qt Quick Controls has some components (e.g. AbstractButton and all derived components) that show icons. These icons are set using properties such as icon.source. When displayed, they will change color depending on the current color scheme (e.g. Material.Dark will display all icons as white). Sometimes, such icons would be useful to use without being attached to an AbstractButton, MenuItem, or other such component; instead, they could be shown as context for a Label. I propose that the existing icon code be reused to create an Icon component that has approximately the following API:

      // Icon.qml
      Control {
          property string source // path to icon file
          property string name // used to choose a system icon on Linux
          property color color // used to override the icon's color
          property bool cache: true // caches the icon
      }
      

      This API is largely copied from existing icon interfaces.

      Attachments

        Issue Links

          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
              lorendb Loren Burkholder
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes