flet icon indicating copy to clipboard operation
flet copied to clipboard

Fix issues with `*Button`s

Open ndonkoHenri opened this issue 1 month ago • 1 comments

Fixes #3573

  • Deprecated ThemeVisualDensity in favor of VisualDensity

Summary by Sourcery

This pull request addresses multiple issues with button components by adding new style properties, fixing color and elevation handling when disabled, and refactoring code for better readability and consistency. It also introduces new enums for visual density settings and ensures proper handling of deprecated enums.

  • New Features:
    • Added support for new button style properties including iconColor, alignment, enableFeedback, textStyle, iconSize, visualDensity, and mouseCursor.
    • Introduced ThemeVisualDensity and VisualDensity enums to handle visual density settings.
  • Bug Fixes:
    • Fixed issues with button color, background color, and elevation not being set correctly when disabled.
    • Resolved inconsistencies in CupertinoButton's icon color handling when disabled.
  • Enhancements:
    • Refactored button style parsing to include additional properties and improve readability.
    • Updated various button components to ensure text, icon, or visible content is provided before rendering.
    • Improved handling of deprecated MaterialState and ThemeVisualDensity enums with warnings and replacements.

ndonkoHenri avatar Jul 02 '24 07:07 ndonkoHenri