Mercurial > hg > Feedworm
changeset 210:e2c70c92da02
Automated merge with https://xanthippe.dyndns.org/hg/Feedworm
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Wed, 25 Jul 2012 08:00:43 +0200 |
parents | c694bfb732bc (diff) a683c65d324d (current diff) |
children | 1ac0b8e2feae |
files | |
diffstat | 5 files changed, 73 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Feedworm.qrc Mon Jun 04 08:35:17 2012 +0200 +++ b/Feedworm.qrc Wed Jul 25 08:00:43 2012 +0200 @@ -1,5 +1,7 @@ <RCC> <qresource prefix="newPrefix"> + <file>zoom_in.png</file> + <file>zoom_out.png</file> <file>mark_selected_read.jpg</file> <file>mark_all_read.jpg</file> <file>open_in_browser.png</file>
--- a/MainWindow.py Mon Jun 04 08:35:17 2012 +0200 +++ b/MainWindow.py Wed Jul 25 08:00:43 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)
--- a/Ui_MainWindow.ui Mon Jun 04 08:35:17 2012 +0200 +++ b/Ui_MainWindow.ui Wed Jul 25 08:00:43 2012 +0200 @@ -68,7 +68,7 @@ <x>0</x> <y>0</y> <width>992</width> - <height>25</height> + <height>23</height> </rect> </property> <widget class="QMenu" name="menuFeed"> @@ -121,6 +121,9 @@ <addaction name="actionMarkFeedRead"/> <addaction name="actionMarkSelectedEntriesRead"/> <addaction name="actionOpenLink"/> + <addaction name="separator"/> + <addaction name="actionZoomIn"/> + <addaction name="actionZoomOut"/> </widget> <action name="actionQuit"> <property name="text"> @@ -259,6 +262,30 @@ <string>Ctrl+Shift+C</string> </property> </action> + <action name="actionZoomIn"> + <property name="icon"> + <iconset resource="Feedworm.qrc"> + <normaloff>:/newPrefix/zoom_in.png</normaloff>:/newPrefix/zoom_in.png</iconset> + </property> + <property name="text"> + <string>Zoom In</string> + </property> + <property name="toolTip"> + <string>Zoom In</string> + </property> + </action> + <action name="actionZoomOut"> + <property name="icon"> + <iconset resource="Feedworm.qrc"> + <normaloff>:/newPrefix/zoom_out.png</normaloff>:/newPrefix/zoom_out.png</iconset> + </property> + <property name="text"> + <string>Zoom Out</string> + </property> + <property name="toolTip"> + <string>Zoom Out</string> + </property> + </action> </widget> <customwidgets> <customwidget> @@ -495,6 +522,38 @@ </hint> </hints> </connection> + <connection> + <sender>actionZoomIn</sender> + <signal>activated()</signal> + <receiver>MainWindow</receiver> + <slot>zoomIn()</slot> + <hints> + <hint type="sourcelabel"> + <x>-1</x> + <y>-1</y> + </hint> + <hint type="destinationlabel"> + <x>495</x> + <y>374</y> + </hint> + </hints> + </connection> + <connection> + <sender>actionZoomOut</sender> + <signal>activated()</signal> + <receiver>MainWindow</receiver> + <slot>zoomOut()</slot> + <hints> + <hint type="sourcelabel"> + <x>-1</x> + <y>-1</y> + </hint> + <hint type="destinationlabel"> + <x>495</x> + <y>374</y> + </hint> + </hints> + </connection> </connections> <slots> <slot>addFeed()</slot> @@ -510,5 +569,7 @@ <slot>feedEntryDoubleClicked()</slot> <slot>markSelectedEntriesRead()</slot> <slot>copyArticleURLToClipboard()</slot> + <slot>zoomIn()</slot> + <slot>zoomOut()</slot> </slots> </ui>