Akascape / CTkDesigner-Support

Support page for CTkDesigner - GUI design app for customtkinter
https://ko-fi.com/s/6fca1ae70f
Other
90 stars 0 forks source link

CTkHyperlink font bug #28

Open teijiIshida opened 2 months ago

teijiIshida commented 2 months ago

Hello,

There seems to be a weird bug with the CTkHyperlink when using a font variable for the font argument. It underlines every other widgets (unrelated to the hyperlink) that also use that same font variable when I hover over the hyperlink.

Normal when not hover over hyperlink: normal

All the yellow circled widgets turn underline when I hover over the hyperlink: hyperlink bug

Sample code:

class App(ctk.CTk):

    WIDTH = 1000
    HEIGHT = 600

    def __init__(self) -> None:

        super().__init__()
        self.title("Vulcan v3.0 beta")
        self.geometry(f"{App.WIDTH}x{App.HEIGHT}")
        self.resizable(width=False, height=False)

        # FONTS SETUP
        self.font16 = ctk.CTkFont('Segoe UI', size=16, weight='bold')

        ...

        self.kofi_hyperlink: CTkHyperlink = CTkHyperlink(
                                                self.about_frame,
                                                bg_color="#2b2b2b",
                                                url="https://ko-fi.com/teiji_ishida",
                                                text="Ko-fi.com/teiji_ishida",
                                                font=self.font16)
        self.kofi_hyperlink.place(x=820, y=10)

If I use this as the font argument, then there is no underline bug: font=ctk.CTkFont('Segoe UI', size=16, weight='bold')