顶层可见填充

您在 Figma 中为图层设置的填充样式无法转换为 QML 绘制的单一填充颜色。当出现以下情况时,该图层会报告此问题:

  • 顶层可见填充不被该图层类型支持。文本图层和目标Qt for MCUs 组件支持纯色填充,而EllipseShape 支持纯色和渐变填充。
  • 半透明填充位于渐变或图像填充之上,或位于混合模式非“Normal ”的填充之上。

堆叠的纯色填充在转换时不会出现此问题,即使最上层的填充为半透明也是如此。Figma to Qt 会将填充从上到下混合至第一个完全不透明的填充,最终融合为单一颜色。位于第一个完全不透明填充下方的填充将被隐藏,且不影响结果。

注意: 混合后的颜色以字面值形式写入。如果任何被混合的填充绑定到变量上,则导出的颜色不会绑定到相应的设计令牌,因为没有任何单个令牌能够代表该混合效果。在此情况下,确切的颜色优先于令牌。无需混合的填充将保留其令牌绑定。

选择“Use solid fill ”可在 Figma 中为图层的最上层可见填充使用纯色填充。否则,该图层将作为图像渲染。

另请参阅 “修复转换问题”。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.