diff options
author | fvogel <fvogelnew1@free.fr> | 2017-09-13 21:07:39 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2017-09-13 21:07:39 (GMT) |
commit | e0f48e9a758dd7144dabbb437aeddb50b0e5af3f (patch) | |
tree | b518372aa472cee5e343591a5bf3f322e3e73248 | |
parent | 071315a7089435a43c9d1f29ecb534e41c122665 (diff) | |
download | tk-bug_8277e1a906.zip tk-bug_8277e1a906.tar.gz tk-bug_8277e1a906.tar.bz2 |
Fix the proposed patch since it had unexpected jumping effects in the fonts listbox.
bug_8277e1a906
For instance in wish (the extrafont package is supposed to have been installed):
tk fontchooser show ; # shows existing fonts
package require extrafont
extrafont::load /home/francois/Téléchargements/Term-RegCcc.ttf
tk fontchooser show ; # check that the new font family "Term" is now available in the listbox
# click on a font family _before_ "Term" -> fine
# click on a font family _after_ "Term" -> the font listbox jumped to the top of the list!
-rw-r--r-- | library/fontchooser.tcl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/fontchooser.tcl b/library/fontchooser.tcl index 14ac650..5395acb 100644 --- a/library/fontchooser.tcl +++ b/library/fontchooser.tcl @@ -66,6 +66,8 @@ proc ::tk::fontchooser::Show {} { tk::PlaceWindow $S(W) widget $S(-parent) } set S(fonts) [lsort -dictionary [font families]] + set S(fonts,lcase) {} + foreach font $S(fonts) { lappend S(fonts,lcase) [string tolower $font]} wm deiconify $S(W) } |