Skip to content

Commit fd5c85e

Browse files
committed
Improve theme class docstrings and DataTableTheme docs
Refined docstrings for NavigationDrawerTheme, NavigationBarTheme, SegmentedButtonTheme, and IconTheme to clarify scope as app-wide. Expanded DataTableTheme docstring and added detailed documentation for each property, specifying their purpose and corresponding DataTable attributes.
1 parent a275e0c commit fd5c85e

1 file changed

Lines changed: 84 additions & 6 deletions

File tree

  • sdk/python/packages/flet/src/flet/controls

sdk/python/packages/flet/src/flet/controls/theme.py

Lines changed: 84 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3033,7 +3033,8 @@ class SearchViewTheme:
30333033
class NavigationDrawerTheme:
30343034
"""
30353035
Customizes the appearance of descendant [`NavigationDrawer`][flet.NavigationDrawer]
3036-
controls."""
3036+
controls.
3037+
"""
30373038

30383039
bgcolor: Optional[ColorValue] = None
30393040
"""
@@ -3087,8 +3088,9 @@ class NavigationDrawerTheme:
30873088
@dataclass
30883089
class NavigationBarTheme:
30893090
"""
3090-
Customizes the appearance of descendant [`NavigationBar`][flet.NavigationBar]
3091-
controls.
3091+
Customizes the appearance of [`NavigationBar`][flet.NavigationBar]
3092+
controls across the
3093+
app.
30923094
"""
30933095

30943096
bgcolor: Optional[ColorValue] = None
@@ -3153,8 +3155,8 @@ class NavigationBarTheme:
31533155
@dataclass
31543156
class SegmentedButtonTheme:
31553157
"""
3156-
Customizes the appearance of descendant [`SegmentedButton`][flet.SegmentedButton]
3157-
controls.
3158+
Customizes the appearance of [`SegmentedButton`][flet.SegmentedButton]
3159+
controls across the app.
31583160
"""
31593161

31603162
selected_icon: Optional[IconData] = None
@@ -3173,7 +3175,7 @@ class SegmentedButtonTheme:
31733175
@dataclass
31743176
class IconTheme:
31753177
"""
3176-
Customizes the appearance of descendant [`Icon`][flet.Icon] controls.
3178+
Customizes the appearance of [`Icon`][flet.Icon] controls across the app.
31773179
"""
31783180

31793181
color: Optional[ColorValue] = None
@@ -3225,21 +3227,97 @@ class IconTheme:
32253227

32263228
@dataclass
32273229
class DataTableTheme:
3230+
"""
3231+
Customizes the appearance of [`DataTable`][flet.DataTable] controls across the app.
3232+
"""
3233+
32283234
checkbox_horizontal_margin: Optional[Number] = None
3235+
"""
3236+
Overrides the default value for
3237+
[`DataTable.checkbox_horizontal_margin`][flet.DataTable.checkbox_horizontal_margin].
3238+
"""
3239+
32293240
column_spacing: Optional[Number] = None
3241+
"""
3242+
Overrides the default value for
3243+
[`DataTable.column_spacing`][flet.DataTable.column_spacing].
3244+
"""
3245+
32303246
data_row_max_height: Optional[Number] = None
3247+
"""
3248+
Overrides the default value for
3249+
[`DataTable.data_row_max_height`][flet.DataTable.data_row_max_height].
3250+
"""
3251+
32313252
data_row_min_height: Optional[Number] = None
3253+
"""
3254+
Overrides the default value for
3255+
[`DataTable.data_row_min_height`][flet.DataTable.data_row_min_height].
3256+
"""
3257+
32323258
data_row_color: Optional[ControlStateValue[ColorValue]] = None
3259+
"""
3260+
Overrides the default value for
3261+
[`DataTable.data_row_color`][flet.DataTable.data_row_color].
3262+
"""
3263+
32333264
data_text_style: Optional[TextStyle] = None
3265+
"""
3266+
Overrides the default value for
3267+
[`DataTable.data_text_style`][flet.DataTable.data_text_style].
3268+
"""
3269+
32343270
divider_thickness: Optional[Number] = None
3271+
"""
3272+
Overrides the default value for
3273+
[`DataTable.divider_thickness`][flet.DataTable.divider_thickness].
3274+
"""
3275+
32353276
horizontal_margin: Optional[Number] = None
3277+
"""
3278+
Overrides the default value for
3279+
[`DataTable.horizontal_margin`][flet.DataTable.horizontal_margin].
3280+
"""
3281+
32363282
heading_text_style: Optional[TextStyle] = None
3283+
"""
3284+
Overrides the default value for
3285+
[`DataTable.heading_text_style`][flet.DataTable.heading_text_style].
3286+
"""
3287+
32373288
heading_row_color: Optional[ControlStateValue[ColorValue]] = None
3289+
"""
3290+
Overrides the default value for
3291+
[`DataTable.heading_row_color`][flet.DataTable.heading_row_color].
3292+
"""
3293+
32383294
heading_row_height: Optional[Number] = None
3295+
"""
3296+
Overrides the default value for
3297+
[`DataTable.heading_row_height`][flet.DataTable.heading_row_height].
3298+
"""
3299+
32393300
data_row_cursor: Optional[ControlStateValue[MouseCursor]] = None
3301+
"""
3302+
Overrides the default value for [`DataRow`][flet.DataRow] mouse cursor.
3303+
"""
3304+
32403305
decoration: Optional[BoxDecoration] = None
3306+
"""
3307+
Overrides the default value for [`DataTable`][flet.DataTable] decoration.
3308+
"""
3309+
32413310
heading_row_alignment: Optional[MainAxisAlignment] = None
3311+
"""
3312+
Overrides the default value for
3313+
[`DataColumn.heading_row_alignment`][flet.DataColumn.heading_row_alignment].
3314+
"""
3315+
32423316
heading_cell_cursor: Optional[ControlStateValue[MouseCursor]] = None
3317+
"""
3318+
Overrides the default value for
3319+
[`DataColumn`][flet.DataColumn] mouse cursor.
3320+
"""
32433321

32443322

32453323
@dataclass

0 commit comments

Comments
 (0)