TomSchimansky / CustomTkinter

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

system theme wont change #1161

Closed amonull closed 1 year ago

amonull commented 1 year ago

os: void linux python version: 3.11 pip version (venv): 22.3.1 customtkinter version: 5.0.5 darkdetect version: 0.8.0 tkinter (systemwide install version): 8.6.13_ python3-tkinter version: 3.11.1_1

expected outcome: using vannila tkinter or settting appearance to light or system resulting in light appearance

actual outcome: dark mode sticks around with widgets and stays on them even when changing appearance mode or even removing customtkinter.

recently started using this library and was using the customtkinter.set_appearance_mode("Dark") to have it be in dark mode however after using vannila tkinter and also customtkinter.set_appearance_mode("Light"/"System") i noticed that dark mode sticks around and most stuff are still in dark mode. code used example scrollbar code in customtkinter wiki

example of how it looks with textbox below image

without text box below image

amonull commented 1 year ago

i forgot to mention i did a full reinstall of tkinter with customtkinter removed from my system but the issue did not get fixed. System reboots also did not help.

amonull commented 1 year ago

using different languages like perl to create tk results in the same theme being shown.

code:

#!/usr/bin/perl
use Tk;
# Main Window
my $mw = new MainWindow;
my $label = $mw -> Label(-text=>"Hello World") -> pack();
my $button = $mw -> Button(-text => "Quit",
        -command => sub { exit })
    -> pack();
MainLoop;

output: image

i think when i used customtkinter it somehow managed to change the default tkinter theme system wide or managed to change its default colors system wide.

amonull commented 1 year ago

after searching around and reading https://www.cs.man.ac.uk/%7Efellowsd/tcl/option-tutorial.html i've found out that my tkinter is reading .Xresources to set its colors instead of using the default colors and some parts of it are also affected by picom running in the background causing some windows to be rounded and look weird. closing as it is not customtkinter related.