Tk Library Source Code

Artifact [ab9e814e66]
Login

Artifact ab9e814e668b0bb055c3c80b2b6f0645a80ce5b9:

Attachment "dynhelp.patch" to ticket [2835180fff] added by wordtech 2009-08-11 04:51:05.
--- dynhelp-bak.tcl	2009-07-15 18:50:16.000000000 -0400
+++ dynhelp.tcl	2009-08-10 17:35:27.000000000 -0400
@@ -18,24 +18,32 @@
 
 namespace eval DynamicHelp {
     Widget::define DynamicHelp dynhelp -classonly
-
-    Widget::declare DynamicHelp {
-        {-foreground     TkResource black         0 label}
-        {-topbackground  TkResource black         0 {label -foreground}}
-        {-background     TkResource "#FFFFC0"     0 label}
-        {-borderwidth    TkResource 1             0 label}
-        {-justify        TkResource left          0 label}
-        {-font           TkResource "helvetica 8" 0 label}
-        {-delay          Int        600           0 "%d >= 100 & %d <= 2000"}
-	{-state          Enum       "normal"      0 {normal disabled}}
-        {-padx           TkResource 1             0 label}
-        {-pady           TkResource 1             0 label}
-        {-bd             Synonym    -borderwidth}
-        {-bg             Synonym    -background}
-        {-fg             Synonym    -foreground}
-        {-topbg          Synonym    -topbackground}
+    
+    if {$::tcl_version >= 8.5} {
+        set fontdefault TkTooltipFont
+    } elseif {$Widget::_aqua} {
+        set fontdefault {helvetica 11}
+    } else {
+        set fontdefault {helvetica 8}
     }
 
+    Widget::declare DynamicHelp [list\
+        {-foreground     TkResource black         0 label}\
+        {-topbackground  TkResource black         0 {label -foreground}}\
+        {-background     TkResource "#FFFFC0"     0 label}\
+        {-borderwidth    TkResource 1             0 label}\
+        {-justify        TkResource left          0 label}\
+        [list -font      TkResource $fontdefault  0 label]\
+        {-delay          Int        600           0 "%d >= 100 & %d <= 2000"}\
+	{-state          Enum       "normal"      0 {normal disabled}}\
+        {-padx           TkResource 1             0 label}\
+        {-pady           TkResource 1             0 label}\
+        {-bd             Synonym    -borderwidth}\
+        {-bg             Synonym    -background}\
+        {-fg             Synonym    -foreground}\
+        {-topbg          Synonym    -topbackground}\
+    ]
+
     proc use {} {}
 
     variable _registered