Comments (7)
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.
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.
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.
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.
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.
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.
Turns out it's some kind of canvas thingy.
from azure-ttk-theme.
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)
- 2.0
- Unable to change the font of ttk.Entry and ttk.Label HOT 4
- Treeview expands on theme change HOT 12
- notebook tab issue HOT 2
- Images arent transparent HOT 1
- Changing font color in dark.tcl doesn't change anything HOT 2
- There is no box-disabled.png (@#45) HOT 1
- TCL files have an error HOT 7
- Icon in button HOT 3
- How to change background in dir tree of filedialog and remove borders of dropdown listdir? HOT 2
- Pyinstaller EXE Issue HOT 3
- What is the correct way to include Azure theme with pyinstaller exe? HOT 11
- The enabled and disabled states on the Entry Box widget are indistinguishable.
- [QUESTION] How do I create my own theme? HOT 3
- Yyyy HOT 1
- Keyboard focus
- Does not install properly using pip HOT 1
- entry state="readonly" --> visualize the read only state
- Cropped treeview items and troubles with launch HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-ttk-theme.