diff options
Diffstat (limited to 'share/qtcreator/qmldesigner/itemLibraryQmlSources/AssetsView.qml')
-rw-r--r-- | share/qtcreator/qmldesigner/itemLibraryQmlSources/AssetsView.qml | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/share/qtcreator/qmldesigner/itemLibraryQmlSources/AssetsView.qml b/share/qtcreator/qmldesigner/itemLibraryQmlSources/AssetsView.qml index e1c017814d..77a784d92d 100644 --- a/share/qtcreator/qmldesigner/itemLibraryQmlSources/AssetsView.qml +++ b/share/qtcreator/qmldesigner/itemLibraryQmlSources/AssetsView.qml @@ -162,6 +162,7 @@ ScrollView { // TODO: experiment using ListView instead of ScrollView + Column readonly property string suffix: fileName.substr(-4) readonly property bool isFont: suffix === ".ttf" || suffix === ".otf" + readonly property bool isEffect: suffix === ".qep" property bool currFileSelected: false MouseArea { @@ -180,7 +181,7 @@ ScrollView { // TODO: experiment using ListView instead of ScrollView + Column allowTooltip = true } onPositionChanged: tooltipBackend.reposition() - onPressed: (mouse)=> { + onPressed: (mouse) => { forceActiveFocus() allowTooltip = false tooltipBackend.hideTooltip() @@ -212,7 +213,7 @@ ScrollView { // TODO: experiment using ListView instead of ScrollView + Column } } - onReleased: (mouse)=> { + onReleased: (mouse) => { allowTooltip = true if (mouse.button === Qt.LeftButton) { if (!(mouse.modifiers & Qt.ControlModifier)) @@ -222,6 +223,14 @@ ScrollView { // TODO: experiment using ListView instead of ScrollView + Column } } + onDoubleClicked: (mouse) => { + forceActiveFocus() + allowTooltip = false + tooltipBackend.hideTooltip() + if (mouse.button === Qt.LeftButton && isEffect) + rootView.openEffectMaker(filePath) + } + ToolTip { visible: !isFont && mouseArea.containsMouse && !contextMenu.visible text: filePath |