class_styleboxflat.rst 30 KB

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