StyleBoxFlat¶
Inherits: StyleBox < Resource < RefCounted < Object
A customizable StyleBox that doesn't use a texture.
Description¶
By configuring various properties of this style box, you can achieve many common looks without the need of a texture. This includes optionally rounded borders, antialiasing, shadows, and skew.
Setting corner radius to high values is allowed. As soon as corners overlap, the stylebox will switch to a relative system.
Example:
height = 30
corner_radius_top_left = 50
corner_radius_bottom_left = 100
The relative system now would take the 1:2 ratio of the two left corners to calculate the actual corner width. Both corners added will never be more than the height. Result:
corner_radius_top_left: 10
corner_radius_bottom_left: 20
Properties¶
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Methods¶
get_border_width ( Side margin ) const |
|
get_border_width_min ( ) const |
|
get_corner_radius ( Corner corner ) const |
|
get_expand_margin ( Side margin ) const |
|
void |
set_border_width ( Side margin, int width ) |
void |
set_border_width_all ( int width ) |
void |
set_corner_radius ( Corner corner, int radius ) |
void |
set_corner_radius_all ( int radius ) |
void |
set_expand_margin ( Side margin, float size ) |
void |