def update_elements(self): if self._dirty and self.theme: background = self.theme['window']['image_background'] title_bar = self.theme['window']['image_title_bar'] font = self.elements['title'].document.get_font() height = font.ascent - font.descent h = title_bar.padding_bottom + height + title_bar.padding_top self.shapes['background'].update(self._gx, self._gy, self.w, self.h) self.shapes['title_bar'].update_in( self._gx - background.padding_left, self._gy + self.h, self.w + background.padding_left + background.padding_right, h) self.elements['title'].x = self._gx + self.w / 2 self.topbar = Rect( -background.padding_left, self.h, self.w + background.padding_left + background.padding_right, h) self.elements[ 'title'].y = self._gy + self.h + title_bar.padding_bottom - font.descent SingleContainer.update_elements(self)
def update_elements(self): if self.theme: patch = self.theme['folding_box'][('image_closed' if self._collapsed else 'image')] self.shapes['topbar'].update(self._gx + patch.padding_left, self._gy + self.h - patch.padding_top, self.w - patch.padding_left - patch.padding_right, 1) self.elements['title'].x = self._gx + patch.padding_left self.elements['title'].y = self._gy + self.h - patch.padding_top/2 + 1 self.topbar = Rect(0, self.h-patch.padding_top, self.w, patch.padding_top) SingleContainer.update_elements(self)
def update_elements(self): if self.theme: patch = self.theme["folding_box"][("image_closed" if self._collapsed else "image")] self.shapes["topbar"].update( self._gx + patch.padding_left, self._gy + self.h - patch.padding_top, self.w - patch.padding_left - patch.padding_right, 1, ) self.elements["title"].x = self._gx + patch.padding_left self.elements["title"].y = self._gy + self.h - patch.padding_top / 2 + 1 self.topbar = Rect(0, self.h - patch.padding_top, self.w, patch.padding_top) SingleContainer.update_elements(self)
def update_elements(self): if self.theme: patch = self.theme['folding_box'][('image_closed' if self._collapsed else 'image')] self.shapes['topbar'].update( self._gx + patch.padding_left, self._gy + self.h - patch.padding_top, self.w - patch.padding_left - patch.padding_right, 1) self.elements['title'].x = self._gx + patch.padding_left self.elements[ 'title'].y = self._gy + self.h - patch.padding_top / 2 + 1 self.topbar = Rect(0, self.h - patch.padding_top, self.w, patch.padding_top) SingleContainer.update_elements(self)
def update_elements(self): if self._dirty and self.theme: background = self.theme['window']['image_background'] title_bar = self.theme['window']['image_title_bar'] font = self.elements['title'].document.get_font() height = font.ascent - font.descent h = title_bar.padding_bottom + height + title_bar.padding_top self.shapes['background'].update(self._gx, self._gy, self.w, self.h) self.shapes['title_bar'].update_in(self._gx - background.padding_left, self._gy + self.h, self.w + background.padding_left + background.padding_right, h) self.elements['title'].x = self._gx + self.w/2 self.topbar = Rect(-background.padding_left, self.h, self.w + background.padding_left + background.padding_right, h) self.elements['title'].y = self._gy + self.h + title_bar.padding_bottom - font.descent SingleContainer.update_elements(self)