Merge pull request #1111 from JoeXinfa/add-label
Add name label to GradientEditorItem
This commit is contained in:
commit
93f8ee9f0a
@ -438,8 +438,14 @@ class GradientEditorItem(TickSliderItem):
|
||||
label = QtGui.QLabel()
|
||||
label.setPixmap(px)
|
||||
label.setContentsMargins(1, 1, 1, 1)
|
||||
labelName = QtGui.QLabel(g)
|
||||
hbox = QtGui.QHBoxLayout()
|
||||
hbox.addWidget(labelName)
|
||||
hbox.addWidget(label)
|
||||
widget = QtGui.QWidget()
|
||||
widget.setLayout(hbox)
|
||||
act = QtGui.QWidgetAction(self)
|
||||
act.setDefaultWidget(label)
|
||||
act.setDefaultWidget(widget)
|
||||
act.triggered.connect(self.contextMenuClicked)
|
||||
act.name = g
|
||||
self.menu.addAction(act)
|
||||
|
Loading…
Reference in New Issue
Block a user