forked from openlp/openlp
do not pass QImages to build_icon (if not needed)
This commit is contained in:
parent
7b7cbc588c
commit
2d22e8420a
@ -155,7 +155,7 @@ def build_icon(icon):
|
||||
|
||||
``icon``
|
||||
The icon to build. This can be a QIcon, a resource string in the form ``:/resource/file.png``, or a file
|
||||
location like ``/path/to/file.png``.
|
||||
location like ``/path/to/file.png``. However, the **recommended** way is to specify a resource string.
|
||||
"""
|
||||
button_icon = QtGui.QIcon()
|
||||
if isinstance(icon, QtGui.QIcon):
|
||||
|
@ -295,8 +295,8 @@ class ServiceManager(QtGui.QWidget, ServiceManagerDialog):
|
||||
Sets up the service manager, toolbars, list view, et al.
|
||||
"""
|
||||
QtGui.QWidget.__init__(self, parent)
|
||||
self.active = build_icon(QtGui.QImage(u':/media/auto-start_active.png'))
|
||||
self.inactive = build_icon(QtGui.QImage(u':/media/auto-start_inactive.png'))
|
||||
self.active = build_icon(u':/media/auto-start_active.png')
|
||||
self.inactive = build_icon(u':/media/auto-start_inactive.png')
|
||||
Registry().register(u'service_manager', self)
|
||||
self.service_items = []
|
||||
self.suffixes = []
|
||||
|
@ -75,9 +75,9 @@ class Ui_AlertDialog(object):
|
||||
self.manage_button_layout.addWidget(self.delete_button)
|
||||
self.manage_button_layout.addStretch()
|
||||
self.alert_dialog_layout.addLayout(self.manage_button_layout, 1, 1)
|
||||
displayIcon = build_icon(u':/general/general_live.png')
|
||||
self.display_button = create_button(alert_dialog, u'display_button', icon=displayIcon, enabled=False)
|
||||
self.display_close_button = create_button(alert_dialog, u'display_close_button', icon=displayIcon,
|
||||
display_icon = build_icon(u':/general/general_live.png')
|
||||
self.display_button = create_button(alert_dialog, u'display_button', icon=display_icon, enabled=False)
|
||||
self.display_close_button = create_button(alert_dialog, u'display_close_button', icon=display_icon,
|
||||
enabled=False)
|
||||
self.button_box = create_button_box(alert_dialog, u'button_box', [u'close'],
|
||||
[self.display_button, self.display_close_button])
|
||||
|
@ -44,10 +44,10 @@ log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
CLAPPERBOARD = u':/media/slidecontroller_multimedia.png'
|
||||
VIDEO_ICON = build_icon(QtGui.QImage(u':/media/media_video.png'))
|
||||
AUDIO_ICON = build_icon(QtGui.QImage(u':/media/media_audio.png'))
|
||||
DVD_ICON = build_icon(QtGui.QImage(u':/media/media_video.png'))
|
||||
ERROR_ICON = build_icon(QtGui.QImage(u':/general/general_delete.png'))
|
||||
VIDEO_ICON = build_icon(u':/media/media_video.png')
|
||||
AUDIO_ICON = build_icon(u':/media/media_audio.png')
|
||||
DVD_ICON = build_icon(u':/media/media_video.png')
|
||||
ERROR_ICON = build_icon(u':/general/general_delete.png')
|
||||
|
||||
|
||||
class MediaMediaItem(MediaManagerItem):
|
||||
|
Loading…
Reference in New Issue
Block a user