Giter Club home page Giter Club logo

Comments (7)

pabloo87 avatar pabloo87 commented on May 20, 2024 1

I found this workaround:
I commented in azure.tcl the next block
#tk_setPalette background [ttk::style lookup . -background] \ #foreground [ttk::style lookup . -foreground] \ #highlightColor [ttk::style lookup . -focuscolor] \ #selectBackground [ttk::style lookup . -selectbackground] \ #selectForeground [ttk::style lookup . -selectforeground] \ #activeBackground [ttk::style lookup . -selectbackground] \ #activeForeground [ttk::style lookup . -selectforeground]
Lines 35-41

from azure-ttk-theme.

rdbende avatar rdbende commented on May 20, 2024

I assume this happens on Linux, though I wasn't able to reproduce it. Could you please attach some example code?

from azure-ttk-theme.

OleMussmann avatar OleMussmann commented on May 20, 2024

Thanks for the reply, @rdbende . I should have included more information to begin with.

  • Tested Python versions: 3.6.9, 3.10.3
  • Host system: Ubuntu 20.04

The askdirectory dialog has a white background. The font is white or invisible, rendering the text unreadable. Once selected or clicked on, the text changes to black (and staying black!), making it readable. See screenshot attached.

bug_35

import tkinter as tk
from tkinter import ttk, filedialog


class App(ttk.Frame):
    def __init__(self, parent):
        ttk.Frame.__init__(self)
        self.widgets_frame = ttk.Frame(self)
        self.widgets_frame.grid()
        self.button = ttk.Button(self.widgets_frame, text="Open Folder",
                                 command=filedialog.askdirectory)
        self.button.grid(row=0, column=0, padx=5, pady=10, sticky="nsew")


if __name__ == "__main__":
    root = tk.Tk()

    root.tk.call("source", "azure.tcl")
    root.tk.call("set_theme", "dark")

    app = App(root)
    app.pack(fill="both", expand=True)

    root.mainloop()

from azure-ttk-theme.

rdbende avatar rdbende commented on May 20, 2024

Ohh yess, now I see. Tho it's really strange. Why do do that item remain black when unselected? 🤔
Now I don't even know what that widget is. Kinda looks like a Treeview, wrapped into an Entry, but then why it isn't themed?

Now I'm a bit confused, lol 🥴

from azure-ttk-theme.

rdbende avatar rdbende commented on May 20, 2024

Note for myself: https://stackoverflow.com/questions/53655418/tkfiledialog-asksaveasfile-text-color-font#comment109368049_53656679

Edit: I can't get this to work

from azure-ttk-theme.

rdbende avatar rdbende commented on May 20, 2024

Turns out it's some kind of canvas thingy.

from azure-ttk-theme.

rdbende avatar rdbende commented on May 20, 2024

I could hack the canvas to make the background dark, but then it wouldn't work after an item is selected.
Probably it's gonna be a ticket in Tk's source repo.

from azure-ttk-theme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.