forked from qt-creator/qt-creator
QmlDesigner: Show content library material + button only on hover
Fixes: QDS-8486 Change-Id: I2207e6558d2124bd9f602e6571ac3958da3c9cdf Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
@@ -19,6 +19,7 @@ Item {
|
|||||||
MouseArea {
|
MouseArea {
|
||||||
id: mouseArea
|
id: mouseArea
|
||||||
|
|
||||||
|
hoverEnabled: true
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||||
|
|
||||||
@@ -81,6 +82,7 @@ Item {
|
|||||||
anchors.right: img.right
|
anchors.right: img.right
|
||||||
anchors.bottom: img.bottom
|
anchors.bottom: img.bottom
|
||||||
enabled: !materialsModel.importerRunning
|
enabled: !materialsModel.importerRunning
|
||||||
|
visible: containsMouse || mouseArea.containsMouse
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
materialsModel.addToProject(modelData)
|
materialsModel.addToProject(modelData)
|
||||||
|
@@ -14,6 +14,7 @@ Rectangle {
|
|||||||
property alias icon: icon.text
|
property alias icon: icon.text
|
||||||
property alias tooltip: toolTip.text
|
property alias tooltip: toolTip.text
|
||||||
property alias iconSize: icon.font.pixelSize
|
property alias iconSize: icon.font.pixelSize
|
||||||
|
property alias containsMouse: mouseArea.containsMouse
|
||||||
|
|
||||||
property bool enabled: true
|
property bool enabled: true
|
||||||
property int buttonSize: StudioTheme.Values.height
|
property int buttonSize: StudioTheme.Values.height
|
||||||
|
Reference in New Issue
Block a user