hig icon indicating copy to clipboard operation
hig copied to clipboard

Export theme data to QML

Open nfiniteset opened this issue 5 years ago • 1 comments

As a QT developer I can have theme data as a QML file so I can more easily adopt HIG design in my app


Acceptance criteria

Export one QML file per theme

Theme files will be accessible at this path within the published NPM package.

`@hig/theme-data/qml/darkGrayHighDensityTheme.qml`

Format role names using camel case

E.g. paddingSmall in property int paddingSmall: 2

Format widths as unit-less int and real

As in this example:

property int iconHoverSizeBump: 4
property real iconHoverScale: 1.15

Format colors as hex and alpha hex

As in this example:

property color higStateColorNormal:         "#f5f5f5"
property color higStateColorNormal50:       "#80ffffff"

Open questions

  • Can teams consume QML via NPM?

See an example of a QML file

nfiniteset avatar Mar 06 '19 14:03 nfiniteset

Regarding QML consumption: We wouldn't be able to consume the NPM package directly. We could manually fetch the package, extract the QML file(s), and commit them to our repo. This, of course means some repeated maintenance work. We could automate that process (either through a script or even some Jenkins magic).

Haik.

ndotl avatar Apr 25 '19 08:04 ndotl