Skip to content

Commit

Permalink
translate to English and make compatible with both Pythons
Browse files Browse the repository at this point in the history
Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Nov 11, 2013
1 parent 51d092e commit f7026e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/capty
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Capturer(object):
def capture(self):
"""Captures url as an image to the file specified"""
self.wb = QtWebKit.QWebPage()
self.wb.setPreferredContentsSize(QtCore.QSize(900, 700))
self.wb.setPreferredContentsSize(QtCore.QSize(1024, 768))
self.wb.mainFrame().setScrollBarPolicy(
QtCore.Qt.Horizontal, QtCore.Qt.ScrollBarAlwaysOff)
self.wb.mainFrame().setScrollBarPolicy(
Expand All @@ -67,10 +67,10 @@ class Capturer(object):
self.wb.mainFrame().load(QtCore.QUrl(self.url))

def doCapture(self):
print "Capturando"
print("Capturing...")
self.wb.setViewportSize(self.wb.mainFrame().contentsSize())
img = QtGui.QImage(self.wb.viewportSize(), QtGui.QImage.Format_ARGB32)
print self.wb.viewportSize()
print(self.wb.viewportSize())
painter = QtGui.QPainter(img)
self.wb.mainFrame().render(painter)
painter.end()
Expand Down

0 comments on commit f7026e5

Please sign in to comment.