From 6698b740599d200209c0490272b9c796d3b13f68 Mon Sep 17 00:00:00 2001 From: Siep Kroonenberg Date: Sat, 24 Nov 2018 20:46:16 +0000 Subject: More resizing-related changes; revised collections dialog git-svn-id: svn://tug.org/texlive/trunk@49240 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/tltcl/tltcl.tcl | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'Master/tlpkg/tltcl') diff --git a/Master/tlpkg/tltcl/tltcl.tcl b/Master/tlpkg/tltcl/tltcl.tcl index e2fe958f459..e51896973f9 100644 --- a/Master/tlpkg/tltcl/tltcl.tcl +++ b/Master/tlpkg/tltcl/tltcl.tcl @@ -333,7 +333,6 @@ proc place_dlg {wnd {p "."}} { if {$wy < 0} { set wy 0} wm geometry $wnd [format "+%d+%d" $wx $wy] update idletasks - wm resizable $wnd 0 0 ; # can be overruled later wm attributes $wnd -topmost wm state $wnd normal raise $wnd $p @@ -402,12 +401,29 @@ if {$::tcl_platform(platform) eq "unix"} { # wallpaper pack [ttk::frame .browser.bg -padding 3] -fill both -expand 1 + + # ok and cancel buttons + pack [ttk::frame .browser.fr1] \ + -in .browser.bg -side bottom -fill x + ppack [ttk::button .browser.ok -text [__ "Ok"]] \ + -in .browser.fr1 -side right + ppack [ttk::button .browser.cancel -text [__ "Cancel"]] \ + -in .browser.fr1 -side right + .browser.ok configure -command { + set ::dialog_ans [.browser.tree focus] + destroy .browser + } + .browser.cancel configure -command { + set ::dialog_ans "" + destroy .browser + } + ## Create the tree and set it up pack [ttk::frame .browser.fr0] -in .browser.bg -fill both -expand 1 set tree [ttk::treeview .browser.tree \ -columns {type} -displaycolumns {} -selectmode browse \ -yscroll ".browser.vsb set"] - .browser.tree column 0 -minwidth 500 -stretch 0 + .browser.tree column 0 -stretch 1 ttk::scrollbar .browser.vsb -orient vertical -command "$tree yview" # hor. scrolling does not work, but toplevel and widget are resizable $tree heading \#0 -text "/" @@ -422,27 +438,11 @@ if {$::tcl_platform(platform) eq "unix"} { } ## Arrange the tree and its scrollbar in the toplevel - # horizontal scrolling does not work. - # possible solution: very wide treeview in smaller paned window - # (may as well use pack in the absence of a horizontal scrollbar) - grid $tree .browser.vsb -sticky nsew -in .browser.fr0 + # Horizontal scrolling does not work, but resizing does. + grid $tree -in .browser.fr0 -row 0 -column 0 -sticky nsew + grid .browser.vsb -in .browser.fr0 -row 0 -column 1 -sticky ns grid columnconfigure .browser.fr0 0 -weight 1 grid rowconfigure .browser.fr0 0 -weight 1 - - # ok and cancel buttons - pack [ttk::frame .browser.fr1] -in .browser.bg -fill x -expand 1 - ppack [ttk::button .browser.ok -text [__ "Ok"]] \ - -in .browser.fr1 -side right - ppack [ttk::button .browser.cancel -text [__ "Cancel"]] \ - -in .browser.fr1 -side right - .browser.ok configure -command { - set ::dialog_ans [.browser.tree focus] - destroy .browser - } - .browser.cancel configure -command { - set ::dialog_ans "" - destroy .browser - } unset -nocomplain ::dialog_ans # navigate tree to $initdir -- cgit v1.2.3