Fix alerts width

This commit is contained in:
Jon Tibble 2010-07-31 23:23:48 +01:00
parent e815a5ff08
commit 4b0093e97b
2 changed files with 2 additions and 3 deletions

View File

@ -252,6 +252,7 @@ class MainDisplay(DisplayWidget):
self.size().height()) self.size().height())
self.webView.setGeometry(0, 0, self.size().width(), self.webView.setGeometry(0, 0, self.size().width(),
self.size().height()) self.size().height())
self.alertText.setTextWidth(self.size().width())
#Build a custom splash screen #Build a custom splash screen
self.initialFrame = QtGui.QImage( self.initialFrame = QtGui.QImage(
self.screen[u'size'].width(), self.screen[u'size'].width(),
@ -322,7 +323,6 @@ class MainDisplay(DisplayWidget):
def setupAlert(self): def setupAlert(self):
self.alertText = QtGui.QGraphicsTextItem() self.alertText = QtGui.QGraphicsTextItem()
self.alertText.setTextWidth(self.size().width())
self.alertText.setZValue(8) self.alertText.setZValue(8)
self.scene.addItem(self.alertText) self.scene.addItem(self.alertText)

View File

@ -88,8 +88,7 @@ class AlertsPlugin(Plugin):
def toggleAlertsState(self): def toggleAlertsState(self):
self.alertsActive = not self.alertsActive self.alertsActive = not self.alertsActive
QtCore.QSettings().setValue( QtCore.QSettings().setValue(self.settingsSection + u'/active',
self.settingsSection + u'/active',
QtCore.QVariant(self.alertsActive)) QtCore.QVariant(self.alertsActive))
def onAlertsTrigger(self): def onAlertsTrigger(self):