forked from openlp/openlp
Re-enable the stylesheet, remove icon in mediamanager to fix rendering in plasma
This commit is contained in:
parent
ad37560ecd
commit
9d8c757d0d
@ -275,7 +275,7 @@ class Plugin(QtCore.QObject, RegistryProperties):
|
||||
"""
|
||||
if self.media_item:
|
||||
self.media_item.initialise()
|
||||
self.main_window.media_dock_manager.insert_dock(self.media_item, self.icon, self.weight)
|
||||
self.main_window.media_dock_manager.add_item_to_dock(self.media_item)
|
||||
|
||||
def finalise(self):
|
||||
"""
|
||||
|
@ -153,8 +153,7 @@ class Ui_MainWindow(object):
|
||||
# Create the MediaManager
|
||||
self.media_manager_dock = OpenLPDockWidget(main_window, 'media_manager_dock',
|
||||
':/system/system_mediamanager.png')
|
||||
# TODO: Figure out how to fix the stylesheet and add it back in
|
||||
# self.media_manager_dock.setStyleSheet(MEDIA_MANAGER_STYLE)
|
||||
self.media_manager_dock.setStyleSheet(MEDIA_MANAGER_STYLE)
|
||||
# Create the media toolbox
|
||||
self.media_tool_box = QtWidgets.QToolBox(self.media_manager_dock)
|
||||
self.media_tool_box.setObjectName('media_tool_box')
|
||||
|
@ -39,23 +39,12 @@ class MediaDockManager(object):
|
||||
"""
|
||||
self.media_dock = media_dock
|
||||
|
||||
def add_dock(self, media_item, icon, weight):
|
||||
def add_item_to_dock(self, media_item):
|
||||
"""
|
||||
Add a MediaManagerItem to the dock
|
||||
If the item has been added before, it's silently skipped
|
||||
|
||||
:param media_item: The item to add to the dock
|
||||
:param icon: An icon for this dock item
|
||||
:param weight:
|
||||
"""
|
||||
visible_title = media_item.plugin.get_string(StringContent.VisibleName)
|
||||
log.info('Adding %s dock' % visible_title)
|
||||
self.media_dock.addItem(media_item, icon, visible_title['title'])
|
||||
|
||||
def insert_dock(self, media_item, icon, weight):
|
||||
"""
|
||||
This should insert a dock item at a given location
|
||||
This does not work as it gives a Segmentation error.
|
||||
For now add at end of stack if not present
|
||||
:param media_item: The item to add to the dock
|
||||
"""
|
||||
visible_title = media_item.plugin.get_string(StringContent.VisibleName)
|
||||
log.debug('Inserting %s dock' % visible_title['title'])
|
||||
@ -65,7 +54,7 @@ class MediaDockManager(object):
|
||||
match = True
|
||||
break
|
||||
if not match:
|
||||
self.media_dock.addItem(media_item, icon, visible_title['title'])
|
||||
self.media_dock.addItem(media_item, visible_title['title'])
|
||||
|
||||
def remove_dock(self, media_item):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user