fix up some more

This commit is contained in:
Tim Bentley 2018-04-10 22:10:09 +01:00
parent 4760343899
commit 195b172b1c
10 changed files with 4097 additions and 4077 deletions

View File

@ -52,15 +52,20 @@ class UiIcons(object):
QtGui.QPalette.ButtonText)) QtGui.QPalette.ButtonText))
self.add = qta.icon('fa.plus-circle') self.add = qta.icon('fa.plus-circle')
self.arrow_down = qta.icon('fa.arrow-down') self.arrow_down = qta.icon('fa.arrow-down')
self.arrow_left = qta.icon('fa.arrow-left')
self.arrow_right = qta.icon('fa.arrow-right')
self.arrow_up = qta.icon('fa.arrow-up') self.arrow_up = qta.icon('fa.arrow-up')
self.address = qta.icon('fa.book') self.address = qta.icon('fa.book')
self.bible = qta.icon('fa.book') self.bible = qta.icon('fa.book')
self.blank = qta.icon('fa.times-circle')
self.bottom = qta.icon('fa.angle-double-down') self.bottom = qta.icon('fa.angle-double-down')
self.clock = qta.icon('fa.clock-o')
self.clone = qta.icon('fa.clone') self.clone = qta.icon('fa.clone')
self.copy = qta.icon('fa.copy') self.copy = qta.icon('fa.copy')
self.copyright = qta.icon('fa.copyright') self.copyright = qta.icon('fa.copyright')
self.database = qta.icon('fa.database') self.database = qta.icon('fa.database')
self.default = qta.icon('fa.info-circle') self.default = qta.icon('fa.info-circle')
self.desktop = qta.icon('fa.desktop')
self.delete = qta.icon('fa.trash') self.delete = qta.icon('fa.trash')
self.edit = qta.icon('fa.edit') self.edit = qta.icon('fa.edit')
self.exit = qta.icon('fa.sign-out') self.exit = qta.icon('fa.sign-out')
@ -71,15 +76,24 @@ class UiIcons(object):
self.new = qta.icon('fa.file') self.new = qta.icon('fa.file')
self.notes = qta.icon('fa.sticky-note') self.notes = qta.icon('fa.sticky-note')
self.open = qta.icon('fa.map') self.open = qta.icon('fa.map')
self.pause = qta.icon('fa.pause')
self.play = qta.icon('fa.play')
self.plus = qta.icon('fa.plus') self.plus = qta.icon('fa.plus')
self.presentation = qta.icon("fa.bar-chart") self.presentation = qta.icon("fa.bar-chart")
self.preview = qta.icon('fa.laptop') self.preview = qta.icon('fa.laptop')
self.picture = qta.icon("fa.picture-o") self.picture = qta.icon("fa.picture-o")
self.print = qta.icon('fa.print') self.print = qta.icon('fa.print')
#self.remote = qta.icon('fa.podcast') self.remote = qta.icon('fa.rss')
self.save = qta.icon('fa.save') self.save = qta.icon('fa.save')
self.settings = qta.icon('fa.cogs') self.settings = qta.icon('fa.cogs')
self.stop = qta.icon('fa.stop')
self.theme = qta.icon('fa.file-image-o')
self.top = qta.icon('fa.angle-double-up') self.top = qta.icon('fa.angle-double-up')
self.upload = qta.icon('fa.cloud-upload') self.upload = qta.icon('fa.cloud-upload')
self.user = qta.icon('fa.user') self.user = qta.icon('fa.user')
self.video = qta.icon('fa.file-video-o') self.video = qta.icon('fa.file-video-o')
# Debug code to print fonts as these are not easy to find and do not match web sites
# icon = qta._resource['iconic']
# fa = icon.charmap['fa']
# for ky in fa.keys():
# print(ky, fa[ky])

View File

@ -32,7 +32,6 @@ from PyQt5 import QtCore, QtGui, QtWidgets
from openlp.core.common import SlideLimits from openlp.core.common import SlideLimits
from openlp.core.common.actions import ActionList, CategoryOrder from openlp.core.common.actions import ActionList, CategoryOrder
from openlp.core.common.i18n import UiStrings, translate from openlp.core.common.i18n import UiStrings, translate
from openlp.core.ui.icons import UiIcons
from openlp.core.common.mixins import LogMixin, RegistryProperties from openlp.core.common.mixins import LogMixin, RegistryProperties
from openlp.core.common.registry import Registry, RegistryBase from openlp.core.common.registry import Registry, RegistryBase
from openlp.core.common.settings import Settings from openlp.core.common.settings import Settings
@ -40,6 +39,7 @@ from openlp.core.display.screens import ScreenList
from openlp.core.lib import ItemCapabilities, ServiceItem, ImageSource, ServiceItemAction, build_icon, build_html from openlp.core.lib import ItemCapabilities, ServiceItem, ImageSource, ServiceItemAction, build_icon, build_html
from openlp.core.lib.ui import create_action from openlp.core.lib.ui import create_action
from openlp.core.ui import HideMode, MainDisplay, Display, DisplayControllerType from openlp.core.ui import HideMode, MainDisplay, Display, DisplayControllerType
from openlp.core.ui.icons import UiIcons
from openlp.core.widgets.toolbar import OpenLPToolbar from openlp.core.widgets.toolbar import OpenLPToolbar
from openlp.core.widgets.views import ListPreviewWidget from openlp.core.widgets.views import ListPreviewWidget
@ -213,14 +213,14 @@ class SlideController(DisplayController, LogMixin, RegistryProperties):
self.toolbar.setSizePolicy(size_toolbar_policy) self.toolbar.setSizePolicy(size_toolbar_policy)
self.previous_item = create_action(self, 'previousItem_' + self.type_prefix, self.previous_item = create_action(self, 'previousItem_' + self.type_prefix,
text=translate('OpenLP.SlideController', 'Previous Slide'), text=translate('OpenLP.SlideController', 'Previous Slide'),
icon=':/slides/slide_previous.png', icon=UiIcons().arrow_left,
tooltip=translate('OpenLP.SlideController', 'Move to previous.'), tooltip=translate('OpenLP.SlideController', 'Move to previous.'),
can_shortcuts=True, context=QtCore.Qt.WidgetWithChildrenShortcut, can_shortcuts=True, context=QtCore.Qt.WidgetWithChildrenShortcut,
category=self.category, triggers=self.on_slide_selected_previous) category=self.category, triggers=self.on_slide_selected_previous)
self.toolbar.addAction(self.previous_item) self.toolbar.addAction(self.previous_item)
self.next_item = create_action(self, 'nextItem_' + self.type_prefix, self.next_item = create_action(self, 'nextItem_' + self.type_prefix,
text=translate('OpenLP.SlideController', 'Next Slide'), text=translate('OpenLP.SlideController', 'Next Slide'),
icon=':/slides/slide_next.png', icon=UiIcons().arrow_right,
tooltip=translate('OpenLP.SlideController', 'Move to next.'), tooltip=translate('OpenLP.SlideController', 'Move to next.'),
can_shortcuts=True, context=QtCore.Qt.WidgetWithChildrenShortcut, can_shortcuts=True, context=QtCore.Qt.WidgetWithChildrenShortcut,
category=self.category, triggers=self.on_slide_selected_next_action) category=self.category, triggers=self.on_slide_selected_next_action)
@ -242,22 +242,22 @@ class SlideController(DisplayController, LogMixin, RegistryProperties):
# The order of the blank to modes in Shortcuts list comes from here. # The order of the blank to modes in Shortcuts list comes from here.
self.desktop_screen_enable = create_action(self, 'desktopScreenEnable', self.desktop_screen_enable = create_action(self, 'desktopScreenEnable',
text=translate('OpenLP.SlideController', 'Show Desktop'), text=translate('OpenLP.SlideController', 'Show Desktop'),
icon=':/slides/slide_desktop.png', can_shortcuts=True, icon=UiIcons().desktop, can_shortcuts=True,
context=QtCore.Qt.WidgetWithChildrenShortcut, context=QtCore.Qt.WidgetWithChildrenShortcut,
category=self.category, triggers=self.on_hide_display_enable) category=self.category, triggers=self.on_hide_display_enable)
self.desktop_screen = create_action(self, 'desktopScreen', self.desktop_screen = create_action(self, 'desktopScreen',
text=translate('OpenLP.SlideController', 'Toggle Desktop'), text=translate('OpenLP.SlideController', 'Toggle Desktop'),
icon=':/slides/slide_desktop.png', icon=UiIcons().desktop,
checked=False, can_shortcuts=True, category=self.category, checked=False, can_shortcuts=True, category=self.category,
triggers=self.on_hide_display) triggers=self.on_hide_display)
self.theme_screen = create_action(self, 'themeScreen', self.theme_screen = create_action(self, 'themeScreen',
text=translate('OpenLP.SlideController', 'Toggle Blank to Theme'), text=translate('OpenLP.SlideController', 'Toggle Blank to Theme'),
icon=':/slides/slide_theme.png', icon=UiIcons().theme,
checked=False, can_shortcuts=True, category=self.category, checked=False, can_shortcuts=True, category=self.category,
triggers=self.on_theme_display) triggers=self.on_theme_display)
self.blank_screen = create_action(self, 'blankScreen', self.blank_screen = create_action(self, 'blankScreen',
text=translate('OpenLP.SlideController', 'Toggle Blank Screen'), text=translate('OpenLP.SlideController', 'Toggle Blank Screen'),
icon=':/slides/slide_blank.png', icon=UiIcons().blank,
checked=False, can_shortcuts=True, category=self.category, checked=False, can_shortcuts=True, category=self.category,
triggers=self.on_blank_display) triggers=self.on_blank_display)
self.hide_menu.setDefaultAction(self.blank_screen) self.hide_menu.setDefaultAction(self.blank_screen)
@ -288,10 +288,10 @@ class SlideController(DisplayController, LogMixin, RegistryProperties):
self.toolbar)) self.toolbar))
self.toolbar.add_toolbar_widget(self.play_slides_menu) self.toolbar.add_toolbar_widget(self.play_slides_menu)
self.play_slides_loop = create_action(self, 'playSlidesLoop', text=UiStrings().PlaySlidesInLoop, self.play_slides_loop = create_action(self, 'playSlidesLoop', text=UiStrings().PlaySlidesInLoop,
icon=':/media/media_time.png', checked=False, can_shortcuts=True, icon=UiIcons().clock, checked=False, can_shortcuts=True,
category=self.category, triggers=self.on_play_slides_loop) category=self.category, triggers=self.on_play_slides_loop)
self.play_slides_once = create_action(self, 'playSlidesOnce', text=UiStrings().PlaySlidesToEnd, self.play_slides_once = create_action(self, 'playSlidesOnce', text=UiStrings().PlaySlidesToEnd,
icon=':/media/media_time.png', checked=False, can_shortcuts=True, icon=UiIcons().clock, checked=False, can_shortcuts=True,
category=self.category, triggers=self.on_play_slides_once) category=self.category, triggers=self.on_play_slides_once)
if Settings().value(self.main_window.advanced_settings_section + '/slide limits') == SlideLimits.Wrap: if Settings().value(self.main_window.advanced_settings_section + '/slide limits') == SlideLimits.Wrap:
self.play_slides_menu.setDefaultAction(self.play_slides_loop) self.play_slides_menu.setDefaultAction(self.play_slides_loop)
@ -338,7 +338,7 @@ class SlideController(DisplayController, LogMixin, RegistryProperties):
# FIXME: object name should be changed. But this requires that we migrate the shortcut. # FIXME: object name should be changed. But this requires that we migrate the shortcut.
self.audio_pause_item = self.toolbar.add_toolbar_action( self.audio_pause_item = self.toolbar.add_toolbar_action(
'audioPauseItem', 'audioPauseItem',
icon=':/slides/media_playback_pause.png', text=translate('OpenLP.SlideController', 'Pause Audio'), icon=UiIcons().pause, text=translate('OpenLP.SlideController', 'Pause Audio'),
tooltip=translate('OpenLP.SlideController', 'Pause audio.'), tooltip=translate('OpenLP.SlideController', 'Pause audio.'),
checked=False, visible=False, category=self.category, context=QtCore.Qt.WindowShortcut, checked=False, visible=False, category=self.category, context=QtCore.Qt.WindowShortcut,
can_shortcuts=True, triggers=self.set_audio_pause_clicked) can_shortcuts=True, triggers=self.set_audio_pause_clicked)
@ -347,7 +347,7 @@ class SlideController(DisplayController, LogMixin, RegistryProperties):
self.audio_pause_item.setParent(self.toolbar) self.audio_pause_item.setParent(self.toolbar)
self.toolbar.widgetForAction(self.audio_pause_item).setPopupMode(QtWidgets.QToolButton.MenuButtonPopup) self.toolbar.widgetForAction(self.audio_pause_item).setPopupMode(QtWidgets.QToolButton.MenuButtonPopup)
self.next_track_item = create_action(self, 'nextTrackItem', text=UiStrings().NextTrack, self.next_track_item = create_action(self, 'nextTrackItem', text=UiStrings().NextTrack,
icon=':/slides/media_playback_next.png', icon=UiIcons().arrow_right,
tooltip=translate('OpenLP.SlideController', tooltip=translate('OpenLP.SlideController',
'Go to next audio track.'), 'Go to next audio track.'),
category=self.category, category=self.category,
@ -735,10 +735,10 @@ class SlideController(DisplayController, LogMixin, RegistryProperties):
self.toolbar.set_widget_visible('song_menu', False) self.toolbar.set_widget_visible('song_menu', False)
# Reset the button # Reset the button
self.play_slides_once.setChecked(False) self.play_slides_once.setChecked(False)
self.play_slides_once.setIcon(build_icon(':/media/media_time.png')) self.play_slides_once.setIcon(UiIcons().clock)
self.play_slides_once.setText(UiStrings().PlaySlidesToEnd) self.play_slides_once.setText(UiStrings().PlaySlidesToEnd)
self.play_slides_loop.setChecked(False) self.play_slides_loop.setChecked(False)
self.play_slides_loop.setIcon(build_icon(':/media/media_time.png')) self.play_slides_loop.setIcon(UiIcons().clock)
self.play_slides_loop.setText(UiStrings().PlaySlidesInLoop) self.play_slides_loop.setText(UiStrings().PlaySlidesInLoop)
if item.is_text(): if item.is_text():
if (Settings().value(self.main_window.songs_settings_section + '/display songbar') and if (Settings().value(self.main_window.songs_settings_section + '/display songbar') and
@ -1313,16 +1313,16 @@ class SlideController(DisplayController, LogMixin, RegistryProperties):
self.play_slides_loop.setChecked(checked) self.play_slides_loop.setChecked(checked)
self.log_debug('on_play_slides_loop {text}'.format(text=checked)) self.log_debug('on_play_slides_loop {text}'.format(text=checked))
if checked: if checked:
self.play_slides_loop.setIcon(build_icon(':/media/media_stop.png')) self.play_slides_loop.setIcon(UiIcons().stop)
self.play_slides_loop.setText(UiStrings().StopPlaySlidesInLoop) self.play_slides_loop.setText(UiStrings().StopPlaySlidesInLoop)
self.play_slides_once.setIcon(build_icon(':/media/media_time.png')) self.play_slides_once.setIcon(UiIcons().clock)
self.play_slides_once.setText(UiStrings().PlaySlidesToEnd) self.play_slides_once.setText(UiStrings().PlaySlidesToEnd)
self.play_slides_menu.setDefaultAction(self.play_slides_loop) self.play_slides_menu.setDefaultAction(self.play_slides_loop)
self.play_slides_once.setChecked(False) self.play_slides_once.setChecked(False)
if Settings().value('core/click live slide to unblank'): if Settings().value('core/click live slide to unblank'):
Registry().execute('slidecontroller_live_unblank') Registry().execute('slidecontroller_live_unblank')
else: else:
self.play_slides_loop.setIcon(build_icon(':/media/media_time.png')) self.play_slides_loop.setIcon(UiIcons().clock)
self.play_slides_loop.setText(UiStrings().PlaySlidesInLoop) self.play_slides_loop.setText(UiStrings().PlaySlidesInLoop)
self.on_toggle_loop() self.on_toggle_loop()
@ -1338,16 +1338,16 @@ class SlideController(DisplayController, LogMixin, RegistryProperties):
self.play_slides_once.setChecked(checked) self.play_slides_once.setChecked(checked)
self.log_debug('on_play_slides_once {text}'.format(text=checked)) self.log_debug('on_play_slides_once {text}'.format(text=checked))
if checked: if checked:
self.play_slides_once.setIcon(build_icon(':/media/media_stop.png')) self.play_slides_once.setIcon(UiIcons().stop)
self.play_slides_once.setText(UiStrings().StopPlaySlidesToEnd) self.play_slides_once.setText(UiStrings().StopPlaySlidesToEnd)
self.play_slides_loop.setIcon(build_icon(':/media/media_time.png')) self.play_slides_loop.setIcon(UiIcons().clock)
self.play_slides_loop.setText(UiStrings().PlaySlidesInLoop) self.play_slides_loop.setText(UiStrings().PlaySlidesInLoop)
self.play_slides_menu.setDefaultAction(self.play_slides_once) self.play_slides_menu.setDefaultAction(self.play_slides_once)
self.play_slides_loop.setChecked(False) self.play_slides_loop.setChecked(False)
if Settings().value('core/click live slide to unblank'): if Settings().value('core/click live slide to unblank'):
Registry().execute('slidecontroller_live_unblank') Registry().execute('slidecontroller_live_unblank')
else: else:
self.play_slides_once.setIcon(build_icon(':/media/media_time')) self.play_slides_once.setIcon(UiIcons().clock)
self.play_slides_once.setText(UiStrings().PlaySlidesToEnd) self.play_slides_once.setText(UiStrings().PlaySlidesToEnd)
self.on_toggle_loop() self.on_toggle_loop()

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 722 B

View File

@ -58,16 +58,11 @@
<file>general_back.png</file> <file>general_back.png</file>
</qresource> </qresource>
<qresource prefix="slides"> <qresource prefix="slides">
<file>slide_next.png</file>
<file>slide_blank.png</file>
<file>slide_desktop.png</file>
<file>slide_theme.png</file> <file>slide_theme.png</file>
<file>slide_previous.png</file>
<file>media_playback_start.png</file> <file>media_playback_start.png</file>
<file>media_playback_stop.png</file> <file>media_playback_stop.png</file>
<file>media_playback_pause.png</file> <file>media_playback_pause.png</file>
<file>media_playback_next.png</file> </qresource>
</qresource>
<qresource prefix="icon"> <qresource prefix="icon">
<file>openlp-logo.svg</file> <file>openlp-logo.svg</file>
</qresource> </qresource>
@ -109,7 +104,6 @@
</qresource> </qresource>
<qresource prefix="media"> <qresource prefix="media">
<file>media_time.png</file> <file>media_time.png</file>
<file>media_stop.png</file>
<file>media_audio.png</file> <file>media_audio.png</file>
<file>media_video.png</file> <file>media_video.png</file>
<file>media_optical.png</file> <file>media_optical.png</file>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 717 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 696 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 512 B