Refactors

This commit is contained in:
Philip Ridout 2016-12-18 15:10:05 +00:00
parent aa6d0d07e3
commit e261d2e1ba

View File

@ -197,14 +197,9 @@ class MediaManagerItem(QtWidgets.QWidget, RegistryProperties):
""" """
# Add the List widget # Add the List widget
self.list_view = ListWidgetWithDnD(self, self.plugin.name) self.list_view = ListWidgetWithDnD(self, self.plugin.name)
self.list_view.setSpacing(1)
self.list_view.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
self.list_view.setAlternatingRowColors(True)
self.list_view.setObjectName('{name}ListView'.format(name=self.plugin.name)) self.list_view.setObjectName('{name}ListView'.format(name=self.plugin.name))
# Add to page_layout # Add to page_layout
self.page_layout.addWidget(self.list_view) self.page_layout.addWidget(self.list_view)
# define and add the context menu
self.list_view.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
if self.has_edit_icon: if self.has_edit_icon:
create_widget_action(self.list_view, create_widget_action(self.list_view,
text=self.plugin.get_string(StringContent.Edit)['title'], text=self.plugin.get_string(StringContent.Edit)['title'],