forked from openlp/openlp
Fix pagination
This commit is contained in:
parent
8de6ff8832
commit
82fa94857f
@ -295,7 +295,7 @@ var Display = {
|
|||||||
* Checks if the present slide content fits within the slide
|
* Checks if the present slide content fits within the slide
|
||||||
*/
|
*/
|
||||||
doesContentFit: function () {
|
doesContentFit: function () {
|
||||||
console.debug("scrollHeight: " + $(".slides")[0].scrollHeight);
|
console.debug("scrollHeight: " + $(".slides")[0].scrollHeight + ", clientHeight: " + $(".slides")[0].clientHeight);
|
||||||
return $(".slides")[0].clientHeight >= $(".slides")[0].scrollHeight;
|
return $(".slides")[0].clientHeight >= $(".slides")[0].scrollHeight;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
@ -437,8 +437,8 @@ class Renderer(RegistryBase, LogMixin, RegistryProperties, DisplayWindow):
|
|||||||
self.force_page = False
|
self.force_page = False
|
||||||
for screen in ScreenList():
|
for screen in ScreenList():
|
||||||
if screen.is_display:
|
if screen.is_display:
|
||||||
self.setGeometry(screen.geometry.x(), screen.geometry.y(),
|
self.setGeometry(screen.display_geometry.x(), screen.display_geometry.y(),
|
||||||
screen.geometry.width(), screen.geometry.height())
|
screen.display_geometry.width(), screen.display_geometry.height())
|
||||||
break
|
break
|
||||||
# If the display is not show'ed and hidden like this webegine will not render
|
# If the display is not show'ed and hidden like this webegine will not render
|
||||||
self.show()
|
self.show()
|
||||||
|
@ -164,25 +164,28 @@ class ServiceItem(RegistryProperties):
|
|||||||
# Save rendered pages to this dict. In the case that a slide is used twice we can use the pages saved to
|
# Save rendered pages to this dict. In the case that a slide is used twice we can use the pages saved to
|
||||||
# the dict instead of rendering them again.
|
# the dict instead of rendering them again.
|
||||||
previous_pages = {}
|
previous_pages = {}
|
||||||
for index, raw_slide in enumerate(self.slides):
|
index = 0
|
||||||
|
for raw_slide in self.slides:
|
||||||
verse_tag = raw_slide['verse']
|
verse_tag = raw_slide['verse']
|
||||||
if verse_tag in previous_pages and previous_pages[verse_tag][1] == raw_slide:
|
if verse_tag in previous_pages and previous_pages[verse_tag][0] == raw_slide:
|
||||||
page = previous_pages[verse_tag][1]
|
pages = previous_pages[verse_tag][1]
|
||||||
else:
|
else:
|
||||||
page = render_tags(raw_slide['text'], self)
|
pages = self.renderer.format_slide(raw_slide['text'], self)
|
||||||
previous_pages[verse_tag] = (raw_slide, page)
|
previous_pages[verse_tag] = (raw_slide, pages)
|
||||||
rendered_slide = {
|
for page in pages:
|
||||||
'title': raw_slide['title'],
|
rendered_slide = {
|
||||||
'text': page,
|
'title': raw_slide['title'],
|
||||||
'verse': index,
|
'text': render_tags(page),
|
||||||
}
|
'verse': index,
|
||||||
self._rendered_slides.append(rendered_slide)
|
}
|
||||||
display_slide = {
|
self._rendered_slides.append(rendered_slide)
|
||||||
'title': raw_slide['title'],
|
display_slide = {
|
||||||
'text': remove_tags(page),
|
'title': raw_slide['title'],
|
||||||
'verse': verse_tag,
|
'text': remove_tags(page),
|
||||||
}
|
'verse': verse_tag,
|
||||||
self._display_slides.append(display_slide)
|
}
|
||||||
|
self._display_slides.append(display_slide)
|
||||||
|
index += 1
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def rendered_slides(self):
|
def rendered_slides(self):
|
||||||
|
@ -79,7 +79,7 @@ class SettingsForm(QtWidgets.QDialog, Ui_SettingsDialog, RegistryProperties):
|
|||||||
self.insert_tab(self.screens_tab)
|
self.insert_tab(self.screens_tab)
|
||||||
self.insert_tab(self.themes_tab)
|
self.insert_tab(self.themes_tab)
|
||||||
self.insert_tab(self.advanced_tab)
|
self.insert_tab(self.advanced_tab)
|
||||||
self.insert_tab(self.player_tab)
|
#self.insert_tab(self.player_tab)
|
||||||
self.insert_tab(self.projector_tab)
|
self.insert_tab(self.projector_tab)
|
||||||
self.insert_tab(self.api_tab)
|
self.insert_tab(self.api_tab)
|
||||||
for plugin in State().list_plugins():
|
for plugin in State().list_plugins():
|
||||||
|
Loading…
Reference in New Issue
Block a user