rdbende / Azure-ttk-theme

A stunning modern theme for ttk inspired by Fluent Design 💠
MIT License
739 stars 136 forks source link

Cropped treeview items and troubles with launch #64

Closed silentstranger5 closed 9 months ago

silentstranger5 commented 9 months ago

First of all, I would like to note that this theme looks really amazing. I like it. When I tried to launch an example, I stumbled upon two issues. First of all, script does not launch when invoked with Windows Python Launcher for some reason (but from terminal and IDLE it works fine, so I have no idea why). Something slightly similar happened to me previously. It may have something to do with a filesystem. Second, program looks blurry, just as any tkinter on my computer. I resolved that by standard method in this situation:

from ctypes import windll
windll.shcore.SetProcessDpiAwareness(1)

It resolves that problem, but unfortunately, introduces another: all items from treeview are cropped. Screenshot attached.

Screenshot 2024-01-23 230104
oehhar commented 9 months ago

Here is an eventually unrelated comment from the unerlying TCL/Tk community. The overlapping Treeview row is an artefact of Tk 8.6 when larger Fonts are used. At least, Tk 9.0 (currently beta) solves this (and a lot of other) scaling issues.

RDBene probably knowa this. A common solution may be found on the wiki page: ttk::treeview See "Big font overlap".

Sorry when unrelated, Harald

silentstranger5 commented 9 months ago

Okay, it may have nothing to do with that particular theme then. Also, issue with Python Laucher fixed. It was indeed a filesystem problem. Unrelated to that theme also:

import os
path = os.path.dirname(__file__) + '\\azure.tcl'
root.tk.call('source', path)
# instead of
# root.tk.call('source', 'azure.tcl')
silentstranger5 commented 9 months ago

Issue fixed. It was indeed a tkinter problem:

style = ttk.Style()
style.configure('Treeview', rowheight=40)

Thanks for hint, @oehhar.

oehhar commented 9 months ago

Great !