Skip to content

black ComboBox DropDown if using widget scaling 2 on Linux (KDE) #2817

Description

@sherpya

I'm using KDE on X11, the combobox dropdown is full black when values count > 468 if the scaling is 2 (it happens exactly with widget scaling > 1.8)
here the sample and both screnshots:

Image Image
import customtkinter as ctk


class ComboTest(ctk.CTkFrame):
    def __init__(self, master, on_change=None, **kwargs):
        super().__init__(master, **kwargs)
        self.on_change = on_change
        self.values = [f'Value #{n}' for n in range(469)]
        self.font_var = ctk.StringVar(value=self.values[0])
        self.font_menu = ctk.CTkComboBox(
            self,
            values=self.values,
            variable=self.font_var,
            width=250
        )
        self.font_menu.grid(row=0, column=0, padx=5, pady=5)


if __name__ == '__main__':
    app = ctk.CTk()
    app.title('Combo Test')
    app.geometry('300x100')
    selector = ComboTest(app, on_change=lambda f: print(f))
    selector.pack(padx=20, pady=20, fill='x')

    ctk.set_widget_scaling(2)
    ctk.set_window_scaling(2)

    app.mainloop()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions