def __init__(self, size=None, color=None, clip="auto", radius_ext=None, radius_int=None, pressed=False, dark=None, light=None, thick=1, hovered=False, border_color=None): #changer border """If radius is in the range [0, 1], self.radius_value is the fraction of radius * min(size), else it is interpreted as a raw pixel value. """ if clip == "auto": inflation = -2 * thick clip = (inflation, inflation) ClassicFrame.__init__(self, size=size, color=color, pressed=pressed, hovered=hovered, dark=dark, light=light, thick=thick, clip=clip) radius_value = style.DEF_RADIUS if radius_ext is None else radius_ext if 0. <= radius_value <= 1.: radius_value = min(self.size) * radius_value self.radius_ext = radius_value self.radius_int = radius_int if radius_int == None: self.radius_int = self.radius_ext - self.thick self.border_color = style.BORDER_FACT if border_color is None else border_color if isinstance(self.border_color, float): self.border_color = normalize_color(grow_color(self.border_color, self.color))
def __init__(self, size=style.SIZE, color=style.DEF_COLOR, pressed=False, dark=None, light=None, thick=1, clip="auto", ambient=style.DEF_COLOR3, hfact=0.6): self.thick = 1 if clip is "auto": inflation = -2 * thick clip = (inflation, inflation) ClassicFrame.__init__(self, size, color, pressed, dark, light, thick, clip) self.ambient = ambient self.hfact = hfact
def __init__(self, size=None, color=None, pressed=False, space=8, dark=None, light=None, thick=1, clip="auto"): size = style.XLARGE_SIZE if size is None else size color = style.DEF_COLOR2 if color is None else color ClassicFrame.__init__(self, size=size, color=color, pressed=pressed, hovered=hovered, dark=dark, light=light, thick=thick, clip=clip) self.space = space self.txt_zone = None
def __init__(self, size=None, color=None, clip="auto", radius_ext=12, radius_int=10, pressed=False, dark=None, light=None, thick=1, border_color=None): #changer border """Radius = [0, 1]""" if clip == "auto": inflation = -2 * thick clip = (inflation, inflation) ClassicFrame.__init__(self, size, color, pressed, dark, light, thick, clip) self.radius_int = radius_int self.radius_ext = radius_ext self.border_color = style.BORDER_FACT if border_color is None else border_color if isinstance(self.border_color, float): self.border_color = normalize_color(grow_color(self.border_color, self.color))
def __init__(self, size=None, color=None, pressed=False, space=8, dark=None, light=None, thick=1, clip="auto"): size = style.XLARGE_SIZE if size is None else size color = style.DEF_COLOR2 if color is None else color ClassicFrame.__init__(self, size=size, color=color, pressed=pressed, hovered=hovered, dark=dark, light=light, thick=thick, clip=clip) self.space = space self.txt_zone = None
def __init__(self, size=style.SIZE, color=style.DEF_COLOR, pressed=False, dark=None, light=None, thick=1, clip="auto", ambient=style.DEF_COLOR3, hfact=0.6): self.thick = 1 if clip is "auto": inflation = -2 * thick clip = (inflation, inflation) ClassicFrame.__init__(self, size, color, pressed, dark, light, thick, clip) self.ambient = ambient self.hfact = hfact
def __init__(self, size=None, color=None, clip="auto", radius_ext=None, radius_int=None, pressed=False, dark=None, light=None, thick=1, hovered=False, border_color=None): #changer border """If radius is in the range [0, 1], self.radius_value is the fraction of radius * min(size), else it is interpreted as a raw pixel value. """ if clip == "auto": inflation = -2 * thick clip = (inflation, inflation) ClassicFrame.__init__(self, size=size, color=color, pressed=pressed, hovered=hovered, dark=dark, light=light, thick=thick, clip=clip) radius_value = style.DEF_RADIUS if radius_ext is None else radius_ext if 0. <= radius_value <= 1.: radius_value = min(self.size) * radius_value self.radius_ext = radius_value self.radius_int = radius_int if radius_int == None: self.radius_int = self.radius_ext - self.thick self.border_color = style.BORDER_FACT if border_color is None else border_color if isinstance(self.border_color, float): self.border_color = normalize_color( grow_color(self.border_color, self.color))
def __init__(self, size=None, color=None, clip="auto", radius_ext=12, radius_int=10, pressed=False, dark=None, light=None, thick=1, border_color=None): #changer border """Radius = [0, 1]""" if clip == "auto": inflation = -2 * thick clip = (inflation, inflation) ClassicFrame.__init__(self, size, color, pressed, dark, light, thick, clip) self.radius_int = radius_int self.radius_ext = radius_ext self.border_color = style.BORDER_FACT if border_color is None else border_color if isinstance(self.border_color, float): self.border_color = normalize_color( grow_color(self.border_color, self.color))