summaryrefslogtreecommitdiffstats
path: root/library/clrpick.tcl
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2003-02-21 14:40:25 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2003-02-21 14:40:25 (GMT)
commit0bd1e26fca31c23206e90ef9bed71483dfcb3982 (patch)
treeb06c8677e6ab27b219002501ccce7f7c6ee45556 /library/clrpick.tcl
parent0b9950e2ced61c74420d7586384c367cb0e7227c (diff)
downloadtk-0bd1e26fca31c23206e90ef9bed71483dfcb3982.zip
tk-0bd1e26fca31c23206e90ef9bed71483dfcb3982.tar.gz
tk-0bd1e26fca31c23206e90ef9bed71483dfcb3982.tar.bz2
* library/clrpick.tcl (color::BuildDialog):
* library/msgbox.tcl (MessageBox): Yet more places that did complex and fragile width calculations instead of using grid, though with these it is the -uniform option that saves the day.
Diffstat (limited to 'library/clrpick.tcl')
-rw-r--r--library/clrpick.tcl14
1 files changed, 7 insertions, 7 deletions
diff --git a/library/clrpick.tcl b/library/clrpick.tcl
index db5cc09..8f1acbb 100644
--- a/library/clrpick.tcl
+++ b/library/clrpick.tcl
@@ -3,7 +3,7 @@
# Color selection dialog for platforms that do not support a
# standard color selection dialog.
#
-# RCS: @(#) $Id: clrpick.tcl,v 1.19 2002/07/22 21:25:39 mdejong Exp $
+# RCS: @(#) $Id: clrpick.tcl,v 1.20 2003/02/21 14:40:26 dkf Exp $
#
# Copyright (c) 1996 Sun Microsystems, Inc.
#
@@ -296,20 +296,20 @@ proc ::tk::dialog::color::BuildDialog {w} {
# the botFrame frame contains the buttons
#
set botFrame [frame $w.bot -relief raised -bd 1]
- set maxWidth [::tk::mcmaxamp &OK &Cancel]
- set maxWidth [expr {$maxWidth<8?8:$maxWidth}]
+
::tk::AmpWidget button $botFrame.ok -text [mc "&OK"] \
- -width $maxWidth \
-command [list tk::dialog::color::OkCmd $w]
::tk::AmpWidget button $botFrame.cancel -text [mc "&Cancel"] \
- -width $maxWidth \
-command [list tk::dialog::color::CancelCmd $w]
set data(okBtn) $botFrame.ok
set data(cancelBtn) $botFrame.cancel
- pack $botFrame.ok $botFrame.cancel \
- -padx 10 -pady 10 -expand yes -side left
+ grid x $botFrame.ok x $botFrame.cancel x -sticky ew
+ grid configure $botFrame.ok $botFrame.cancel -padx 10 -pady 10
+ grid columnconfigure $botFrame {0 4} -weight 1 -uniform space
+ grid columnconfigure $botFrame {1 3} -weight 1 -uniform button
+ grid columnconfigure $botFrame 2 -weight 2 -uniform space
pack $botFrame -side bottom -fill x