Fenster hinzugefügt.

This commit is contained in:
Martin Putzlocher 2023-12-07 23:54:21 +01:00
parent 28866b01b2
commit 8c483eab7e

View File

@ -4,3 +4,34 @@
print("Hello World!")
import tkinter as tk
import tkinter.ttk as ttk
from tkinter import messagebox as tkm
from tkinter import font as tkfont
import locale
loc = locale.getlocale()
print("Got locale: {}".format(loc))
mydefaultfont = ('Helvetica', 11)
myfont = "Helvetica 14"
mygradefont = "Helvetica 40"
mylatexfont = ("C059", "10", "italic")
root = tk.Tk()
# Anpassung der dpi
dpi_value = root.winfo_fpixels('1i')
print("DPI {}".format(dpi_value))
# root.tk.call('tk', 'scaling', '-displayof', '.', dpi_value / 72.0)
root.tk.call('tk', 'scaling', dpi_value / 72.0)
root.attributes('-zoomed', True)
print(root.tk.call('info', 'patchlevel'))
style = ttk.Style(root)
style.theme_use("default")
style.configure('.', font = mydefaultfont)
#style.map('Treeview', foreground=st.fixed_map(style, 'foreground'),
# background=st.fixed_map(style, 'background'))
print(style.theme_use())
root.mainloop()