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
|
||||
*/
|
||||
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;
|
||||
},
|
||||
/**
|
||||
|
@ -437,8 +437,8 @@ class Renderer(RegistryBase, LogMixin, RegistryProperties, DisplayWindow):
|
||||
self.force_page = False
|
||||
for screen in ScreenList():
|
||||
if screen.is_display:
|
||||
self.setGeometry(screen.geometry.x(), screen.geometry.y(),
|
||||
screen.geometry.width(), screen.geometry.height())
|
||||
self.setGeometry(screen.display_geometry.x(), screen.display_geometry.y(),
|
||||
screen.display_geometry.width(), screen.display_geometry.height())
|
||||
break
|
||||
# If the display is not show'ed and hidden like this webegine will not render
|
||||
self.show()
|
||||
|
@ -164,16 +164,18 @@ 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
|
||||
# the dict instead of rendering them again.
|
||||
previous_pages = {}
|
||||
for index, raw_slide in enumerate(self.slides):
|
||||
index = 0
|
||||
for raw_slide in self.slides:
|
||||
verse_tag = raw_slide['verse']
|
||||
if verse_tag in previous_pages and previous_pages[verse_tag][1] == raw_slide:
|
||||
page = previous_pages[verse_tag][1]
|
||||
if verse_tag in previous_pages and previous_pages[verse_tag][0] == raw_slide:
|
||||
pages = previous_pages[verse_tag][1]
|
||||
else:
|
||||
page = render_tags(raw_slide['text'], self)
|
||||
previous_pages[verse_tag] = (raw_slide, page)
|
||||
pages = self.renderer.format_slide(raw_slide['text'], self)
|
||||
previous_pages[verse_tag] = (raw_slide, pages)
|
||||
for page in pages:
|
||||
rendered_slide = {
|
||||
'title': raw_slide['title'],
|
||||
'text': page,
|
||||
'text': render_tags(page),
|
||||
'verse': index,
|
||||
}
|
||||
self._rendered_slides.append(rendered_slide)
|
||||
@ -183,6 +185,7 @@ class ServiceItem(RegistryProperties):
|
||||
'verse': verse_tag,
|
||||
}
|
||||
self._display_slides.append(display_slide)
|
||||
index += 1
|
||||
|
||||
@property
|
||||
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.themes_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.api_tab)
|
||||
for plugin in State().list_plugins():
|
||||
|
Loading…
Reference in New Issue
Block a user