Styling
On this page
MagicPalette struct
This struct can be used to customize the application brush palette.
background: fines the default background brush. Use this if none of the more specialized background brushes apply.foreground: Defines the foreground brush that is used for content that is displayed onbackgroundbrush.placeholder_foreground: Defines the foreground brush that is used for placeholder content.alternate_background: Defines an alternate background brush that is used for example for text input controls or panels like a side bar.control_background: Defines the default background brush for controls, such as push buttons, combo boxes, etc.control_foreground: Defines the foreground brush that is used for content that is displayed oncontrol_backgroundbrush.accent_background: Defines the background brush for highlighted controls such as primary buttons.accent_foreground: Defines the foreground brush that is used for content that is displayed onaccent-backgroundbrush.alternate_accent_background: Defines an alternate accent background brush.destructive_background: Defines the background brush for destructive controls such as destructive buttons.destructive_foreground: Defines the foreground brush that is used for content that is displayed on accent-background brush.border: Defines the brush that is used for borders such as separators and component borders.focus_border: Defines brush of focus borders.state_pressed: Defines the brush of the state overlay if the component is pressed.state_hovered: Defines the brush of the state overlay if the component is hovered by the mouse pointer.selection_background: Defines the background brush of a text selection.
Flavor enum
Defines one of the four flavors of the Catppuccin theme.
CatppuccinPalette struct
Used to define the palette of one of the Catppuccin's flavors.
For details check https://catppuccin.com/palette.
Catppuccin global
Give access to all four flavor palettes of Catppuccin.
latte(outCatppuccinPalette): Defines the palette of the Latte flavor.frappe(outCatppuccinPalette): Defines the palette of the Frappe flavor.macchiato(outCatppuccinPalette): Defines the palette of the Macchiato flavor.mocha(outCatppuccinPalette): Defines the palette of the Mocha flavor.current_flavor(intFlavor): Defines the current selected flavor (default: depending on system settings, on dark it is macchiato, on light it is latte)current_palette(outCatppuccinPalette): Give access to the current selected catppuccin palette.current_magic_palette(outMagicPalette): Give access to the current selected catppuccin palette converted to a magic palette.
Palette global
Use Palette to create custom components that are matches the design of the magic component set. The default platte is based on the Catppuccin theme.
Properties
current_palette(inMagicPalette): defines the current application brush palette. (default: on system setting to dark default it is catppuccin macchiato otherwise latte)background(out brush): fines the default background brush. Use this if none of the more specialized background brushes apply.foreground(out brush): Defines the foreground brush that is used for content that is displayed onbackgroundbrush.placeholder_foreground(out brush): Defines the foreground brush that is used for placeholder content.alternate_background(out brush): Defines an alternate background brush that is used for example for text input controls or panels like a side bar.control_background(out brush): Defines the default background brush for controls, such as push buttons, combo boxes, etc.control_foreground(out brush): Defines the foreground brush that is used for content that is displayed oncontrol_backgroundbrush.accent_background(in_out brush): Defines the background brush for highlighted controls such as primary buttons.accent_foreground(out brush): Defines the foreground brush that is used for content that is displayed onaccent-backgroundbrush.alternate_accent_background(out brush): Defines an alternate accent background brush.destructive_background(out brush): Defines the background brush for destructive controls such as destructive buttons.destructive_foreground(out brush): Defines the foreground brush that is used for content that is displayed on accent-background brush.border(out brush): Defines the brush that is used for borders such as separators and component borders.focus_border(out brush): Defines brush of focus borders.state_pressed(out brush): Defines the brush of the state overlay if the component is pressed.state_hovered(out brush): Defines the brush of the state overlay if the component is hovered by the mouse pointer.selection_background(out brush): Defines the background brush of a text selection.
FontSettings global
Use FontSettings to create custom components that matches the font settings of the magic style.
Properties
light_font_weight(out int): Defines the light font weight of themagicstyle.regular_font_weight(out int): Defines the regular font weight of themagicstyle.semi_bold_font_weight(out int): Defines the semi bold font weight of themagicstyle.light(outTextStyle): Defines a text style for a sub text.supporting(outTextStyle): Defines a text style for a supporting text.body(outTextStyle): Defines the body text style ofmagic.body_strong(outTextStyle): Defines body text style with more bold font.header_1(outTextStyle): Defines a header text style first order.header_2(outTextStyle): Defines a header text style second order .header_3(outTextStyle): Defines a header text style third order.
IconSettings global
Use IconSettings to create custom components that matches the icon settings of the magic style.
Properties
body(outIconStyle): Defines the body icon style ofmagic.
AnimationSettings global
Use AnimationSettings to create animations for custom components that matches the animation settings of the magic style.
Properties
color_duration(out duration): Defines the animation duration for color animations.resize_duration(out duration): Defines the animation duration of resizing of an element.move_in_duration(out duration): Defines the animation duration of elements entering the screen.move_out_duration(out duration): Defines the animation duration of elements exit the screen.move_in_easing(out easing): Defines the animation easing of elements entering the screen.move_out_easing(out easing): Defines the animation easing of elements exit the screen.
SizeSettings global
Use SizeSettings to define sizes of custom components that matches the settings of the magic style.
Properties
mobile_size(in_out bool): If set totruethe size settings are increased to make the components better touchable on mobile. (default value: false)box_height(out length): Defines the height of box elements like checkbox.item_height(out length): Defines the height of list item elements.control_height(out length): Defines the default height of controls like buttons.app_bar_height(out length): Defines the min height of the app bar.min_text_field_width(out length): Defines the min width of text input elements.min_text_area_height(out length): Defines the min height of a text area.
LayoutSettings global
Use LayoutSettings to define padding and spacing of custom components that matches the settings of the magic style.
Properties
layout_spacing(out length): Defines the default inner spacing of layouts.layout_padding(out length): Defines the default padding of layouts.alternate_layout_padding(out length): Defines the alternate padding of layouts.control_spacing(out length): Defines the default inner spacing of elements inside of a component.control_padding(out length): Defines the default padding of a component.text_input_padding(out length): Defines the default padding of a text input components.control_style(out LayoutStyle): Defines the default layout style of controls / components.control_style(out LayoutStyle): Defines the default layout style of e.g.AppBar.text_input_style(out LayoutStyle): Defines the default layout style of text input elements.
BorderSettings global
Use BorderSettings to define border setting of custom components that matches the magic style.
Properties
bar_border_radius(out length): Defines the border radius of bar elements like checkbox.box_border_radius(out length): Defines the border radius of box elements like checkbox.control_border_radius(out length): Defines the default border radius of elements inside of a component.control_border_width(out length): Defines the default border width of elements inside of a component.alternate_border_style(out BorderStyle): Defines the style of a background border with a alternate background color.popup_border_style(out BorderStyle): Defines the style of a popup border.