flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
11.62k stars 455 forks source link

Tooltip is not displayed correctly in 0.24.1 #3971

Closed InesaFitsner closed 2 months ago

InesaFitsner commented 2 months ago

Duplicate Check

Describe the bug

Instead of tooltip, some text with tooltip properties is displayed.

Code sample

Code ```python import math import flet as ft def main(page): text = ft.Text( value="Hover to see tooltip", tooltip=ft.Tooltip( message="This is tooltip", padding=20, border_radius=10, text_style=ft.TextStyle(size=20, color=ft.colors.WHITE), gradient=ft.LinearGradient( begin=ft.alignment.top_left, end=ft.alignment.Alignment(0.8, 1), colors=[ "0xff1f005c", "0xff5b0060", "0xff870160", "0xffac255e", "0xffca485c", "0xffe16b5c", "0xfff39060", "0xffffb56b", ], tile_mode=ft.GradientTileMode.MIRROR, rotation=math.pi / 3, ), ), ) page.add(text) ft.app(target=main) ```

To reproduce

  1. Run repro code
  2. Hover mouse over text
  3. Instead of tooltip see this: Screenshot 2024-09-11 at 1 13 13 PM

Expected behavior

I expected to see tooltip with gradient.

Screenshots / Videos

Captures [Upload media here]

Operating System

macOS

Operating system details

macOS

Flet version

0.24.1

Regression

Yes, it used to work in a previous Flet version (please specify the version in additional details)

Suggestions

It used to work when Tooltip used to be a Control (0.21.2)

Logs

Logs ```console [Paste your logs here] ```

Additional details

No response

ndonkoHenri commented 2 months ago

Here is the output on my end: image

InesaFitsner commented 2 months ago

Was issue with my environment