Skip to content
GolemNikidastrov edited this page Apr 1, 2026 · 1 revision

(modified in 0.7.4)

Style is a fundamental class for changing Widget look!

Useful functions:

  • add_style_parameter - extends Style with custom parameters

  • clone - clones Style from initial kwargs

  • __call__ - creates new Style with same parameters and with possible patch in kwargs

StateVariable:

  • StateVariable is a class for creating state dependent value

  • can be placed in every Style argument

Supported Style creation arguments:

  • border_radius or br: changes radius of the border. supported types: int, float, tuple. 0 is default
  • border_width or bw: changes width of the border, minimal value is 0. supported types: int. 1 is default
  • font_size: specifies size of the font, minimal value is 1. supported types: int. 20 is default
  • font_name or font_path: specifies path of the local font. supported types: str. "Arial" is default
  • align_x: changes text x align in widgets like Label. supported types: Align, Malign, str. Center is default
  • align_y: changes text y align in widgets like Label. supported types: Align, Malign, str. Center is default
  • transparency: changes Widget background transparency. supported types: int. None is default
  • bg_image: changes Widget background to image if image path is correct. supported types: str. None is default
  • colortheme: specifies Widget colors. supported types: ColorTheme. material3_blue is default
  • gradient: changes Widget background to to the gradient. supported types: Gradient. None is default