summaryrefslogtreecommitdiffstats
path: root/library/msgbox.tcl
diff options
context:
space:
mode:
authordas <das>2007-05-30 06:37:03 (GMT)
committerdas <das>2007-05-30 06:37:03 (GMT)
commitf3d210a9783984b6003f0a0bc94414d2adfe5260 (patch)
tree15eb2ed51b80e925a08ac127290e70a94dac2cef /library/msgbox.tcl
parente8a7346ab6321fdaaef3d8fda8c54cc1bebb9e12 (diff)
downloadtk-f3d210a9783984b6003f0a0bc94414d2adfe5260.zip
tk-f3d210a9783984b6003f0a0bc94414d2adfe5260.tar.gz
tk-f3d210a9783984b6003f0a0bc94414d2adfe5260.tar.bz2
* library/bgerror.tcl: standardize dialog option & button size
* library/dialog.tcl: modifications done when running on on Aqua. * library/msgbox.tcl: * library/demos/button.tcl: set button highlightbackground on Aqua.
Diffstat (limited to 'library/msgbox.tcl')
-rw-r--r--library/msgbox.tcl17
1 files changed, 15 insertions, 2 deletions
diff --git a/library/msgbox.tcl b/library/msgbox.tcl
index fdf987a..2f8419b 100644
--- a/library/msgbox.tcl
+++ b/library/msgbox.tcl
@@ -3,7 +3,7 @@
# Implements messageboxes for platforms that do not have native
# messagebox support.
#
-# RCS: @(#) $Id: msgbox.tcl,v 1.24.2.3 2006/01/25 18:21:41 dgp Exp $
+# RCS: @(#) $Id: msgbox.tcl,v 1.24.2.4 2007/05/30 06:37:03 das Exp $
#
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
#
@@ -166,6 +166,9 @@ proc ::tk::MessageBox {args} {
"warning" {set data(-icon) "caution"}
"info" {set data(-icon) "note"}
}
+ option add *Dialog*background systemDialogBackgroundActive widgetDefault
+ option add *Dialog*Button.highlightBackground \
+ systemDialogBackgroundActive widgetDefault
}
if {![winfo exists $data(-parent)]} {
@@ -259,7 +262,7 @@ proc ::tk::MessageBox {args} {
}
if {$windowingsystem eq "classic" || $windowingsystem eq "aqua"} {
- unsupported::MacWindowStyle style $w dBoxProc
+ ::tk::unsupported::MacWindowStyle style $w moveableModal {}
}
frame $w.bot -background $bg
@@ -350,6 +353,16 @@ proc ::tk::MessageBox {args} {
}
grid $w.$name -in $w.bot -row 0 -column $i -padx 3m -pady 2m -sticky ew
grid columnconfigure $w.bot $i -uniform buttons
+ # We boost the size of some Mac buttons for l&f
+ if {$windowingsystem eq "classic" || $windowingsystem eq "aqua"} {
+ set tmp [string tolower $name]
+ if {$tmp eq "ok" || $tmp eq "cancel" || $tmp eq "yes" ||
+ $tmp eq "no" || $tmp eq "abort" || $tmp eq "retry" ||
+ $tmp eq "ignore"} {
+ grid columnconfigure $w.bot $i -minsize 90
+ }
+ grid configure $w.$name -pady 7
+ }
incr i
# create the binding for the key accelerator, based on the underline