diff MainWindow.py @ 207:c694bfb732bc

implement zooming the web view
author dirk
date Wed, 25 Jul 2012 01:49:28 +0200
parents c345a26febc2
children 524cbf9e413c
line wrap: on
line diff
--- a/MainWindow.py	Sat Jun 02 04:30:04 2012 +0200
+++ b/MainWindow.py	Wed Jul 25 01:49:28 2012 +0200
@@ -71,6 +71,7 @@
         self.ui.feedEntryList.scrollTo(visibleIndex)
 
     def feedEntrySelected(self, index):
+        self.ui.webView.setZoomFactor(1.0)
         self.ui.menuArticle.setEnabled(True)
         self.ui.actionOpenLink.setEnabled(True)
 
@@ -173,3 +174,11 @@
     def copyArticleURLToClipboard(self):
         clipboard = QApplication.clipboard()
         clipboard.setText(self.backend.selectedFeedEntry.link)
+
+    def zoomIn(self):
+        zoom = self.ui.webView.zoomFactor() + 0.1
+        self.ui.webView.setZoomFactor(zoom)
+
+    def zoomOut(self):
+        zoom = self.ui.webView.zoomFactor() - 0.1
+        self.ui.webView.setZoomFactor(zoom)