forked from qt-creator/qt-creator
QmlDesigner ColorPalette StudioControls usage
Change-Id: Ia1c2daa693e9c2c2a2808cf6fab65a2b60014456 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
committed by
Thomas Hartmann
parent
f3c2fcef1a
commit
469647db3d
@@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
import QtQuick 2.1
|
import QtQuick 2.1
|
||||||
import QtQuick.Controls 2.5
|
import QtQuick.Controls 2.5
|
||||||
|
import StudioControls 1.0 as StudioControls
|
||||||
import HelperWidgets 2.0
|
import HelperWidgets 2.0
|
||||||
import QtQuick.Controls.Private 1.0 // showing a ToolTip
|
import QtQuick.Controls.Private 1.0 // showing a ToolTip
|
||||||
|
|
||||||
@@ -79,11 +80,9 @@ Item {
|
|||||||
contextMenu.popup()
|
contextMenu.popup()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Menu {
|
StudioControls.Menu {
|
||||||
id: contextMenu
|
id: contextMenu
|
||||||
modal: true
|
StudioControls.MenuItem {
|
||||||
closePolicy: Popup.CloseOnPressOutside | Popup.CloseOnEscape
|
|
||||||
MenuItem {
|
|
||||||
text: (backgroundColor.favorite
|
text: (backgroundColor.favorite
|
||||||
? qsTr("Remove from Favorites")
|
? qsTr("Remove from Favorites")
|
||||||
: qsTr("Add to Favorites"))
|
: qsTr("Add to Favorites"))
|
||||||
@@ -91,10 +90,6 @@ Item {
|
|||||||
paletteModel.toggleFavorite(index)
|
paletteModel.toggleFavorite(index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Overlay.modal: Rectangle {
|
|
||||||
color: "transparent"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user