This commit is contained in:
Tim Bentley 2018-04-13 19:54:42 +01:00
parent e6fbdc4f9b
commit faee3109e5
33 changed files with 44 additions and 57 deletions

View File

@ -33,6 +33,7 @@ from openlp.core.common.i18n import UiStrings, format_time, translate
from openlp.core.common.settings import Settings
from openlp.core.lib import SettingsTab, build_icon
from openlp.core.ui.style import HAS_DARK_STYLE
from openlp.core.ui.icons import UiIcons
from openlp.core.widgets.edits import PathEdit
from openlp.core.widgets.enums import PathEditType
@ -131,7 +132,7 @@ class AdvancedTab(SettingsTab):
self.new_data_directory_has_files_label.setWordWrap(True)
self.data_directory_cancel_button = QtWidgets.QToolButton(self.data_directory_group_box)
self.data_directory_cancel_button.setObjectName('data_directory_cancel_button')
self.data_directory_cancel_button.setIcon(build_icon(':/general/general_delete.png'))
self.data_directory_cancel_button.setIcon(UiIcons().delete)
self.data_directory_copy_check_layout = QtWidgets.QHBoxLayout()
self.data_directory_copy_check_layout.setObjectName('data_directory_copy_check_layout')
self.data_directory_copy_check_box = QtWidgets.QCheckBox(self.data_directory_group_box)
@ -211,7 +212,7 @@ class AdvancedTab(SettingsTab):
self.service_name_edit.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp(r'[^/\\?*|<>\[\]":+]+'), self))
self.service_name_revert_button = QtWidgets.QToolButton(self.service_name_group_box)
self.service_name_revert_button.setObjectName('service_name_revert_button')
self.service_name_revert_button.setIcon(build_icon(':/general/general_revert.png'))
self.service_name_revert_button.setIcon(UiIcons().undo)
self.service_name_button_layout = QtWidgets.QHBoxLayout()
self.service_name_button_layout.setObjectName('service_name_button_layout')
self.service_name_button_layout.addWidget(self.service_name_edit)

View File

@ -79,7 +79,7 @@ class Ui_ExceptionDialog(object):
icon=UiIcons().save,
click=self.on_save_report_button_clicked)
self.attach_tile_button = create_button(exception_dialog, 'attach_tile_button',
icon=':/general/general_open.png',
icon=UiIcons().open,
click=self.on_attach_file_button_clicked)
self.button_box = create_button_box(exception_dialog, 'button_box', ['close'],
[self.send_report_button, self.save_report_button, self.attach_tile_button])

View File

@ -106,8 +106,8 @@ class OpenLPWizard(QtWidgets.QWizard, RegistryProperties):
self.with_progress_page = add_progress_page
self.setFixedWidth(640)
self.setObjectName(name)
self.open_icon = build_icon(':/general/general_open.png')
self.delete_icon = build_icon(':/general/general_delete.png')
self.open_icon = UiIcons().open
self.delete_icon = UiIcons().delete
self.finish_button = self.button(QtWidgets.QWizard.FinishButton)
self.cancel_button = self.button(QtWidgets.QWizard.CancelButton)
self.setupUi(image)

View File

@ -78,9 +78,8 @@ 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)
display_icon = build_icon(':/general/general_live.png')
self.display_button = create_button(alert_dialog, 'display_button', icon=display_icon, enabled=False)
self.display_close_button = create_button(alert_dialog, 'display_close_button', icon=display_icon,
self.display_button = create_button(alert_dialog, 'display_button', icon=UiIcons().live, enabled=False)
self.display_close_button = create_button(alert_dialog, 'display_close_button', icon=UiIcons().live,
enabled=False)
self.button_box = create_button_box(alert_dialog, 'button_box', ['close'],
[self.display_button, self.display_close_button])

View File

@ -25,6 +25,7 @@ from PyQt5 import QtWidgets
from openlp.core.common.i18n import UiStrings, translate
from openlp.core.lib import build_icon
from openlp.core.lib.ui import create_button, create_button_box
from openlp.core.ui.icons import UiIcons
from openlp.core.widgets.edits import SpellTextEdit
@ -37,9 +38,8 @@ class Ui_CustomSlideEditDialog(object):
self.slide_text_edit = SpellTextEdit(self)
self.slide_text_edit.setObjectName('slide_text_edit')
self.dialog_layout.addWidget(self.slide_text_edit)
self.split_button = create_button(custom_slide_edit_dialog, 'splitButton', icon=':/general/general_add.png')
self.insert_button = create_button(custom_slide_edit_dialog, 'insertButton',
icon=':/general/general_add.png')
self.split_button = create_button(custom_slide_edit_dialog, 'splitButton', icon=UiIcons().add)
self.insert_button = create_button(custom_slide_edit_dialog, 'insertButton', icon=UiIcons().add)
self.button_box = create_button_box(custom_slide_edit_dialog, 'button_box', ['cancel', 'save'],
[self.split_button, self.insert_button])
self.dialog_layout.addWidget(self.button_box)

View File

@ -31,6 +31,7 @@ from openlp.core.common.settings import Settings
from openlp.core.lib import MediaManagerItem, ItemCapabilities, ServiceItemContext, PluginStatus, \
check_item_selected
from openlp.core.lib.ui import create_widget_action
from openlp.core.ui.icons import UiIcons
from openlp.plugins.custom.forms.editcustomform import EditCustomForm
from openlp.plugins.custom.lib import CustomXMLParser, CustomXMLBuilder
from openlp.plugins.custom.lib.db import CustomSlide
@ -88,7 +89,7 @@ class CustomMediaItem(MediaManagerItem):
def add_custom_context_actions(self):
create_widget_action(self.list_view, separator=True)
create_widget_action(
self.list_view, text=translate('OpenLP.MediaManagerItem', '&Clone'), icon=':/general/general_clone.png',
self.list_view, text=translate('OpenLP.MediaManagerItem', '&Clone'), icon=UiIcons().clone,
triggers=self.on_clone_click)
def config_update(self):

View File

@ -33,6 +33,7 @@ from openlp.core.common.settings import Settings
from openlp.core.lib import ItemCapabilities, MediaManagerItem, ServiceItemContext, StringContent, build_icon, \
check_item_selected, create_thumb, validate_thumb
from openlp.core.lib.ui import create_widget_action, critical_error_message_box
from openlp.core.ui.icons import UiIcons
from openlp.core.widgets.views import TreeWidgetWithDnD
from openlp.plugins.images.forms import AddGroupForm, ChooseGroupForm
from openlp.plugins.images.lib.db import ImageFilenames, ImageGroups
@ -127,21 +128,21 @@ class ImageMediaItem(MediaManagerItem):
create_widget_action(
self.list_view,
text=self.plugin.get_string(StringContent.Edit)['title'],
icon=':/general/general_edit.png',
icon=UiIcons().edit,
triggers=self.on_edit_click)
create_widget_action(self.list_view, separator=True)
create_widget_action(
self.list_view,
'listView{name}{preview}Item'.format(name=self.plugin.name.title(), preview=StringContent.Preview.title()),
text=self.plugin.get_string(StringContent.Preview)['title'],
icon=':/general/general_preview.png',
icon=UiIcons().preview,
can_shortcuts=True,
triggers=self.on_preview_click)
create_widget_action(
self.list_view,
'listView{name}{live}Item'.format(name=self.plugin.name.title(), live=StringContent.Live.title()),
text=self.plugin.get_string(StringContent.Live)['title'],
icon=':/general/general_live.png',
icon=UiIcons().live,
can_shortcuts=True,
triggers=self.on_live_click)
create_widget_action(
@ -149,14 +150,14 @@ class ImageMediaItem(MediaManagerItem):
'listView{name}{service}Item'.format(name=self.plugin.name.title(), service=StringContent.Service.title()),
can_shortcuts=True,
text=self.plugin.get_string(StringContent.Service)['title'],
icon=':/general/general_add.png',
icon=UiIcons().add,
triggers=self.on_add_click)
if self.add_to_service_item:
create_widget_action(self.list_view, separator=True)
create_widget_action(
self.list_view,
text=translate('OpenLP.MediaManagerItem', '&Add to selected Service Item'),
icon=':/general/general_add.png',
icon=UiIcons().add,
triggers=self.on_add_edit_click)
create_widget_action(self.list_view, separator=True)
if self.has_delete_icon:
@ -164,7 +165,7 @@ class ImageMediaItem(MediaManagerItem):
self.list_view,
'listView{name}{delete}Item'.format(name=self.plugin.name.title(), delete=StringContent.Delete.title()),
text=self.plugin.get_string(StringContent.Delete)['title'],
icon=':/general/general_delete.png',
icon=UiIcons().delete,
can_shortcuts=True, triggers=self.on_delete_click)
self.add_custom_context_actions()
# Create the context menu and add all actions from the list_view.
@ -186,7 +187,7 @@ class ImageMediaItem(MediaManagerItem):
create_widget_action(
self.list_view,
text=translate('ImagePlugin', 'Add new image(s)'),
icon=':/general/general_open.png', triggers=self.on_file_click)
icon=UiIcons().open, triggers=self.on_file_click)
create_widget_action(self.list_view, separator=True)
self.replace_action_context = create_widget_action(
self.list_view, text=UiStrings().ReplaceBG, icon=':/slides/slide_theme.png',
@ -371,7 +372,7 @@ class ImageMediaItem(MediaManagerItem):
file_name = image.file_path.name
thumbnail_path = self.generate_thumbnail_path(image)
if not image.file_path.exists():
icon = build_icon(':/general/general_delete.png')
icon = UiIcons().delete
else:
if validate_thumb(image.file_path, thumbnail_path):
icon = build_icon(thumbnail_path)

View File

@ -35,6 +35,7 @@ from openlp.core.lib import ItemCapabilities, MediaManagerItem, MediaType, Servi
build_icon, check_item_selected
from openlp.core.lib.ui import create_widget_action, critical_error_message_box, create_horizontal_adjusting_combo_box
from openlp.core.ui import DisplayControllerType
from openlp.core.ui.icons import UiIcons
from openlp.core.ui.media import get_media_players, set_media_players, parse_optical_path, format_milliseconds
from openlp.core.ui.media.vlcplayer import get_vlc
@ -70,7 +71,7 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties):
self.optical_icon = build_icon(':/media/media_optical.png')
self.video_icon = build_icon(':/media/media_video.png')
self.audio_icon = build_icon(':/media/media_audio.png')
self.error_icon = build_icon(':/general/general_delete.png')
self.error_icon = UiIcons().delete
def setup_item(self):
"""

View File

@ -30,6 +30,7 @@ from openlp.core.common.settings import Settings
from openlp.core.lib import MediaManagerItem, ItemCapabilities, ServiceItemContext, \
build_icon, check_item_selected, create_thumb, validate_thumb
from openlp.core.lib.ui import critical_error_message_box, create_horizontal_adjusting_combo_box
from openlp.core.ui.icons import UiIcons
from openlp.plugins.presentations.lib import MessageListener
from openlp.plugins.presentations.lib.pdfcontroller import PDF_CONTROLLER_FILETYPES
@ -196,7 +197,7 @@ class PresentationMediaItem(MediaManagerItem):
preview_path = doc.get_thumbnail_path(1, True)
doc.close_presentation()
if not (preview_path and preview_path.exists()):
icon = build_icon(':/general/general_delete.png')
icon = UiIcons().delete
else:
if validate_thumb(preview_path, thumbnail_path):
icon = build_icon(thumbnail_path)
@ -204,7 +205,7 @@ class PresentationMediaItem(MediaManagerItem):
icon = create_thumb(preview_path, thumbnail_path)
else:
if initial_load:
icon = build_icon(':/general/general_delete.png')
icon = UiIcons().delete
else:
critical_error_message_box(UiStrings().UnsupportedFile,
translate('PresentationPlugin.MediaItem',

View File

@ -25,6 +25,7 @@ from PyQt5 import QtCore, QtWidgets
from openlp.core.common.i18n import UiStrings
from openlp.core.lib import build_icon
from openlp.core.lib.ui import create_button_box
from openlp.core.ui.icons import UiIcons
from openlp.plugins.songs.lib.ui import SongStrings
@ -67,15 +68,15 @@ class Ui_SongMaintenanceDialog(object):
self.authors_buttons_layout.setObjectName('authors_buttons_layout')
self.authors_buttons_layout.addStretch()
self.add_author_button = QtWidgets.QPushButton(self.authors_page)
self.add_author_button.setIcon(build_icon(':/songs/author_add.png'))
self.add_author_button.setIcon(UiIcons().add)
self.add_author_button.setObjectName('add_author_button')
self.authors_buttons_layout.addWidget(self.add_author_button)
self.edit_author_button = QtWidgets.QPushButton(self.authors_page)
self.edit_author_button.setIcon(build_icon(':/songs/author_edit.png'))
self.edit_author_button.setIcon(UiIcons().edit)
self.edit_author_button.setObjectName('edit_author_button')
self.authors_buttons_layout.addWidget(self.edit_author_button)
self.delete_author_button = QtWidgets.QPushButton(self.authors_page)
self.delete_author_button.setIcon(build_icon(':/songs/author_delete.png'))
self.delete_author_button.setIcon(UiIcons().delete)
self.delete_author_button.setObjectName('delete_author_button')
self.authors_buttons_layout.addWidget(self.delete_author_button)
self.authors_layout.addLayout(self.authors_buttons_layout)
@ -92,15 +93,15 @@ class Ui_SongMaintenanceDialog(object):
self.topics_buttons_layout.setObjectName('topicsButtonLayout')
self.topics_buttons_layout.addStretch()
self.add_topic_button = QtWidgets.QPushButton(self.topics_page)
self.add_topic_button.setIcon(build_icon(':/songs/topic_add.png'))
self.add_topic_button.setIcon(UiIcons().add)
self.add_topic_button.setObjectName('add_topic_button')
self.topics_buttons_layout.addWidget(self.add_topic_button)
self.edit_topic_button = QtWidgets.QPushButton(self.topics_page)
self.edit_topic_button.setIcon(build_icon(':/songs/topic_edit.png'))
self.edit_topic_button.setIcon(UiIcons().edit)
self.edit_topic_button.setObjectName('edit_topic_button')
self.topics_buttons_layout.addWidget(self.edit_topic_button)
self.delete_topic_button = QtWidgets.QPushButton(self.topics_page)
self.delete_topic_button.setIcon(build_icon(':/songs/topic_delete.png'))
self.delete_topic_button.setIcon(UiIcons().delete)
self.delete_topic_button.setObjectName('delete_topic_button')
self.topics_buttons_layout.addWidget(self.delete_topic_button)
self.topics_layout.addLayout(self.topics_buttons_layout)
@ -117,15 +118,15 @@ class Ui_SongMaintenanceDialog(object):
self.books_buttons_layout.setObjectName('booksButtonLayout')
self.books_buttons_layout.addStretch()
self.add_book_button = QtWidgets.QPushButton(self.books_page)
self.add_book_button.setIcon(build_icon(':/songs/book_add.png'))
self.add_book_button.setIcon(UiIcons().add)
self.add_book_button.setObjectName('add_book_button')
self.books_buttons_layout.addWidget(self.add_book_button)
self.edit_book_button = QtWidgets.QPushButton(self.books_page)
self.edit_book_button.setIcon(build_icon(':/songs/book_edit.png'))
self.edit_book_button.setIcon(UiIcons().edit)
self.edit_book_button.setObjectName('edit_book_button')
self.books_buttons_layout.addWidget(self.edit_book_button)
self.delete_book_button = QtWidgets.QPushButton(self.books_page)
self.delete_book_button.setIcon(build_icon(':/songs/book_delete.png'))
self.delete_book_button.setIcon(UiIcons().delete)
self.delete_book_button.setObjectName('delete_book_button')
self.books_buttons_layout.addWidget(self.delete_book_button)
self.books_layout.addLayout(self.books_buttons_layout)

View File

@ -24,7 +24,7 @@ A widget representing a song in the duplicate song removal wizard review page.
"""
from PyQt5 import QtCore, QtWidgets
from openlp.core.lib import build_icon
from openlp.core.ui.icons import UiIcons
from openlp.plugins.songs.lib import VerseType
from openlp.plugins.songs.lib.openlyricsxml import SongXML
@ -182,7 +182,7 @@ class SongReviewWidget(QtWidgets.QWidget):
self.song_vertical_layout.addWidget(self.song_group_box)
self.song_remove_button = QtWidgets.QPushButton(self)
self.song_remove_button.setObjectName('song_remove_button')
self.song_remove_button.setIcon(build_icon(':/general/general_delete.png'))
self.song_remove_button.setIcon(UiIcons().delete)
self.song_remove_button.setSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
self.song_vertical_layout.addWidget(self.song_remove_button, alignment=QtCore.Qt.AlignHCenter)

View File

@ -28,6 +28,7 @@ from PyQt5 import QtCore, QtWidgets
from openlp.core.common.i18n import translate
from openlp.core.lib import build_icon
from openlp.core.ui import SingleColumnTableWidget
from openlp.core.ui.icons import UiIcons
from openlp.core.widgets.edits import HistoryComboBox
@ -90,7 +91,7 @@ class Ui_SongSelectDialog(object):
self.login_progress_bar.setVisible(False)
self.login_button_layout.addWidget(self.login_progress_bar)
self.login_button = QtWidgets.QPushButton(self.login_page)
self.login_button.setIcon(build_icon(':/songs/song_author_edit.png'))
self.login_button.setIcon(UiIcons().edit)
self.login_button.setObjectName('login_button')
self.login_button_layout.addWidget(self.login_button)
self.login_layout.setLayout(4, QtWidgets.QFormLayout.SpanningRole, self.login_button_layout)
@ -124,7 +125,7 @@ class Ui_SongSelectDialog(object):
self.search_progress_bar.setValue(0)
self.search_progress_layout.addWidget(self.search_progress_bar)
self.stop_button = QtWidgets.QPushButton(self.search_page)
self.stop_button.setIcon(build_icon(':/songs/song_search_stop.png'))
self.stop_button.setIcon(UiIcons().stop)
self.stop_button.setObjectName('stop_button')
self.search_progress_layout.addWidget(self.stop_button)
self.search_layout.addLayout(self.search_progress_layout)
@ -143,7 +144,7 @@ class Ui_SongSelectDialog(object):
self.view_layout.setSpacing(8)
self.view_layout.setObjectName('view_layout')
self.logout_button = QtWidgets.QPushButton(self.search_page)
self.logout_button.setIcon(build_icon(':/songs/song_author_edit.png'))
self.logout_button.setIcon(UiIcons().edit)
self.view_layout.addWidget(self.logout_button)
self.view_spacer = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.view_layout.addItem(self.view_spacer)

View File

@ -112,7 +112,7 @@ class SongMediaItem(MediaManagerItem):
def add_custom_context_actions(self):
create_widget_action(self.list_view, separator=True)
create_widget_action(
self.list_view, text=translate('OpenLP.MediaManagerItem', '&Clone'), icon=':/general/general_clone.png',
self.list_view, text=translate('OpenLP.MediaManagerItem', '&Clone'), icon=UiIcons().clone,
triggers=self.on_clone_click)
def on_focus(self):

Binary file not shown.

Before

Width:  |  Height:  |  Size: 836 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 858 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 885 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 744 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 776 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 761 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 720 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 531 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 737 B

View File

@ -1,25 +1,14 @@
<RCC>
<qresource prefix="songs">
<file>song_search_stop.png</file>
<file>song_search_all.png</file>
<file>song_search_author.png</file>
<file>song_search_ccli.png</file>
<file>song_search_lyrics.png</file>
<file>song_search_title.png</file>
<file>song_search_topic.png</file>
<file>topic_edit.png</file>
<file>author_add.png</file>
<file>author_delete.png</file>
<file>book_add.png</file>
<file>topic_add.png</file>
<file>book_delete.png</file>
<file>book_edit.png</file>
<file>author_edit.png</file>
<file>topic_delete.png</file>
<file>book_maintenance.png</file>
<file>author_maintenance.png</file>
<file>topic_maintenance.png</file>
<file>song_author_edit.png</file>
</qresource>
<qresource prefix="images">
<file>image_group.png</file>
@ -40,20 +29,13 @@
<file>plugin_songusage.png</file>
</qresource>
<qresource prefix="general">
<file>general_preview.png</file>
<file>general_live.png</file>
<file>general_add.png</file>
<file>general_delete.png</file>
<file>general_edit.png</file>
<file>general_import.png</file>
<file>general_zoom_out.png</file>
<file>general_zoom_in.png</file>
<file>general_zoom_original.png</file>
<file>general_print.png</file>
<file>general_open.png</file>
<file>general_email.png</file>
<file>general_revert.png</file>
<file>general_clone.png</file>
<file>general_find.png</file>
<file>general_back.png</file>
</qresource>
@ -91,7 +73,6 @@
<file>system_close.png</file>
<file>clear_shortcut.png</file>
<file>system_about.png</file>
<file>system_help_contents.png</file>
<file>system_mediamanager.png</file>
<file>system_volunteer.png</file>
<file>system_servicemanager.png</file>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 684 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1007 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB