Skip to content

tkcalendar breaks when you apply the sun valley theme  #138

Open
@Tervicke

Description

@Tervicke

tkcalendar which is a famous calendar written with tkinter breaks when u apply the sun valley theme the most notable and important thing it changes is it sets the current_date_selected to the same color which obviously ruins the whole point of the calendar , here is the example code below

import tkinter as tk
from tkcalendar import Calendar
import sv_ttk

root = tk.Tk()
root.title("Calendar Example")

cal = Calendar(root, selectmode="day", date_pattern="yyyy-mm-dd")
cal.pack(padx=10, pady=10)

sv_ttk.set_theme('Dark') 
root.mainloop()

the output I get is this
image
and if you remove the theme the output is
image
As you can see the the date of 10 is highlighted because that's the current date selected
tkcalendar does provide a way to change the selectedbackground which I tried after settings the sun valley theme thinking it might override the theme but that doesn't seem to work either
the code is here

import tkinter as tk
from tkcalendar import Calendar
import sv_ttk

root = tk.Tk()
root.title("Calendar Example")

cal = Calendar(root, selectmode="day", date_pattern="yyyy-mm-dd")
cal.pack(padx=10, pady=10)

sv_ttk.set_theme('Dark') 
cal.config(selectbackground="blue") 
root.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

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions