Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
QDS 4.7.1
-
None
Description
Tested Environment
- QDS 4.7.1
- Figma Bridge for Qt 4.7.1
- Minimal Reproduction Project: https://git.qt.io/mikio_hirai/figma-bridge-component-extention/-/tree/edbd3dc22b0fd0e041b499e02475a59aa01099a8
Issue
Extending an instance of Component inserts unnecesary transparent Rectangle.
Steps to reproduce
(1) Create some Components.
(2) Extend the instances of the Components. In this example, the size has been changed. The extended instances are made as Components.
(3) Use the extended Components in the design.
(4) Export the design with Export complete instances[BETA] enabled and import the Component_Extension.qtbridge.
Issue in detail
If you see the generated code for the extended components, you see there's a root level, unnecessary transparent Rectangle inserted.
This code should've been generated like this:
import QtQuick import QtQuick.Controls MyButton { id: myButton_130x78 color: "#ffffff" anchors.left: parent.left anchors.right: parent.right anchors.top: parent.top anchors.bottom: parent.bottom width: 130 // <-- this part is generated as a result of extending the component height: 78 // <-- this part too. press_MeY: 32 press_MeX: 38 clip: true } }