class_styleboxflat.rst 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the StyleBoxFlat.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_StyleBoxFlat:
  6. StyleBoxFlat
  7. ============
  8. **Inherits:** :ref:`StyleBox<class_StyleBox>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. Customizable :ref:`StyleBox<class_StyleBox>` with a given set of parameters (no texture required).
  10. Description
  11. -----------
  12. This :ref:`StyleBox<class_StyleBox>` can be used to achieve all kinds of looks without the need of a texture. The following properties are customizable:
  13. - Color
  14. - Border width (individual width for each border)
  15. - Rounded corners (individual radius for each corner)
  16. - Shadow (with blur and offset)
  17. Setting corner radius to high values is allowed. As soon as corners overlap, the stylebox will switch to a relative system. Example:
  18. ::
  19. height = 30
  20. corner_radius_top_left = 50
  21. corner_radius_bottom_left = 100
  22. 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:
  23. ::
  24. corner_radius_top_left: 10
  25. corner_radius_bottom_left: 20
  26. Properties
  27. ----------
  28. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  29. | :ref:`bool<class_bool>` | :ref:`anti_aliasing<class_StyleBoxFlat_property_anti_aliasing>` | ``true`` |
  30. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  31. | :ref:`float<class_float>` | :ref:`anti_aliasing_size<class_StyleBoxFlat_property_anti_aliasing_size>` | ``0.625`` |
  32. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  33. | :ref:`Color<class_Color>` | :ref:`bg_color<class_StyleBoxFlat_property_bg_color>` | ``Color( 0.6, 0.6, 0.6, 1 )`` |
  34. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  35. | :ref:`bool<class_bool>` | :ref:`border_blend<class_StyleBoxFlat_property_border_blend>` | ``false`` |
  36. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  37. | :ref:`Color<class_Color>` | :ref:`border_color<class_StyleBoxFlat_property_border_color>` | ``Color( 0.8, 0.8, 0.8, 1 )`` |
  38. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  39. | :ref:`int<class_int>` | :ref:`border_width_bottom<class_StyleBoxFlat_property_border_width_bottom>` | ``0`` |
  40. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  41. | :ref:`int<class_int>` | :ref:`border_width_left<class_StyleBoxFlat_property_border_width_left>` | ``0`` |
  42. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  43. | :ref:`int<class_int>` | :ref:`border_width_right<class_StyleBoxFlat_property_border_width_right>` | ``0`` |
  44. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  45. | :ref:`int<class_int>` | :ref:`border_width_top<class_StyleBoxFlat_property_border_width_top>` | ``0`` |
  46. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  47. | :ref:`int<class_int>` | :ref:`corner_detail<class_StyleBoxFlat_property_corner_detail>` | ``8`` |
  48. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  49. | :ref:`int<class_int>` | :ref:`corner_radius_bottom_left<class_StyleBoxFlat_property_corner_radius_bottom_left>` | ``0`` |
  50. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  51. | :ref:`int<class_int>` | :ref:`corner_radius_bottom_right<class_StyleBoxFlat_property_corner_radius_bottom_right>` | ``0`` |
  52. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  53. | :ref:`int<class_int>` | :ref:`corner_radius_top_left<class_StyleBoxFlat_property_corner_radius_top_left>` | ``0`` |
  54. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  55. | :ref:`int<class_int>` | :ref:`corner_radius_top_right<class_StyleBoxFlat_property_corner_radius_top_right>` | ``0`` |
  56. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  57. | :ref:`bool<class_bool>` | :ref:`draw_center<class_StyleBoxFlat_property_draw_center>` | ``true`` |
  58. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  59. | :ref:`float<class_float>` | :ref:`expand_margin_bottom<class_StyleBoxFlat_property_expand_margin_bottom>` | ``0.0`` |
  60. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  61. | :ref:`float<class_float>` | :ref:`expand_margin_left<class_StyleBoxFlat_property_expand_margin_left>` | ``0.0`` |
  62. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  63. | :ref:`float<class_float>` | :ref:`expand_margin_right<class_StyleBoxFlat_property_expand_margin_right>` | ``0.0`` |
  64. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  65. | :ref:`float<class_float>` | :ref:`expand_margin_top<class_StyleBoxFlat_property_expand_margin_top>` | ``0.0`` |
  66. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  67. | :ref:`Color<class_Color>` | :ref:`shadow_color<class_StyleBoxFlat_property_shadow_color>` | ``Color( 0, 0, 0, 0.6 )`` |
  68. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  69. | :ref:`Vector2<class_Vector2>` | :ref:`shadow_offset<class_StyleBoxFlat_property_shadow_offset>` | ``Vector2( 0, 0 )`` |
  70. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  71. | :ref:`int<class_int>` | :ref:`shadow_size<class_StyleBoxFlat_property_shadow_size>` | ``0`` |
  72. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  73. Methods
  74. -------
  75. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :ref:`int<class_int>` | :ref:`get_border_width<class_StyleBoxFlat_method_get_border_width>` **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin **)** |const| |
  77. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`int<class_int>` | :ref:`get_border_width_min<class_StyleBoxFlat_method_get_border_width_min>` **(** **)** |const| |
  79. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`int<class_int>` | :ref:`get_corner_radius<class_StyleBoxFlat_method_get_corner_radius>` **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner **)** |const| |
  81. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`float<class_float>` | :ref:`get_expand_margin<class_StyleBoxFlat_method_get_expand_margin>` **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin **)** |const| |
  83. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | void | :ref:`set_border_width<class_StyleBoxFlat_method_set_border_width>` **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`int<class_int>` width **)** |
  85. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | void | :ref:`set_border_width_all<class_StyleBoxFlat_method_set_border_width_all>` **(** :ref:`int<class_int>` width **)** |
  87. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | void | :ref:`set_corner_radius<class_StyleBoxFlat_method_set_corner_radius>` **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner, :ref:`int<class_int>` radius **)** |
  89. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | void | :ref:`set_corner_radius_all<class_StyleBoxFlat_method_set_corner_radius_all>` **(** :ref:`int<class_int>` radius **)** |
  91. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | void | :ref:`set_corner_radius_individual<class_StyleBoxFlat_method_set_corner_radius_individual>` **(** :ref:`int<class_int>` radius_top_left, :ref:`int<class_int>` radius_top_right, :ref:`int<class_int>` radius_bottom_right, :ref:`int<class_int>` radius_bottom_left **)** |
  93. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | void | :ref:`set_expand_margin<class_StyleBoxFlat_method_set_expand_margin>` **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`float<class_float>` size **)** |
  95. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | void | :ref:`set_expand_margin_all<class_StyleBoxFlat_method_set_expand_margin_all>` **(** :ref:`float<class_float>` size **)** |
  97. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | void | :ref:`set_expand_margin_individual<class_StyleBoxFlat_method_set_expand_margin_individual>` **(** :ref:`float<class_float>` size_left, :ref:`float<class_float>` size_top, :ref:`float<class_float>` size_right, :ref:`float<class_float>` size_bottom **)** |
  99. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. Property Descriptions
  101. ---------------------
  102. .. _class_StyleBoxFlat_property_anti_aliasing:
  103. - :ref:`bool<class_bool>` **anti_aliasing**
  104. +-----------+-------------------------+
  105. | *Default* | ``true`` |
  106. +-----------+-------------------------+
  107. | *Setter* | set_anti_aliased(value) |
  108. +-----------+-------------------------+
  109. | *Getter* | is_anti_aliased() |
  110. +-----------+-------------------------+
  111. Antialiasing draws a small ring around the edges, which fades to transparency. As a result, edges look much smoother. This is only noticeable when using rounded corners.
  112. **Note:** When using beveled corners with 45-degree angles (:ref:`corner_detail<class_StyleBoxFlat_property_corner_detail>` = 1), it is recommended to set :ref:`anti_aliasing<class_StyleBoxFlat_property_anti_aliasing>` to ``false`` to ensure crisp visuals and avoid possible visual glitches.
  113. ----
  114. .. _class_StyleBoxFlat_property_anti_aliasing_size:
  115. - :ref:`float<class_float>` **anti_aliasing_size**
  116. +-----------+--------------------+
  117. | *Default* | ``0.625`` |
  118. +-----------+--------------------+
  119. | *Setter* | set_aa_size(value) |
  120. +-----------+--------------------+
  121. | *Getter* | get_aa_size() |
  122. +-----------+--------------------+
  123. This changes the size of the faded ring. Higher values can be used to achieve a "blurry" effect.
  124. ----
  125. .. _class_StyleBoxFlat_property_bg_color:
  126. - :ref:`Color<class_Color>` **bg_color**
  127. +-----------+-------------------------------+
  128. | *Default* | ``Color( 0.6, 0.6, 0.6, 1 )`` |
  129. +-----------+-------------------------------+
  130. | *Setter* | set_bg_color(value) |
  131. +-----------+-------------------------------+
  132. | *Getter* | get_bg_color() |
  133. +-----------+-------------------------------+
  134. The background color of the stylebox.
  135. ----
  136. .. _class_StyleBoxFlat_property_border_blend:
  137. - :ref:`bool<class_bool>` **border_blend**
  138. +-----------+-------------------------+
  139. | *Default* | ``false`` |
  140. +-----------+-------------------------+
  141. | *Setter* | set_border_blend(value) |
  142. +-----------+-------------------------+
  143. | *Getter* | get_border_blend() |
  144. +-----------+-------------------------+
  145. If ``true``, the border will fade into the background color.
  146. ----
  147. .. _class_StyleBoxFlat_property_border_color:
  148. - :ref:`Color<class_Color>` **border_color**
  149. +-----------+-------------------------------+
  150. | *Default* | ``Color( 0.8, 0.8, 0.8, 1 )`` |
  151. +-----------+-------------------------------+
  152. | *Setter* | set_border_color(value) |
  153. +-----------+-------------------------------+
  154. | *Getter* | get_border_color() |
  155. +-----------+-------------------------------+
  156. Sets the color of the border.
  157. ----
  158. .. _class_StyleBoxFlat_property_border_width_bottom:
  159. - :ref:`int<class_int>` **border_width_bottom**
  160. +-----------+-------------------------+
  161. | *Default* | ``0`` |
  162. +-----------+-------------------------+
  163. | *Setter* | set_border_width(value) |
  164. +-----------+-------------------------+
  165. | *Getter* | get_border_width() |
  166. +-----------+-------------------------+
  167. Border width for the bottom border.
  168. ----
  169. .. _class_StyleBoxFlat_property_border_width_left:
  170. - :ref:`int<class_int>` **border_width_left**
  171. +-----------+-------------------------+
  172. | *Default* | ``0`` |
  173. +-----------+-------------------------+
  174. | *Setter* | set_border_width(value) |
  175. +-----------+-------------------------+
  176. | *Getter* | get_border_width() |
  177. +-----------+-------------------------+
  178. Border width for the left border.
  179. ----
  180. .. _class_StyleBoxFlat_property_border_width_right:
  181. - :ref:`int<class_int>` **border_width_right**
  182. +-----------+-------------------------+
  183. | *Default* | ``0`` |
  184. +-----------+-------------------------+
  185. | *Setter* | set_border_width(value) |
  186. +-----------+-------------------------+
  187. | *Getter* | get_border_width() |
  188. +-----------+-------------------------+
  189. Border width for the right border.
  190. ----
  191. .. _class_StyleBoxFlat_property_border_width_top:
  192. - :ref:`int<class_int>` **border_width_top**
  193. +-----------+-------------------------+
  194. | *Default* | ``0`` |
  195. +-----------+-------------------------+
  196. | *Setter* | set_border_width(value) |
  197. +-----------+-------------------------+
  198. | *Getter* | get_border_width() |
  199. +-----------+-------------------------+
  200. Border width for the top border.
  201. ----
  202. .. _class_StyleBoxFlat_property_corner_detail:
  203. - :ref:`int<class_int>` **corner_detail**
  204. +-----------+--------------------------+
  205. | *Default* | ``8`` |
  206. +-----------+--------------------------+
  207. | *Setter* | set_corner_detail(value) |
  208. +-----------+--------------------------+
  209. | *Getter* | get_corner_detail() |
  210. +-----------+--------------------------+
  211. This sets the number of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value, you should take the corner radius (:ref:`set_corner_radius_all<class_StyleBoxFlat_method_set_corner_radius_all>`) into account.
  212. For corner radii less than 10, ``4`` or ``5`` should be enough. For corner radii less than 30, values between ``8`` and ``12`` should be enough.
  213. A corner detail of ``1`` will result in chamfered corners instead of rounded corners, which is useful for some artistic effects.
  214. ----
  215. .. _class_StyleBoxFlat_property_corner_radius_bottom_left:
  216. - :ref:`int<class_int>` **corner_radius_bottom_left**
  217. +-----------+--------------------------+
  218. | *Default* | ``0`` |
  219. +-----------+--------------------------+
  220. | *Setter* | set_corner_radius(value) |
  221. +-----------+--------------------------+
  222. | *Getter* | get_corner_radius() |
  223. +-----------+--------------------------+
  224. The bottom-left corner's radius. If ``0``, the corner is not rounded.
  225. ----
  226. .. _class_StyleBoxFlat_property_corner_radius_bottom_right:
  227. - :ref:`int<class_int>` **corner_radius_bottom_right**
  228. +-----------+--------------------------+
  229. | *Default* | ``0`` |
  230. +-----------+--------------------------+
  231. | *Setter* | set_corner_radius(value) |
  232. +-----------+--------------------------+
  233. | *Getter* | get_corner_radius() |
  234. +-----------+--------------------------+
  235. The bottom-right corner's radius. If ``0``, the corner is not rounded.
  236. ----
  237. .. _class_StyleBoxFlat_property_corner_radius_top_left:
  238. - :ref:`int<class_int>` **corner_radius_top_left**
  239. +-----------+--------------------------+
  240. | *Default* | ``0`` |
  241. +-----------+--------------------------+
  242. | *Setter* | set_corner_radius(value) |
  243. +-----------+--------------------------+
  244. | *Getter* | get_corner_radius() |
  245. +-----------+--------------------------+
  246. The top-left corner's radius. If ``0``, the corner is not rounded.
  247. ----
  248. .. _class_StyleBoxFlat_property_corner_radius_top_right:
  249. - :ref:`int<class_int>` **corner_radius_top_right**
  250. +-----------+--------------------------+
  251. | *Default* | ``0`` |
  252. +-----------+--------------------------+
  253. | *Setter* | set_corner_radius(value) |
  254. +-----------+--------------------------+
  255. | *Getter* | get_corner_radius() |
  256. +-----------+--------------------------+
  257. The top-right corner's radius. If ``0``, the corner is not rounded.
  258. ----
  259. .. _class_StyleBoxFlat_property_draw_center:
  260. - :ref:`bool<class_bool>` **draw_center**
  261. +-----------+--------------------------+
  262. | *Default* | ``true`` |
  263. +-----------+--------------------------+
  264. | *Setter* | set_draw_center(value) |
  265. +-----------+--------------------------+
  266. | *Getter* | is_draw_center_enabled() |
  267. +-----------+--------------------------+
  268. Toggles drawing of the inner part of the stylebox.
  269. ----
  270. .. _class_StyleBoxFlat_property_expand_margin_bottom:
  271. - :ref:`float<class_float>` **expand_margin_bottom**
  272. +-----------+--------------------------+
  273. | *Default* | ``0.0`` |
  274. +-----------+--------------------------+
  275. | *Setter* | set_expand_margin(value) |
  276. +-----------+--------------------------+
  277. | *Getter* | get_expand_margin() |
  278. +-----------+--------------------------+
  279. Expands the stylebox outside of the control rect on the bottom edge. Useful in combination with :ref:`border_width_bottom<class_StyleBoxFlat_property_border_width_bottom>` to draw a border outside the control rect.
  280. ----
  281. .. _class_StyleBoxFlat_property_expand_margin_left:
  282. - :ref:`float<class_float>` **expand_margin_left**
  283. +-----------+--------------------------+
  284. | *Default* | ``0.0`` |
  285. +-----------+--------------------------+
  286. | *Setter* | set_expand_margin(value) |
  287. +-----------+--------------------------+
  288. | *Getter* | get_expand_margin() |
  289. +-----------+--------------------------+
  290. Expands the stylebox outside of the control rect on the left edge. Useful in combination with :ref:`border_width_left<class_StyleBoxFlat_property_border_width_left>` to draw a border outside the control rect.
  291. ----
  292. .. _class_StyleBoxFlat_property_expand_margin_right:
  293. - :ref:`float<class_float>` **expand_margin_right**
  294. +-----------+--------------------------+
  295. | *Default* | ``0.0`` |
  296. +-----------+--------------------------+
  297. | *Setter* | set_expand_margin(value) |
  298. +-----------+--------------------------+
  299. | *Getter* | get_expand_margin() |
  300. +-----------+--------------------------+
  301. Expands the stylebox outside of the control rect on the right edge. Useful in combination with :ref:`border_width_right<class_StyleBoxFlat_property_border_width_right>` to draw a border outside the control rect.
  302. ----
  303. .. _class_StyleBoxFlat_property_expand_margin_top:
  304. - :ref:`float<class_float>` **expand_margin_top**
  305. +-----------+--------------------------+
  306. | *Default* | ``0.0`` |
  307. +-----------+--------------------------+
  308. | *Setter* | set_expand_margin(value) |
  309. +-----------+--------------------------+
  310. | *Getter* | get_expand_margin() |
  311. +-----------+--------------------------+
  312. Expands the stylebox outside of the control rect on the top edge. Useful in combination with :ref:`border_width_top<class_StyleBoxFlat_property_border_width_top>` to draw a border outside the control rect.
  313. ----
  314. .. _class_StyleBoxFlat_property_shadow_color:
  315. - :ref:`Color<class_Color>` **shadow_color**
  316. +-----------+---------------------------+
  317. | *Default* | ``Color( 0, 0, 0, 0.6 )`` |
  318. +-----------+---------------------------+
  319. | *Setter* | set_shadow_color(value) |
  320. +-----------+---------------------------+
  321. | *Getter* | get_shadow_color() |
  322. +-----------+---------------------------+
  323. The color of the shadow. This has no effect if :ref:`shadow_size<class_StyleBoxFlat_property_shadow_size>` is lower than 1.
  324. ----
  325. .. _class_StyleBoxFlat_property_shadow_offset:
  326. - :ref:`Vector2<class_Vector2>` **shadow_offset**
  327. +-----------+--------------------------+
  328. | *Default* | ``Vector2( 0, 0 )`` |
  329. +-----------+--------------------------+
  330. | *Setter* | set_shadow_offset(value) |
  331. +-----------+--------------------------+
  332. | *Getter* | get_shadow_offset() |
  333. +-----------+--------------------------+
  334. The shadow offset in pixels. Adjusts the position of the shadow relatively to the stylebox.
  335. ----
  336. .. _class_StyleBoxFlat_property_shadow_size:
  337. - :ref:`int<class_int>` **shadow_size**
  338. +-----------+------------------------+
  339. | *Default* | ``0`` |
  340. +-----------+------------------------+
  341. | *Setter* | set_shadow_size(value) |
  342. +-----------+------------------------+
  343. | *Getter* | get_shadow_size() |
  344. +-----------+------------------------+
  345. The shadow size in pixels.
  346. Method Descriptions
  347. -------------------
  348. .. _class_StyleBoxFlat_method_get_border_width:
  349. - :ref:`int<class_int>` **get_border_width** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin **)** |const|
  350. Returns the given ``margin``'s border width. See :ref:`Margin<enum_@GlobalScope_Margin>` for possible values.
  351. ----
  352. .. _class_StyleBoxFlat_method_get_border_width_min:
  353. - :ref:`int<class_int>` **get_border_width_min** **(** **)** |const|
  354. Returns the smallest border width out of all four borders.
  355. ----
  356. .. _class_StyleBoxFlat_method_get_corner_radius:
  357. - :ref:`int<class_int>` **get_corner_radius** **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner **)** |const|
  358. Returns the given ``corner``'s radius. See :ref:`Corner<enum_@GlobalScope_Corner>` for possible values.
  359. ----
  360. .. _class_StyleBoxFlat_method_get_expand_margin:
  361. - :ref:`float<class_float>` **get_expand_margin** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin **)** |const|
  362. Returns the size of the given ``margin``'s expand margin. See :ref:`Margin<enum_@GlobalScope_Margin>` for possible values.
  363. ----
  364. .. _class_StyleBoxFlat_method_set_border_width:
  365. - void **set_border_width** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`int<class_int>` width **)**
  366. Sets the border width to ``width`` pixels for the given ``margin``. See :ref:`Margin<enum_@GlobalScope_Margin>` for possible values.
  367. ----
  368. .. _class_StyleBoxFlat_method_set_border_width_all:
  369. - void **set_border_width_all** **(** :ref:`int<class_int>` width **)**
  370. Sets the border width to ``width`` pixels for all margins.
  371. ----
  372. .. _class_StyleBoxFlat_method_set_corner_radius:
  373. - void **set_corner_radius** **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner, :ref:`int<class_int>` radius **)**
  374. Sets the corner radius to ``radius`` pixels for the given ``corner``. See :ref:`Corner<enum_@GlobalScope_Corner>` for possible values.
  375. ----
  376. .. _class_StyleBoxFlat_method_set_corner_radius_all:
  377. - void **set_corner_radius_all** **(** :ref:`int<class_int>` radius **)**
  378. Sets the corner radius to ``radius`` pixels for all corners.
  379. ----
  380. .. _class_StyleBoxFlat_method_set_corner_radius_individual:
  381. - void **set_corner_radius_individual** **(** :ref:`int<class_int>` radius_top_left, :ref:`int<class_int>` radius_top_right, :ref:`int<class_int>` radius_bottom_right, :ref:`int<class_int>` radius_bottom_left **)**
  382. Sets the corner radius for each corner to ``radius_top_left``, ``radius_top_right``, ``radius_bottom_right``, and ``radius_bottom_left`` pixels.
  383. ----
  384. .. _class_StyleBoxFlat_method_set_expand_margin:
  385. - void **set_expand_margin** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`float<class_float>` size **)**
  386. Sets the expand margin to ``size`` pixels for the given ``margin``. See :ref:`Margin<enum_@GlobalScope_Margin>` for possible values.
  387. ----
  388. .. _class_StyleBoxFlat_method_set_expand_margin_all:
  389. - void **set_expand_margin_all** **(** :ref:`float<class_float>` size **)**
  390. Sets the expand margin to ``size`` pixels for all margins.
  391. ----
  392. .. _class_StyleBoxFlat_method_set_expand_margin_individual:
  393. - void **set_expand_margin_individual** **(** :ref:`float<class_float>` size_left, :ref:`float<class_float>` size_top, :ref:`float<class_float>` size_right, :ref:`float<class_float>` size_bottom **)**
  394. Sets the expand margin for each margin to ``size_left``, ``size_top``, ``size_right``, and ``size_bottom`` pixels.
  395. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  396. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  397. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`