TomSchimansky / CustomTkinter

A modern and customizable python UI-library based on Tkinter
MIT License
10.77k stars 1.03k forks source link

Vertical Progressbar rendering bug #2414

Open TRadigk opened 1 month ago

TRadigk commented 1 month ago

Hi,

the search yielded no results.

When the ProgressBar is set to orientation="'vertical" and corner radius is not 0, a part of the progressbar (inner rectangle) does not start at "0": grafik

Notice the "big" example on bottom left.

I could not reproduce this issue with horizontal ProgressBar.

FaheemM1020 commented 1 month ago

Can you provide the code for this ?

TRadigk commented 1 month ago

easily, yes:

import customtkinter
customtkinter.set_appearance_mode("Dark")  # Modes: "System" (standard), "Dark", "Light"
# Themes: "blue" (standard), "green", "dark-blue"
customtkinter.set_default_color_theme("blue")

class App(customtkinter.CTk):
    def __init__(self):
        self.setupWindow()
        self.protocol("WM_DELETE_WINDOW", self.__exitApp)
        verticalProgressBar = customtkinter.CTkProgressBar(
            self, width=100, corner_radius=15, orientation='vertical')
        self.run = True
        verticalProgressBar.pack()

    def setupWindow(self):
        super().__init__()
        self.geometry(f"{1024}x{600}")

    def __exitApp(self):
        self.run = False

        try:
            self.destroy()
        except:
            pass

if __name__ == "__main__":
    try:
        app = App()

        app.mainloop()
    except KeyboardInterrupt:
        app.run = False