render the themes when the screen size changed

This commit is contained in:
Andreas Preikschat 2011-05-16 13:41:43 +02:00
parent b04e688647
commit 55738636d9
2 changed files with 10 additions and 0 deletions

View File

@ -783,6 +783,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
self.renderer.update_display() self.renderer.update_display()
self.liveController.screenSizeChanged() self.liveController.screenSizeChanged()
self.previewController.screenSizeChanged() self.previewController.screenSizeChanged()
self.themeManagerContents.updatePreviewImages()
self.setFocus() self.setFocus()
self.activateWindow() self.activateWindow()

View File

@ -660,6 +660,15 @@ class ThemeManager(QtGui.QWidget):
pixmap.save(thumb, u'png') pixmap.save(thumb, u'png')
log.debug(u'Theme image written to %s', samplepathname) log.debug(u'Theme image written to %s', samplepathname)
def updatePreviewImages(self):
"""
Called to update the themes' preview images.
"""
for theme in self.themelist:
self.generateAndSaveImage(
self.path, theme, self.getThemeData(theme))
self.loadThemes()
def generateImage(self, themeData, forcePage=False): def generateImage(self, themeData, forcePage=False):
""" """
Call the renderer to build a Sample Image Call the renderer to build a Sample Image