updated docstring

This commit is contained in:
Andreas Preikschat 2011-08-05 09:41:20 +02:00
parent 383d512c22
commit 8876a12deb

View File

@ -243,19 +243,17 @@ class Renderer(object):
new_pages.append(page) new_pages.append(page)
return new_pages return new_pages
def _calculate_default(self, screen): def _calculate_default(self, size):
""" """
Calculate the default dimentions of the screen. Calculate the default dimentions of the screen.
``screen`` ``size``
The screen to calculate the default of. The screen's size to calculate the default of (``QtCore.QRect``).
""" """
log.debug(u'_calculate default %s', screen) self.width = size.width()
self.width = screen.width() self.height = size.height()
self.height = screen.height()
self.screen_ratio = float(self.height) / float(self.width) self.screen_ratio = float(self.height) / float(self.width)
log.debug(u'calculate default %d, %d, %f', log.debug(u'_calculate default %s, %f' % (size, self.screen_ratio))
self.width, self.height, self.screen_ratio)
# 90% is start of footer # 90% is start of footer
self.footer_start = int(self.height * 0.90) self.footer_start = int(self.height * 0.90)
@ -316,8 +314,8 @@ class Renderer(object):
// work as expected. // work as expected.
return document.all.main.offsetHeight; return document.all.main.offsetHeight;
} }
</script><style>*{margin:0; padding:0; border:0;} </script><style>*{margin: 0; padding: 0; border: 0;}
#main {position:absolute; top:0px; %s %s}</style></head><body> #main {position: absolute; top: 0px; %s %s}</style></head><body>
<div id="main"></div></body></html>""" % \ <div id="main"></div></body></html>""" % \
(build_lyrics_format_css(self.theme_data, self.page_width, (build_lyrics_format_css(self.theme_data, self.page_width,
self.page_height), build_lyrics_outline_css(self.theme_data)) self.page_height), build_lyrics_outline_css(self.theme_data))