summaryrefslogtreecommitdiffstats
path: root/library/tearoff.tcl
diff options
context:
space:
mode:
authordas <das>2007-04-29 02:24:49 (GMT)
committerdas <das>2007-04-29 02:24:49 (GMT)
commit1a476a1767db9dd2a37ed65dbe0cd3a24413d4b4 (patch)
tree83616c330ca5ebe0f636c1c22df4a55c86ce6f36 /library/tearoff.tcl
parent1cb29bfc3b4440becbbb83a55e3617c04fd3f4f4 (diff)
downloadtk-1a476a1767db9dd2a37ed65dbe0cd3a24413d4b4.zip
tk-1a476a1767db9dd2a37ed65dbe0cd3a24413d4b4.tar.gz
tk-1a476a1767db9dd2a37ed65dbe0cd3a24413d4b4.tar.bz2
* library/bgerror.tcl: on aqua, use moveable alert resp. modal dialog
* library/dialog.tcl: window class and corresponding system background pattern; fix button padding. * library/tearoff.tcl: correct aqua menu bar height; vertically offset * library/tk.tcl: aqua tearoff floating window to match menu.
Diffstat (limited to 'library/tearoff.tcl')
-rw-r--r--library/tearoff.tcl8
1 files changed, 7 insertions, 1 deletions
diff --git a/library/tearoff.tcl b/library/tearoff.tcl
index 053ebd9..70440ab 100644
--- a/library/tearoff.tcl
+++ b/library/tearoff.tcl
@@ -2,7 +2,7 @@
#
# This file contains procedures that implement tear-off menus.
#
-# RCS: @(#) $Id: tearoff.tcl,v 1.7.4.1 2006/01/25 18:21:41 dgp Exp $
+# RCS: @(#) $Id: tearoff.tcl,v 1.7.4.2 2007/04/29 02:24:49 das Exp $
#
# Copyright (c) 1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -37,6 +37,12 @@ proc ::tk::TearOffMenu {w {x 0} {y 0}} {
}
if {$y == 0} {
set y [winfo rooty $w]
+ if {[tk windowingsystem] eq "aqua"} {
+ # Shift by height of tearoff entry minus height of window titlebar
+ catch {incr y [expr {[$w yposition 1] - 16}]}
+ # Avoid the native menu bar which sits on top of everything.
+ if {$y < 22} { set y 22 }
+ }
}
set parent [winfo parent $w]