Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing font color in dark.tcl doesn't change anything #44

Open
Dashyyy opened this issue Aug 28, 2022 · 2 comments
Open

Changing font color in dark.tcl doesn't change anything #44

Dashyyy opened this issue Aug 28, 2022 · 2 comments

Comments

@Dashyyy
Copy link
Contributor

Dashyyy commented Aug 28, 2022

I was trying to change the foreground colour of disabled labels in the dark theme (dark.tcl), but changing it didn't have any effect.
Changing it at azure.tcl did bring the expected results.
Am I missing something?

dark.tcl:

namespace eval ttk::theme::azure-dark {
    variable version 2.0
    package provide ttk::theme::azure-dark $version

    ttk::style theme create azure-dark -parent clam -settings {
        proc load_images {imgdir} {
            variable I
            foreach file [glob -directory $imgdir *.gif] {
                set img [file tail [file rootname $file]]
                set I($img) [image create photo -file $file -format gif]
            }
        }

        load_images [file join [file dirname [info script]] dark]

        array set colors {
            -fg             "#ffffff"
            -bg             "#333333"
            -disabledfg     "#aaaaaa"
            -disabledbg     "#737373"
            -selectfg       "#ffffff"
            -selectbg       "#007fff"
        }

azure.tcl:

source [file join [file dirname [info script]] theme light.tcl]
source [file join [file dirname [info script]] theme dark.tcl]

option add *tearOff 0

proc set_theme {mode} {
	if {$mode == "dark"} {
		ttk::style theme use "azure-dark"

		array set colors {
            -fg             "#ffffff"
            -bg             "#333333"
            -disabledfg     "#ffffff"
            -disabledbg     "#737373"
            -selectfg       "#ffffff"
            -selectbg       "#007fff"
        }
        
@Dashyyy
Copy link
Contributor Author

Dashyyy commented Aug 28, 2022

#46 Would not be working as intended.

@rdbende
Copy link
Owner

rdbende commented Aug 28, 2022

Actually this is somewhat intended, but it's a terrible hack.
Originally only the dark.tcl file needed these colors. Then, when azure.tcl was added, I simply copied the color dict into it.
So you can change some things in dark.tcl and light.tcl file and some things in the main azure.tcl file. Blaaahhh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants