def setTheme(self): # the application window only has a vertical container which contains # exactly 3 items: a header image, a spacer for the active screen, and a footer self.container = VerticalContainer(self) self.container.setGeometry(0, 0, APP_WIDTH, APP_HEIGHT) # changing the background color of the main window palette = self.palette() palette.setColor(self.backgroundRole(), QtGui.QColor(255, 132, 42)) # FF842A self.setPalette(palette) # adding the 3 items to the application container self.container.addImage(os.path.join(images_path, 'header.png')) self.container.addSpacer(CONTAINER_HEIGHT) footer = self.container.addLabel("Questions? Visit help.kano.me", objectName=LABEL_CSS_FOOTER) load_css_for_widget(footer, os.path.join(css_path, 'label.css'))
def createContainer(self, x, y): # this is used when creating the app screens container = VerticalContainer(self) container.hide() container.setGeometry(x, y, APP_WIDTH, CONTAINER_HEIGHT) return container