Closed francoisrob closed 1 year ago
This is a known bug. Over the last two years, I have tried several times to find out why does it resize, but I could not figure it out.
Thanks for great rdbene themes !
May I just ask as a side note to this issue: Did you consider to file a bug in the Tk project? https://core.tcl-lang.org/tk/ticket
Note, that it is required to login as anonymous with the ASCII-art password shown on the login page.
Recently, many efforts were done to attack all bugs in Tk.
If you have a test script, I may also try it.
Thank you, Harald
This is a known bug. Over the last two years, I have tried several times to find out why does it resize, but I could not figure it out.
Do you maybe have a workaround or should I just refrain from using the treeview for now
@oehhar
I tested several different themes, and it turns out that the problem happens when the theme uses a custom image for the Treeview.field
element.
Here is a short script that illustrates the bug. Every time you click the "theme use" button, the treeview expands horizontally.
package require Tk 8.6
image create photo tree -data {
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAnXAAAJ1wG
xbhe3AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAACJJREFUOI
1jPLF9+38GKgImaho2auCogaMGjho4auBQMhAAyR0DXUEyypsAAAAASUVORK5CYII=
}
ttk::style theme create my_theme -parent clam -settings {
ttk::style element create Treeview.field image tree
}
pack [ttk::treeview .tree]
pack [ttk::button .btn -text "theme use" -command {ttk::style theme use my_theme}]
ttk::style theme use my_theme
I will open a ticket in the Tk core about this bug.
Great finding. Please don't forget to mention the Tk version.
Take care, Harald
The ticket has been addressed, please comment there.
Ahh, I feel so newbie I don't know how to comment on a Fossil ticket.
@fvogelnew1 Anyways, thanks for your feedback. Using -width 0 -height 0
kind of makes sense now. I'll fix my themes with this tomorrow!
Commenting a Fossil ticket is done by clicking on the Edit button.
I want to thank the great tk team to have fixed this (Peter, Alexandre). Just a remark on fossil:
Thank you all, Harald
Commenting a Fossil ticket is done by clicking on the Edit button.
Lol it's just too obvious 😅. Thanks!
Thanks for your feedback in the Tk ticket. I have now closed this ticket.
The treeview component resizes when switching between light and dark mode and just increasing in width