forked from qt-creator/qt-creator
QmlDesigner: Add an optional close button to the Section
Change-Id: Ia74fc19a10a40290626c20e57150c444d394523d Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -18,6 +18,8 @@ Item {
|
|||||||
property alias showTopSeparator: topSeparator.visible
|
property alias showTopSeparator: topSeparator.visible
|
||||||
property alias showArrow: arrow.visible
|
property alias showArrow: arrow.visible
|
||||||
property alias showLeftBorder: leftBorder.visible
|
property alias showLeftBorder: leftBorder.visible
|
||||||
|
property alias showCloseButton: closeButton.visible
|
||||||
|
property alias closeButtonToolTip: closeButton.tooltip
|
||||||
property alias spacing: column.spacing
|
property alias spacing: column.spacing
|
||||||
|
|
||||||
property int leftPadding: StudioTheme.Values.sectionLeftPadding
|
property int leftPadding: StudioTheme.Values.sectionLeftPadding
|
||||||
@@ -79,6 +81,7 @@ Item {
|
|||||||
signal toggleExpand()
|
signal toggleExpand()
|
||||||
signal expand()
|
signal expand()
|
||||||
signal collapse()
|
signal collapse()
|
||||||
|
signal closeButtonClicked()
|
||||||
|
|
||||||
DropArea {
|
DropArea {
|
||||||
id: dropArea
|
id: dropArea
|
||||||
@@ -157,6 +160,20 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IconButton {
|
||||||
|
id: closeButton
|
||||||
|
|
||||||
|
icon: StudioTheme.Constants.close_small
|
||||||
|
buttonSize: 22
|
||||||
|
iconScale: containsMouse ? 1.2 : 1
|
||||||
|
transparentBg: true
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 10
|
||||||
|
visible: false
|
||||||
|
|
||||||
|
onClicked: root.closeButtonClicked()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
Reference in New Issue
Block a user