diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/Layout.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/Layout.qml index bc133cdd97c8d0f51cd2044ea85fdbd1b98b9fd3..caecee8d153933a962a403252c61201f52b43172 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/Layout.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/Layout.qml @@ -6,19 +6,257 @@ GroupBox { caption: "layout"; -id: layout; - enabled: anchorBackend.hasParent; - - layout: QVBoxLayout { - topMargin: 20; - bottomMargin: 10; - leftMargin: 40; - rightMargin: 20; - spacing: 20 + id: layout; + enabled: anchorBackend.hasParent; + + layout: VerticalLayout { QLabel { - text: "layout" + text: "Anchors" + } + QWidget { + layout: HorizontalLayout { + leftMargin: 10 + + + AnchorButtons {} + } + } + + QWidget { + visible: anchorBackend.topAnchored; + layout : VerticalLayout { + topMargin: 8; + bottomMargin: 4; + rightMargin: 20; + QWidget { + layout: HorizontalLayout { + leftMargin: 10 + QLabel { + //iconFromFile: "qrc:qmldesigner/images/icon-top.png" + fixedWidth: 32 + fixedHeight: 32 + styleSheet: "border-image: url(:/qmldesigner/images/icon-top.png)"; + } + + Label { + text: "Target" + fixedWidth: 90 - 20 - 32 + } + QComboBox { + } + + } + } + + QWidget { + layout : HorizontalLayout { + IntEditor { + slider: false + caption: "Margin" + } + + PlaceHolder { + fixedWidth: 140 + } + } + } + } + } + QWidget { + visible: anchorBackend.bottomAnchored; + layout : VerticalLayout { + topMargin: 8; + bottomMargin: 4; + rightMargin: 20; + QWidget { + layout: HorizontalLayout { + leftMargin: 10 + QLabel { + //iconFromFile: "qrc:qmldesigner/images/icon-top.png" + fixedWidth: 32 + fixedHeight: 32 + styleSheet: "border-image: url(:/qmldesigner/images/icon-bottom.png)"; + } + + Label { + text: "Target" + fixedWidth: 90 - 20 - 32 + } + QComboBox { + } + + } + } + + QWidget { + layout : HorizontalLayout { + IntEditor { + slider: false + caption: "Margin" + } + + PlaceHolder { + fixedWidth: 140 + } + } + } + } } - AnchorButtons {} - } + QWidget { + visible: anchorBackend.leftAnchored; + layout : VerticalLayout { + topMargin: 8; + bottomMargin: 4; + rightMargin: 20; + QWidget { + layout: HorizontalLayout { + leftMargin: 10 + QLabel { + //iconFromFile: "qrc:qmldesigner/images/icon-top.png" + fixedWidth: 32 + fixedHeight: 32 + styleSheet: "border-image: url(:/qmldesigner/images/icon-left.png)"; + } + Label { + text: "Target" + fixedWidth: 90 - 20 - 32 + } + QComboBox { + } + } + } + + QWidget { + layout : HorizontalLayout { + IntEditor { + slider: false + caption: "Margin" + } + + PlaceHolder { + fixedWidth: 140 + } + } + } + } + } + QWidget { + visible: anchorBackend.rightAnchored; + layout : VerticalLayout { + topMargin: 8; + bottomMargin: 4; + rightMargin: 20; + QWidget { + layout: HorizontalLayout { + leftMargin: 10 + QLabel { + //iconFromFile: "qrc:qmldesigner/images/icon-top.png" + fixedWidth: 32 + fixedHeight: 32 + styleSheet: "border-image: url(:/qmldesigner/images/icon-right.png)"; + } + + Label { + text: "Target" + fixedWidth: 90 - 20 - 32 + } + QComboBox { + } + } + } + + QWidget { + layout : HorizontalLayout { + IntEditor { + slider: false + caption: "Margin" + } + + PlaceHolder { + fixedWidth: 140 + } + } + } + } + } + QWidget { + visible: anchorBackend.horizontalCentered + layout : VerticalLayout { + topMargin: 8; + bottomMargin: 4; + rightMargin: 20; + QWidget { + layout: HorizontalLayout { + leftMargin: 10 + QLabel { + //iconFromFile: "qrc:qmldesigner/images/icon-top.png" + fixedWidth: 32 + fixedHeight: 32 + styleSheet: "border-image: url(:/qmldesigner/images/icon-horizontal.png)"; + } + + Label { + text: "Target" + fixedWidth: 90 - 20 - 32 + } + QComboBox { + } + } + } + + QWidget { + layout : HorizontalLayout { + IntEditor { + slider: false + caption: "Margin" + } + + PlaceHolder { + fixedWidth: 140 + } + } + } + } + } + QWidget { + visible: anchorBackend.verticalCentered + layout : VerticalLayout { + topMargin: 8; + bottomMargin: 4; + rightMargin: 20; + QWidget { + layout: HorizontalLayout { + leftMargin: 10 + QLabel { + //iconFromFile: "qrc:qmldesigner/images/icon-top.png" + fixedWidth: 32 + fixedHeight: 32 + styleSheet: "border-image: url(:/qmldesigner/images/icon-vertical.png)"; + } + + Label { + text: "Target" + fixedWidth: 90 - 20 - 32 + } + QComboBox { + } + } + } + + QWidget { + layout : HorizontalLayout { + IntEditor { + slider: false + caption: "Margin" + } + + PlaceHolder { + fixedWidth: 140 + } + } + } + } + } + } }