Exemple #1
0
	def update_theme(self, theme):
		SingleContainer.update_theme(self, theme)
		
		if theme:
			self.elements['frame'].patch = theme['dialogue']['image']
			self.elements['title'].font_name = theme['font']
			self.elements['title'].font_size = theme['font_size_small']
			self.elements['title'].color = theme['font_color']
Exemple #2
0
	def update_theme(self, theme):
		SingleContainer.update_theme(self, theme)
		
		if theme:
			patch = self.theme['folding_box'][('image_closed' if self._collapsed else 'image')]
			
			self.elements['topbar'].patch = patch
			self.elements['title'].font_name = theme['font']
			self.elements['title'].font_size = theme['font_size_small']
			self.elements['title'].color = theme['font_color']
			
			if self._collapsed:
				self._h = patch.padding_top
			else:
				self._last_h = patch.padding_top
Exemple #3
0
    def update_theme(self, theme):
        SingleContainer.update_theme(self, theme)

        if theme:
            patch = theme["folding_box"][("image_closed" if self._collapsed else "image")]

            self.shapes["topbar"].patch = patch
            self.elements["title"].font_name = theme["font"]
            self.elements["title"].font_size = theme["font_size_small"]
            self.elements["title"].color = theme["font_color"]

            if self._collapsed:
                self._h = patch.padding_top
            else:
                self._last_h = patch.padding_top

            self._top_h = patch.padding_top
Exemple #4
0
    def update_theme(self, theme):
        SingleContainer.update_theme(self, theme)

        if theme:
            patch = theme['folding_box'][('image_closed'
                                          if self._collapsed else 'image')]

            self.shapes['topbar'].patch = patch
            self.elements['title'].font_name = theme['font']
            self.elements['title'].font_size = theme['font_size_small']
            self.elements['title'].color = theme['font_color']

            if self._collapsed:
                self._h = patch.padding_top
            else:
                self._last_h = patch.padding_top

            self._top_h = patch.padding_top
Exemple #5
0
	def update_theme(self, theme):
		SingleContainer.update_theme(self, theme)
		
		if theme:
			background_patch = theme['window']['image_background']
			title_patch = theme['window']['image_title_bar']
			
			self.shapes['background'].patch = background_patch
			self.shapes['title_bar'].patch = title_patch
			
			self.elements['title'].font_name = theme['font']
			self.elements['title'].font_size = theme['font_size_small']
			self.elements['title'].color = theme['font_color']
			
			font = self.elements['title'].document.get_font()
			height = font.ascent - font.descent
			
			self._pref_size = Size(title_patch.padding_x + self.elements['title'].content_width, background_patch.padding_y + title_patch.padding_y + height)
Exemple #6
0
    def update_theme(self, theme):
        SingleContainer.update_theme(self, theme)

        if theme:
            background_patch = theme['window']['image_background']
            title_patch = theme['window']['image_title_bar']

            self.shapes['background'].patch = background_patch
            self.shapes['title_bar'].patch = title_patch

            self.elements['title'].font_name = theme['font']
            self.elements['title'].font_size = theme['font_size_small']
            self.elements['title'].color = theme['font_color']

            font = self.elements['title'].document.get_font()
            height = font.ascent - font.descent

            self._pref_size = Size(
                title_patch.padding_x + self.elements['title'].content_width,
                background_patch.padding_y + title_patch.padding_y + height)