From 1716dd0b177db2823c1a9db54804b2ff72749534 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 19 Oct 2007 14:35:32 +0000 Subject: merge updates from HEAD --- ChangeLog | 39 +++++++ library/demos/button.tcl | 12 ++- library/demos/entry3.tcl | 4 +- library/demos/msgbox.tcl | 5 +- library/demos/ttkbut.tcl | 58 +++++++++++ library/demos/ttkmenu.tcl | 55 ++++++++++ library/demos/ttkpane.tcl | 95 +++++++++++++++++ library/demos/widget | 185 ++++++++++++++++------------------ library/ttk/aquaTheme.tcl | 47 ++++----- library/ttk/fonts.tcl | 23 ++++- macosx/Wish.xcode/project.pbxproj | 6 +- macosx/Wish.xcodeproj/project.pbxproj | 6 +- macosx/tkMacOSXWm.c | 16 +-- macosx/ttkMacOSXTheme.c | 6 +- win/makefile.vc | 5 +- 15 files changed, 418 insertions(+), 144 deletions(-) create mode 100644 library/demos/ttkbut.tcl create mode 100644 library/demos/ttkmenu.tcl create mode 100644 library/demos/ttkpane.tcl diff --git a/ChangeLog b/ChangeLog index bd003a6..fb55f3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,42 @@ +2007-10-18 Donal K. Fellows + + * library/demos/ttkmenu.tcl: Added more demos of Ttk widgets. These + * library/demos/ttkpane.tcl: ones are of menubuttons, panedwindows and + a progress bar (indirectly). + +2007-10-18 Pat Thoyts + + * library/ttk/fonts.tcl: Create all the tip 145 font names on all + platforms (mac and unix get handled in script, windows in C) + +2007-10-17 David Gravereaux + + * bitmaps/*.xbm: Changed CVS storage mode from -kb to -kkv as these + are really text files, not binaries. + * win/makefile.vc: Added $(BITMAPDIR) to the search path for the + depend target. + +2007-10-18 Daniel Steffen + + * library/demos/widget: Aqua GOOBE, cleanup icons. + * library/demos/ttkbut.tcl: + * library/demos/entry3.tcl: + * library/demos/msgbox.tcl: + + * library/demos/button.tcl: restore setting of button + highlightbackground on Aqua. + + * macosx/ttkMacOSXTheme.c: adjust button and separator geometry. + + * macosx/tkMacOSXWm.c: fix warnings. + + * macosx/Wish.xcodeproj/project.pbxproj: add new demo files. + * macosx/Wish.xcode/project.pbxproj: + +2007-10-17 Donal K. Fellows + + * library/demos/ttkbut.tcl: Added demo of the basic Ttk widgets. + 2007-10-16 David Gravereaux * win/makefile.vc: depend target now works and builds a generated diff --git a/library/demos/button.tcl b/library/demos/button.tcl index 92e3eff..f9ceab8 100644 --- a/library/demos/button.tcl +++ b/library/demos/button.tcl @@ -3,7 +3,7 @@ # This demonstration script creates a toplevel window containing # several button widgets. # -# RCS: @(#) $Id: button.tcl,v 1.4.2.2 2007/10/16 04:03:53 dgp Exp $ +# RCS: @(#) $Id: button.tcl,v 1.4.2.3 2007/10/19 14:35:33 dgp Exp $ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." @@ -26,6 +26,16 @@ pack [addSeeDismiss $w.buttons $w] -side bottom -fill x proc colorrefresh {w col} { $w configure -bg $col + if {[tk windowingsystem] eq "aqua"} { + # set highlightbackground of all buttons in $w + set l [list $w] + while {[llength $l]} { + set l [concat [lassign $l b] [winfo children $b]] + if {[winfo class $b] eq "Button"} { + $b configure -highlightbackground $col + } + } + } } button $w.b1 -text "Peach Puff" -width 10 \ diff --git a/library/demos/entry3.tcl b/library/demos/entry3.tcl index b11e127..95b9418 100644 --- a/library/demos/entry3.tcl +++ b/library/demos/entry3.tcl @@ -4,7 +4,7 @@ # permitted input is constrained in some way. It also shows off a # password entry. # -# RCS: @(#) $Id: entry3.tcl,v 1.4 2004/12/21 11:56:35 dkf Exp $ +# RCS: @(#) $Id: entry3.tcl,v 1.4.2.1 2007/10/19 14:35:33 dgp Exp $ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." @@ -19,7 +19,6 @@ wm title $w "Constrained Entry Demonstration" wm iconname $w "entry3" positionWindow $w - label $w.msg -font $font -wraplength 5i -justify left -text "Four different\ entries are displayed below. You can add characters by pointing,\ clicking and typing, though each is constrained in what it will\ @@ -183,5 +182,4 @@ grid $w.l1 $w.l2 -in $w.mid -padx 3m -pady 1m -sticky ew grid $w.l3 $w.l4 -in $w.mid -padx 3m -pady 1m -sticky ew grid columnconfigure $w.mid {0 1} -uniform 1 pack $w.msg -side top -pack $w.buttons -side bottom -fill x -pady 2m pack $w.mid -fill both -expand 1 diff --git a/library/demos/msgbox.tcl b/library/demos/msgbox.tcl index 92728e3..4852ce1 100644 --- a/library/demos/msgbox.tcl +++ b/library/demos/msgbox.tcl @@ -2,13 +2,14 @@ # # This demonstration script creates message boxes of various type # -# RCS: @(#) $Id: msgbox.tcl,v 1.4 2004/12/21 11:56:35 dkf Exp $ +# RCS: @(#) $Id: msgbox.tcl,v 1.4.2.1 2007/10/19 14:35:33 dgp Exp $ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } package require Tk +package require Ttk set w .msgbox catch {destroy $w} @@ -21,7 +22,7 @@ label $w.msg -font $font -wraplength 4i -justify left -text "Choose the icon and pack $w.msg -side top pack [addSeeDismiss $w.buttons $w {} { - button $w.buttons.vars -text "Message Box" -command "showMessageBox $w" + ttk::button $w.buttons.vars -text "Message Box" -command "showMessageBox $w" }] -side bottom -fill x #pack $w.buttons.dismiss $w.buttons.code $w.buttons.vars -side left -expand 1 diff --git a/library/demos/ttkbut.tcl b/library/demos/ttkbut.tcl new file mode 100644 index 0000000..0ccca75 --- /dev/null +++ b/library/demos/ttkbut.tcl @@ -0,0 +1,58 @@ +# ttkbut.tcl -- +# +# This demonstration script creates a toplevel window containing several +# simple Ttk widgets, such as labels, labelframes, buttons, checkbuttons and +# radiobuttons. +# +# RCS: @(#) $Id: ttkbut.tcl,v 1.2.2.2 2007/10/19 14:35:33 dgp Exp $ + +if {![info exists widgetDemo]} { + error "This script should be run from the \"widget\" demo." +} + +package require Tk +package require Ttk + +set w .ttkbut +catch {destroy $w} +toplevel $w +wm title $w "Simple Ttk Widgets" +wm iconname $w "ttkbut" +positionWindow $w + +ttk::label $w.msg -font $font -wraplength 4i -justify left -text "Ttk is the new Tk themed widget set. This is a Ttk themed label, and below are three groups of Ttk widgets in Ttk labelframes. The first group are all buttons that set the current application theme when pressed. The second group contains checkbuttons, with a separator widget between the first pair and the second. The third group has a collection of linked radiobuttons." +pack $w.msg -side top -fill x + +## See Code / Dismiss +pack [addSeeDismiss $w.seeDismiss $w {cheese tomato basil oregano happyness}]\ + -side bottom -fill x + +ttk::labelframe $w.buttons -text "Buttons" +foreach theme [ttk::themes] { + ttk::button $w.buttons.$theme -text $theme \ + -command [list ttk::setTheme $theme] + pack $w.buttons.$theme -pady 2 +} + +ttk::labelframe $w.checks -text "Checkbuttons" +ttk::checkbutton $w.checks.c1 -text Cheese -variable cheese +ttk::checkbutton $w.checks.c2 -text Tomato -variable tomato +ttk::separator $w.checks.sep +ttk::checkbutton $w.checks.c3 -text Basil -variable basil +ttk::checkbutton $w.checks.c4 -text Oregano -variable oregano +pack $w.checks.c1 $w.checks.c2 $w.checks.sep $w.checks.c3 $w.checks.c4 \ + -fill x -pady 2 + +ttk::labelframe $w.radios -text "Radiobuttons" +ttk::radiobutton $w.radios.r1 -text "Great" -variable happyness -value great +ttk::radiobutton $w.radios.r2 -text "Good" -variable happyness -value good +ttk::radiobutton $w.radios.r3 -text "OK" -variable happyness -value ok +ttk::radiobutton $w.radios.r4 -text "Poor" -variable happyness -value poor +ttk::radiobutton $w.radios.r5 -text "Awful" -variable happyness -value awful +pack $w.radios.r1 $w.radios.r2 $w.radios.r3 $w.radios.r4 $w.radios.r5 \ + -fill x -padx 3 -pady 2 + +pack [ttk::frame $w.f] -fill both -expand 1 +lower $w.f +grid $w.buttons $w.checks $w.radios -in $w.f -sticky nwe -pady 2 -padx 3 +grid columnconfigure $w.f {0 1 2} -weight 1 -uniform yes diff --git a/library/demos/ttkmenu.tcl b/library/demos/ttkmenu.tcl new file mode 100644 index 0000000..0fc8ced --- /dev/null +++ b/library/demos/ttkmenu.tcl @@ -0,0 +1,55 @@ +# ttkmenu.tcl -- +# +# This demonstration script creates a toplevel window containing several Ttk +# menubutton widgets. +# +# RCS: @(#) $Id: ttkmenu.tcl,v 1.1.2.2 2007/10/19 14:35:33 dgp Exp $ + +if {![info exists widgetDemo]} { + error "This script should be run from the \"widget\" demo." +} + +package require Tk +package require Ttk + +set w .ttkmenu +catch {destroy $w} +toplevel $w +wm title $w "Ttk Menu Buttons" +wm iconname $w "ttkmenu" +positionWindow $w + +ttk::label $w.msg -font $font -wraplength 4i -justify left -text "Ttk is the new Tk themed widget set, and one widget that is available in themed form is the menubutton. Below are some themed menu buttons that allow you to pick the current theme in use. Notice how picking a theme changes the way that the menu buttons themselves look, and that the central menu button is styled differently (in a way that is normally suitable for toolbars). However, there are no themed menus; the standard Tk menus were judged to have a sufficiently good look-and-feel on all platforms, especially as they are implemented as native controls in many places." +pack $w.msg [ttk::separator $w.msgSep] -side top -fill x + +## See Code / Dismiss +pack [addSeeDismiss $w.seeDismiss $w] -side bottom -fill x + +ttk::menubutton $w.m1 -menu $w.m1.menu -text "Select a theme" -direction above +ttk::menubutton $w.m2 -menu $w.m1.menu -text "Select a theme" -direction left +ttk::menubutton $w.m3 -menu $w.m1.menu -text "Select a theme" -direction right +ttk::menubutton $w.m4 -menu $w.m1.menu -text "Select a theme" \ + -direction flush -style TMenubutton.Toolbutton +ttk::menubutton $w.m5 -menu $w.m1.menu -text "Select a theme" -direction below + +menu $w.m1.menu -tearoff 0 +menu $w.m2.menu -tearoff 0 +menu $w.m3.menu -tearoff 0 +menu $w.m4.menu -tearoff 0 +menu $w.m5.menu -tearoff 0 + +foreach theme [ttk::themes] { + $w.m1.menu add command -label $theme -command [list ttk::setTheme $theme] + $w.m2.menu add command -label $theme -command [list ttk::setTheme $theme] + $w.m3.menu add command -label $theme -command [list ttk::setTheme $theme] + $w.m4.menu add command -label $theme -command [list ttk::setTheme $theme] + $w.m5.menu add command -label $theme -command [list ttk::setTheme $theme] +} + +pack [ttk::frame $w.f] -fill x +lower $w.f + +grid anchor $w.f center +grid x $w.m1 x -in $w.f -padx 3 -pady 2 +grid $w.m2 $w.m4 $w.m3 -in $w.f -padx 3 -pady 2 +grid x $w.m5 x -in $w.f -padx 3 -pady 2 diff --git a/library/demos/ttkpane.tcl b/library/demos/ttkpane.tcl new file mode 100644 index 0000000..ecbfad8 --- /dev/null +++ b/library/demos/ttkpane.tcl @@ -0,0 +1,95 @@ +# ttkpane.tcl -- +# +# This demonstration script creates a Ttk pane with some content. +# +# RCS: @(#) $Id: ttkpane.tcl,v 1.1.2.2 2007/10/19 14:35:33 dgp Exp $ + +if {![info exists widgetDemo]} { + error "This script should be run from the \"widget\" demo." +} + +package require Tk +package require Ttk + +set w .ttkpane +catch {destroy $w} +toplevel $w +wm title $w "Ttk Menu Buttons" +wm iconname $w "ttkpane" +positionWindow $w + +ttk::label $w.msg -font $font -wraplength 4i -justify left -text "This demonstration shows off a nested set of themed paned windows. Their sizes can be changed by grabbing the area between each contained pane and dragging the divider." +pack $w.msg [ttk::separator $w.msgSep] -side top -fill x + +## See Code / Dismiss +pack [addSeeDismiss $w.seeDismiss $w] -side bottom -fill x + +ttk::panedwindow $w.outer -orient horizontal +$w.outer add [ttk::panedwindow $w.outer.inLeft -orient vertical] +$w.outer add [ttk::panedwindow $w.outer.inRight -orient vertical] +$w.outer.inLeft add [ttk::labelframe $w.outer.inLeft.top -text Button] +$w.outer.inLeft add [ttk::labelframe $w.outer.inLeft.bot -text Clocks] +$w.outer.inRight add [ttk::labelframe $w.outer.inRight.top -text Progress] +$w.outer.inRight add [ttk::labelframe $w.outer.inRight.bot -text Text] + +# Fill the button pane +ttk::button $w.outer.inLeft.top.b -text "Press Me" -command { + tk_messageBox -type ok -icon info -message "Ouch!" -detail "That hurt..." \ + -parent .ttkpane -title "Button Pressed" +} +pack $w.outer.inLeft.top.b -padx 2 -pady 5 + +# Fill the clocks pane +set i 0 +proc every {delay script} { + uplevel #0 $script + after $delay [list every $delay $script] +} +set zones { + :Europe/Berlin + :America/Argentina/Buenos_Aires + :Africa/Johannesburg + :Europe/London + :America/Los_Angeles + :Europe/Moscow + :America/New_York + :Asia/Singapore + :Australia/Sydney + :Asia/Tokyo +} +# Force a pre-load of all the timezones needed; otherwise can end up +# poor-looking synch problems! +foreach zone $zones {clock format 0 -timezone $zone} +foreach zone $zones { + set city [string map {_ " "} [regexp -inline {[^/]+$} $zone]] + if {$i} { + pack [ttk::separator $w.outer.inLeft.bot.s$i] -fill x + } + ttk::label $w.outer.inLeft.bot.l$i -text $city -anchor w + ttk::label $w.outer.inLeft.bot.t$i -textvariable time($zone) -anchor w + pack $w.outer.inLeft.bot.l$i $w.outer.inLeft.bot.t$i -fill x + every 1000 "set time($zone) \[clock format \[clock seconds\] -timezone $zone -format %T\]" + incr i +} + +# Fill the progress pane +ttk::progressbar $w.outer.inRight.top.progress -mode indeterminate +pack $w.outer.inRight.top.progress -fill both -expand 1 +$w.outer.inRight.top.progress start + +# Fill the text pane + +# The trick with the ttk::frame makes the text widget look like it fits with +# the current Ttk theme despite not being a themed widget itself. It is done +# by styling the frame like an entry, turning off the border in the text +# widget, and putting the text widget in the frame with enough space to allow +# the surrounding border to show through (2 pixels seems to be enough). +ttk::frame $w.outer.inRight.bot.f -style TEntry +text $w.txt -wrap word -yscroll "$w.sb set" -width 30 -borderwidth 0 +pack $w.txt -fill both -expand 1 -in $w.outer.inRight.bot.f -pady 2 -padx 2 + +ttk::scrollbar $w.sb -orient vertical -command "$w.txt yview" +pack $w.sb -side right -fill y -in $w.outer.inRight.bot +pack $w.outer.inRight.bot.f -fill both -expand 1 + +pack $w.outer -fill both -expand 1 diff --git a/library/demos/widget b/library/demos/widget index b39cb49..2c1610c 100644 --- a/library/demos/widget +++ b/library/demos/widget @@ -10,7 +10,7 @@ exec wish "$0" "$@" # separate ".tcl" files is this directory, which are sourced by this script as # needed. # -# RCS: @(#) $Id: widget,v 1.29.2.3 2007/10/17 14:37:05 dgp Exp $ +# RCS: @(#) $Id: widget,v 1.29.2.4 2007/10/19 14:35:33 dgp Exp $ package require Tcl 8.5 package require Tk 8.5 @@ -58,95 +58,37 @@ if {"defaultFont" ni [font names]} { set widgetDemo 1 set font mainFont -image create photo ::img::refresh -height 16 -format GIF -data { - R0lGODlhEAAQAPMAAMz/zCpnKdb/1z9mPypbKBtLGy9NMPL/9Or+6+P+4j1Y - PwQKBP7//xMLFAYBCAEBASH5BAEAAAAALAAAAAAQABAAAwR0EAD3Gn0Vyw0e - ++CncU7IIAezMA/nhUqSLJizvSdCEEjy2ZIV46AwDAoDHwPYGSoEiUJAAGJ6 - EDHBNCFINW5OqABKSFk/B9lUa94IDwIFgewFMwQDQwCZQCztTgM9Sl8SOEMG - KSAthiaOjBMPDhQONBiXABEAOw== +image create photo ::img::refresh -format GIF -data { + R0lGODlhEAAQAJEDAP///wAAACpnKv///yH5BAEAAAMALAAAAAAQABAAAAI63IKp + xgcPH2ouwgBCw1HIxHCQ4F3hSJKmwZXqWrmWxj7lKJ2dndcon9EBUq+gz3brVXAR + 2tICU0gXBQA7 } -image create photo ::img::view -height 16 -format GIF -data { - R0lGODlhEAAQAPMAAMz/zP///8DAwICAgH9/fwAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAwRIcMhJB7h3hM33 - KFjWdQQYap1QrCaGBmrRrS4nj5b53jOgbwXBKGACoYLDIuAoHCmZyYvR1rT5 - RMAq8LqcIYGsrjPsW1XOmFUEADs= +image create photo ::img::view -format GIF -data { + R0lGODlhEAAQAKIHAP///wwMDAAAAMDAwNnZ2SYmJmZmZv///yH5BAEAAAcALAAA + AAAQABAAAANMKLos90+ASamDRxJCgw9YVnlDOXiQBgRDBRgHKE6sW8QR3doPKK27 + yg33q/GIOhdg6OsEJzeZykiBSUcs06e56Xx6np8ScIkFGuhQAgA7 } -image create photo ::img::delete -height 16 -format GIF -data { - R0lGODlhEAAOAKEAAIQAAO/n3v///////yH5BAEKAAIALAAAAAAQAA4AAAIm - lI9pAKHbIHNoVhYhTdjlJ2AWKG2g+CldmB6rxo2uybYhbS80eRQAOw== +image create photo ::img::delete -format GIF -data { + R0lGODlhEAAQAIABAIQAAP///yH5BAEAAAEALAAAAAAQABAAAAIjjI+pmwAc3HGy + PUSvqYpuvWQg40FfSVacBa5nN6JYDI3mzRQAOw== } -image create photo ::img::print -height 19 -format GIF -data { - R0lGODlhGgATAPcAACEQOTEpQjEpUkIpc0IxY0I5c0oxjEo5SlJCY1JCe1JK - UlpChFpCjFpGkFpSc1paa2NKc2NKnGNja2tapWtjc29KnHNanHNjc3NjrXNr - jHNrnHNzc3tjpXtrtXtzhICAgIRzvYSEjIZzqox7tYyEnIyMjJSEtZSEvZSM - lJyMtZyMvZyUlJyUrZyUvZycnKWctaWlpa2czq2lzrWtvbWtzrW1tb21xr21 - 1sa9zs693s7OztbO3tbO597W1t7W7+fe7+fn5////+/n7+/v7+/v9////wAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAACH5BAEAAEEALAAAAAAaABMAQAj/AIMIHBhkg0GC - CBMGIQEiQgseQT4oeCBBAokgRYYQ0JBixg8hRIiUUEBBYYmTByBwiCBCRYwH - CxY8cKFw4AogRXLqLAJkQ80gCBBg3BkxZswTNGh4MGqgQQUMJRHCwMkTSE+D - Pn8eCKBhxIMhO3ei2OHDBw6sWSlMMMoWgwwfMDZI8GBjx44NARZwEGGi5MkS - PcIWKRGz5YgLbAco+KkQBQoJIRgjdGEVq+SaJajqtNrzMgsPCmoIzqmDgmWE - KOBuUKAAwYabYTfs4OHjY0giGyhk4MAWRI4eKyRQqPgggYUXPH4A+XBAgwoK - DiIsCFxjA9sFEVQQCRJCAYAFDJxiKhAxvMTonEFimrhhYinTBgWiCvxLNX3M - DkkpsKV5OYhjBxCMYAICAigUEAA7 +image create photo ::img::print -format GIF -data { + R0lGODlhEAAQALMKAAAAAP///52VunNkl8C82Yl+qldBgq+pyrOzs1fYAP///wAA + AAAAAAAAAAAAAAAAACH5BAEAAAoALAAAAAAQABAAAARGUMlJKwU4AztB+ODGeUiJ + fGLlgeEYmGWQXmx7aXgmAUTv/74N4EAsGhOJg1DAbDqbwoJ0Sp0KB9isNis0eL/g + ryhH5pgnEQA7 } image create photo ::img::new -format GIF -data { - R0lGODlhHgAOAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/ - AP//AAAA//8A/wD//////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBmAABmMwBmZgBm - mQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/ - AAD/MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMz - mTMzzDMz/zNmADNmMzNmZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPM - ADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/mTP/zDP//2YAAGYAM2YAZmYA - mWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZmzGZm/2aZ - AGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/ - mWb/zGb//5kAAJkAM5kAZpkAmZkAzJkA/5kzAJkzM5kzZpkzmZkzzJkz/5lm - AJlmM5lmZplmmZlmzJlm/5mZAJmZM5mZZpmZmZmZzJmZ/5nMAJnMM5nMZpnM - mZnMzJnM/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwAM8wAZswAmcwAzMwA/8wz - AMwzM8wzZswzmcwzzMwz/8xmAMxmM8xmZsxmmcxmzMxm/8yZAMyZM8yZZsyZ - mcyZzMyZ/8zMAMzMM8zMZszMmczMzMzM/8z/AMz/M8z/Zsz/mcz/zMz///8A - AP8AM/8AZv8Amf8AzP8A//8zAP8zM/8zZv8zmf8zzP8z//9mAP9mM/9mZv9m - mf9mzP9m//+ZAP+ZM/+ZZv+Zmf+ZzP+Z///MAP/MM//MZv/Mmf/MzP/M//// - AP//M///Zv//mf//zP///yH5BAEAABAALAAAAAAeAA4AAAiWAMMJFPhvYEGC - /xIeDLdw4UCC+gr+i8hQn0WLEilOdAiRW0R9HidyGznyY0iQFA2CROGRG8uV - KGK+dNnyZUOYI2eyJGmR5sqQKl3u1FnSJNGUFWmy1BnzJM2cQDsu9fk0osip - NoMOPYrx51SkV3MS5enV502qTGV6LIu0o0mTJEOKRMkRYsaMF1NubPuQoUGD - Ch0q7BsQADs= + R0lGODlhHgAOALMPALMAANyIiOu7u8dEROaqqvru7sxVVeGZmbgREfXd3b0iItZ3 + d8IzM9FmZvDMzP///yH5BAEAAA8ALAAAAAAeAA4AAASa8MlJq7046827WVOCHEkw + nANhUgJlEBIABJIwL3K+4IcUALCHjfbItYZDSgJgkBiYPmBMAUAkkLPKs/BAyLgM + wAQwOAAY2ByCaw4QAFQSoDEePJ6DmU1xInYZTw5nOEFFdgVUelkVDTIMd3AKFGQ1 + MgI2AwEmQW8APZ0gdRONAks5nhIFVVxdAAkUAS2pAVwFl7ITB4UqHb0XEQA7 } -apply {{} { - # Fix the 'new' image's lack of transparency using a "once only" procedure - # (really a lambda application...) - # TODO: rework the image to have the transparent bit set - set i ::img::new - set t "255 0 255" - set w [image width $i] - set h [image height $i] - - for {set x 0} {$x < $w} {incr x} { - for {set y 0} {$y < $h} {incr y} { - if {[$i get $x $y] eq $t} { - $i trans set $x $y 1 - } - } - } -}} #---------------------------------------------------------------- # The code below create the main window, consisting of a menu bar and a text @@ -179,9 +121,15 @@ if {[tk windowingsystem] eq "aqua"} { ttk::frame .statusBar ttk::label .statusBar.lab -text " " -anchor w -ttk::sizegrip .statusBar.foo +if {[tk windowingsystem] eq "aqua"} { + ttk::separator .statusBar.sep + pack .statusBar.sep -side top -expand yes -fill x -pady 0 +} pack .statusBar.lab -side left -padx 2 -expand yes -fill both -pack .statusBar.foo -side left -padx 2 +if {[tk windowingsystem] ne "aqua"} { + ttk::sizegrip .statusBar.foo + pack .statusBar.foo -side left -padx 2 +} pack .statusBar -side bottom -fill x -pady 2 ttk::frame .textFrame @@ -192,13 +140,24 @@ text .t -yscrollcommand {.s set} -wrap word -width 70 -height 30 \ -font mainFont -setgrid 1 -highlightthickness 0 \ -padx 4 -pady 2 -takefocus 0 -bd 1 pack .t -in .textFrame -expand y -fill both -padx 1 -pack .textFrame -expand yes -fill both +pack .textFrame -expand yes -fill both +if {[tk windowingsystem] eq "aqua"} { + pack configure .statusBar.lab -padx {10 18} -pady {4 6} + pack configure .statusBar -pady 0 + .s configure -bd 0 + .t configure -padx 10 -pady 0 -bd 0 +} # Create a bunch of tags to use in the text widget, such as those for section # titles and demo descriptions. Also define the bindings for tags. .t tag configure title -font titleFont +.t tag configure subtitle -font titleFont .t tag configure bold -font boldFont +if {[tk windowingsystem] eq "aqua"} { + .t tag configure title -spacing1 8 + .t tag configure subtitle -spacing3 3 +} # We put some "space" characters to the left and right of each demo # description so that the descriptions are highlighted only when the mouse @@ -207,7 +166,6 @@ pack .textFrame -expand yes -fill both # .t tag configure demospace -lmargin1 1c -lmargin2 1c - if {[winfo depth .] == 1} { .t tag configure demo -lmargin1 1c -lmargin2 1c \ -underline 1 @@ -285,7 +243,7 @@ proc addFormattedText {formattedText} { set isNL 1 } subtitle { - .t insert end "\n" {} [mc $values] title " \n " demospace + .t insert end "\n" {} [mc $values] subtitle " \n " demospace set demoCount 0 } demo { @@ -293,7 +251,7 @@ proc addFormattedText {formattedText} { .t insert end "[incr demoCount]. [mc $description]." \ [list demo demo-$name] if {$new} { - .t image create end -image ::img::new + .t image create end -image ::img::new -padx 5 set new 0 } .t insert end " \n " demospace @@ -346,6 +304,8 @@ addFormattedText { @@demo image1 Two labels displaying images @@demo image2 A simple user interface for viewing images @@demo labelframe Labelled frames + @@new + @@demo ttkbut The simple Themed Tk widgets @@subtitle Listboxes @@demo states The 50 states @@ -384,10 +344,14 @@ addFormattedText { @@subtitle Paned Windows @@demo paned1 Horizontal paned window @@demo paned2 Vertical paned window + @@new + @@demo ttkpane Themed nested panes @@subtitle Menus @@demo menu Menus and cascades (sub-menus) @@demo menubu Menu-buttons + @@new + @@demo ttkmenu Themed menu buttons @@subtitle Common Dialogs @@demo msgbox Message boxes @@ -445,6 +409,13 @@ proc addSeeDismiss {w show {vars {}} {extra {}}} { } grid {*}$buttons -padx 4 -pady 4 grid columnconfigure $w 0 -weight 1 + if {[tk windowingsystem] eq "aqua"} { + foreach b [lrange $buttons 1 end] {$b configure -takefocus 0} + grid configure $w.sep -pady 0 + grid configure {*}$buttons -pady {10 12} + grid configure [lindex $buttons 1] -padx {16 4} + grid configure [lindex $buttons end] -padx {4 18} + } return $w } @@ -472,21 +443,30 @@ proc showVars {w args} { toplevel $w wm title $w [mc "Variable values"] - set f [ttk::labelframe $w.title -text [mc "Variable values:"]] + set b [ttk::frame $w.frame] + grid $b -sticky news + set f [ttk::labelframe $b.title -text [mc "Variable values:"]] foreach var $args { ttk::label $f.n$var -text "$var:" -anchor w ttk::label $f.v$var -textvariable $var -anchor w grid $f.n$var $f.v$var -padx 2 -pady 2 -sticky w } - ttk::button $w.ok -width 8 -text [mc "OK"] \ + ttk::button $b.ok -width 8 -text [mc "OK"] \ -command [list destroy $w] -default active - bind $w [list $w.ok invoke] - bind $w [list $w.ok invoke] + bind $w [list $b.ok invoke] + bind $w [list $b.ok invoke] grid $f -sticky news -padx 4 - grid $w.ok -sticky e -padx 4 -pady {6 4} + grid $b.ok -sticky e -padx 4 -pady {6 4} + if {[tk windowingsystem] eq "aqua"} { + $b.ok configure -takefocus 0 + grid configure $b.ok -pady {10 12} -padx {16 18} + grid configure $f -padx 10 -pady {10 0} + } grid columnconfig $f 1 -weight 1 grid rowconfigure $f 100 -weight 1 + grid columnconfig $b 0 -weight 1 + grid rowconfigure $b 0 -weight 1 grid columnconfig $w 0 -weight 1 grid rowconfigure $w 0 -weight 1 } @@ -572,14 +552,18 @@ proc showCode w { -highlightthickness 0 -orient horizontal -bd 1 scrollbar $t.yscroll -command [list $t.text yview] \ -highlightthickness 0 -orient vertical -bd 1 + if {[tk windowingsystem] eq "aqua"} { + foreach i [list $t.text $t.xscroll $t.yscroll] {$i configure -bd 0} + } grid $t.text $t.yscroll -sticky news #grid $t.xscroll grid rowconfigure $t 0 -weight 1 grid columnconfig $t 0 -weight 1 - set btns [frame $top.btns] - + set btns [ttk::frame $top.btns] + ttk::separator $btns.sep + grid $btns.sep -columnspan 4 -row 0 -sticky ew -pady 2 ttk::button $btns.dismiss -text [mc "Dismiss"] \ -default active -command [list destroy $top] \ -image ::img::delete -compound left @@ -589,10 +573,16 @@ proc showCode w { ttk::button $btns.rerun -text [mc "Rerun Demo"] \ -command [list evalShowCode $text] \ -image ::img::refresh -compound left - - grid x $btns.rerun $btns.print $btns.dismiss -padx 4 -pady {6 4} + set buttons [list x $btns.rerun $btns.print $btns.dismiss] + grid {*}$buttons -padx 4 -pady 4 grid columnconfigure $btns 0 -weight 1 - + if {[tk windowingsystem] eq "aqua"} { + foreach b [lrange $buttons 1 end] {$b configure -takefocus 0} + grid configure $btns.sep -pady 0 + grid configure {*}$buttons -pady {10 12} + grid configure [lindex $buttons 1] -padx {16 4} + grid configure [lindex $buttons end] -padx {4 18} + } grid $t -sticky news grid $btns -sticky ew grid rowconfigure $top 0 -weight 1 @@ -710,7 +700,8 @@ proc aboutBox {} { [mc {Copyright (c) %s} {1996-1997 Sun Microsystems, Inc.}] [mc {Copyright (c) %s} {1997-2000 Ajuba Solutions, Inc.}] -[mc {Copyright (c) %s} {2001-2007 Donal K. Fellows}]" +[mc {Copyright (c) %s} {2001-2007 Donal K. Fellows}] +[mc {Copyright (c) %s} {2002-2007 Daniel A. Steffen}]" } # Local Variables: diff --git a/library/ttk/aquaTheme.tcl b/library/ttk/aquaTheme.tcl index 82df01d..e6659ff 100644 --- a/library/ttk/aquaTheme.tcl +++ b/library/ttk/aquaTheme.tcl @@ -1,17 +1,13 @@ # -# $Id: aquaTheme.tcl,v 1.2.2.1 2007/07/07 21:12:10 dgp Exp $ +# $Id: aquaTheme.tcl,v 1.2.2.2 2007/10/19 14:35:33 dgp Exp $ # -# Ttk widget set: Aqua theme (OSX native look and feel) +# Aqua theme (OSX native look and feel) # -# -# TODO: panedwindow sashes should be 9 pixels (HIG:Controls:Split Views) -# - -namespace eval ttk { - style theme settings aqua { +namespace eval ttk::theme::aqua { + ttk::style theme settings aqua { - style configure . \ + ttk::style configure . \ -font System \ -background White \ -foreground Black \ @@ -20,7 +16,7 @@ namespace eval ttk { -selectborderwidth 0 \ -insertwidth 1 \ ; - style map . \ + ttk::style map . \ -foreground [list disabled "#a3a3a3" background "#a3a3a3"] \ -selectbackground [list background "#c3c3c3" !focus "#c3c3c3"] \ -selectforeground [list background "#a3a3a3" !focus "#000000"] \ @@ -30,33 +26,33 @@ namespace eval ttk { # Actually, on Aqua we probably shouldn't stipple images in # disabled buttons even if it did work... # - style configure . -stipple {} + ttk::style configure . -stipple {} - style configure TButton -padding {0 2} -width -6 - style configure TMenubutton -anchor w - style configure Toolbutton -padding 4 + ttk::style configure TButton -padding {0 2} -width -6 + ttk::style configure TMenubutton -anchor w + ttk::style configure Toolbutton -padding 4 # See Apple HIG figs 14-63, 14-65 - style configure TNotebook -tabposition n -padding {20 12} - style configure TNotebook.Tab -padding {10 2 10 2} + ttk::style configure TNotebook -tabposition n -padding {20 12} + ttk::style configure TNotebook.Tab -padding {10 2 10 2} # Treeview: - style configure Treeview -rowheight 18 - style configure Heading -font TkHeadingFont - style map Row -background [list \ + ttk::style configure Treeview -rowheight 18 + ttk::style configure Heading -font TkHeadingFont + ttk::style map Row -background [list \ {selected background} "#c3c3c3" selected SystemHighlight] ; - style map Cell -foreground [list \ + ttk::style map Cell -foreground [list \ {selected background} "#000000" selected SystemHighlightText] ; - style map Item -foreground [list \ + ttk::style map Item -foreground [list \ {selected background} "#000000" selected SystemHighlightText] ; # Enable animation for ttk::progressbar widget: - style configure TProgressbar -period 100 -maxphase 255 + ttk::style configure TProgressbar -period 100 -maxphase 255 # Modify the the default Labelframe layout to use generic text element # instead of Labelframe.text; the latter erases the window background # (@@@ this still isn't right... want to fill with background pattern) - style layout TLabelframe { + ttk::style layout TLabelframe { Labelframe.border text } @@ -65,8 +61,9 @@ namespace eval ttk { # with a 14 pixel inset and 4 pixels spacing between border and label # (ref: Apple Human Interface Guidelines / Controls / Grouping Controls) # - style configure TLabelframe \ - -labeloutside true -labelmargins {14 0 14 4} + ttk::style configure TLabelframe \ + -labeloutside true -labelmargins {14 0 14 4} + # TODO: panedwindow sashes should be 9 pixels (HIG:Controls:Split Views) } } diff --git a/library/ttk/fonts.tcl b/library/ttk/fonts.tcl index 8cb6c33..8aa898d 100644 --- a/library/ttk/fonts.tcl +++ b/library/ttk/fonts.tcl @@ -1,5 +1,5 @@ # -# $Id: fonts.tcl,v 1.4 2007/05/04 21:29:22 patthoyts Exp $ +# $Id: fonts.tcl,v 1.4.2.1 2007/10/19 14:35:33 dgp Exp $ # # Font specifications. # @@ -81,6 +81,10 @@ catch {font create TkTextFont} catch {font create TkHeadingFont} catch {font create TkCaptionFont} catch {font create TkTooltipFont} +catch {font create TkFixedFont} +catch {font create TkIconFont} +catch {font create TkMenuFont} +catch {font create TkSmallCaptionFont} variable F ;# miscellaneous platform-specific font parameters switch -- [tk windowingsystem] { @@ -108,13 +112,19 @@ switch -- [tk windowingsystem] { font configure TkCaptionFont -family $F(family) -size $F(size) \ -weight bold font configure TkTooltipFont -family $F(family) -size $F(size) + font configure TkFixedFont -family Courier -size 10 + font configure TkIconFont -family $F(family) -size $F(size) + font configure TkMenuFont -family $F(family) -size $F(size) + font configure TkSmallCaptionFont -family $F(family) -size $F(size) } } aqua { set F(family) "Lucida Grande" + set F(fixed) "Monaco" set F(size) 13 set F(viewsize) 12 set F(smallsize) 11 + set F(fixedsize) 9 font configure TkDefaultFont -family $F(family) -size $F(size) font configure TkTextFont -family $F(family) -size $F(size) @@ -122,17 +132,24 @@ switch -- [tk windowingsystem] { font configure TkCaptionFont -family $F(family) -size $F(size) \ -weight bold font configure TkTooltipFont -family $F(family) -size $F(viewsize) + font configure TkFixedFont -family $F(fixed) -size $F(fixedsize) + font configure TkIconFont -family $F(family) -size $F(size) + font configure TkMenuFont -family $F(family) -size $F(size) + font configure TkSmallCaptionFont -family $F(family) -size $F(fixedsize) } default - x11 { if {![catch {tk::pkgconfig get fontsystem} F(fs)] && $F(fs) eq "xft"} { set F(family) "sans-serif" + set F(fixed) "monospace" } else { set F(family) "Helvetica" + set F(fixed) "courier" } set F(size) -12 set F(ttsize) -10 set F(capsize) -14 + set F(fixedsize) -10 font configure TkDefaultFont -family $F(family) -size $F(size) font configure TkTextFont -family $F(family) -size $F(size) @@ -141,6 +158,10 @@ switch -- [tk windowingsystem] { font configure TkCaptionFont -family $F(family) -size $F(capsize) \ -weight bold font configure TkTooltipFont -family $F(family) -size $F(ttsize) + font configure TkFixedFont -family $F(fixed) -size $F(fixedsize) + font configure TkIconFont -family $F(family) -size $F(size) + font configure TkMenuFont -family $F(family) -size $F(size) + font configure TkSmallCaptionFont -family $F(family) -size $F(ttsize) } } unset -nocomplain F diff --git a/macosx/Wish.xcode/project.pbxproj b/macosx/Wish.xcode/project.pbxproj index ec9d216..6f51c88 100644 --- a/macosx/Wish.xcode/project.pbxproj +++ b/macosx/Wish.xcode/project.pbxproj @@ -595,6 +595,8 @@ /* Begin PBXFileReference section */ 8DD76FB20486AB0100D96B5E /* tktest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = tktest; sourceTree = BUILT_PRODUCTS_DIR; }; + F9099B8A0CC67D30005A9580 /* textpeer.tcl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = textpeer.tcl; sourceTree = ""; }; + F9099B8B0CC67D3E005A9580 /* ttkbut.tcl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ttkbut.tcl; sourceTree = ""; }; F91E62260C1AE686006C9D96 /* Tclsh-Info.plist.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Tclsh-Info.plist.in"; sourceTree = ""; }; F93E5EFD09CF8711008FA367 /* tkMacOSXFont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkMacOSXFont.h; sourceTree = ""; }; F95FAFF90B34F1130072E431 /* macOSXLoad.test */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = macOSXLoad.test; sourceTree = ""; }; @@ -2082,7 +2084,7 @@ F966C06F08F281DC005CB29B /* Frameworks */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); - comments = "Copyright (c) 2004-2007 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.13.2.3 2007/10/15 18:38:37 dgp Exp $\n"; + comments = "Copyright (c) 2004-2007 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.13.2.4 2007/10/19 14:35:34 dgp Exp $\n"; name = Wish; path = .; sourceTree = SOURCE_ROOT; @@ -2499,7 +2501,9 @@ F966BB5A08F27A3A005CB29B /* tclIndex */, F966BB5B08F27A3A005CB29B /* tcolor */, F966BB5C08F27A3A005CB29B /* text.tcl */, + F9099B8A0CC67D30005A9580 /* textpeer.tcl */, F966BB5D08F27A3A005CB29B /* timer */, + F9099B8B0CC67D3E005A9580 /* ttkbut.tcl */, F966BB5E08F27A3A005CB29B /* twind.tcl */, F966BB5F08F27A3A005CB29B /* unicodeout.tcl */, F966BB6008F27A3A005CB29B /* vscale.tcl */, diff --git a/macosx/Wish.xcodeproj/project.pbxproj b/macosx/Wish.xcodeproj/project.pbxproj index 5e7b397..b95b563 100644 --- a/macosx/Wish.xcodeproj/project.pbxproj +++ b/macosx/Wish.xcodeproj/project.pbxproj @@ -597,6 +597,8 @@ /* Begin PBXFileReference section */ 8DD76FB20486AB0100D96B5E /* tktest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = tktest; sourceTree = BUILT_PRODUCTS_DIR; }; + F9099B8A0CC67D30005A9580 /* textpeer.tcl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = textpeer.tcl; sourceTree = ""; }; + F9099B8B0CC67D3E005A9580 /* ttkbut.tcl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ttkbut.tcl; sourceTree = ""; }; F91E62260C1AE686006C9D96 /* Tclsh-Info.plist.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Tclsh-Info.plist.in"; sourceTree = ""; }; F93E5EFD09CF8711008FA367 /* tkMacOSXFont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkMacOSXFont.h; sourceTree = ""; }; F95FAFF90B34F1130072E431 /* macOSXLoad.test */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = macOSXLoad.test; sourceTree = ""; }; @@ -2085,7 +2087,7 @@ F966C06F08F281DC005CB29B /* Frameworks */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); - comments = "Copyright (c) 2004-2007 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.21.2.7 2007/10/15 18:38:39 dgp Exp $\n"; + comments = "Copyright (c) 2004-2007 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.21.2.8 2007/10/19 14:35:34 dgp Exp $\n"; name = Wish; path = .; sourceTree = SOURCE_ROOT; @@ -2502,7 +2504,9 @@ F966BB5A08F27A3A005CB29B /* tclIndex */, F966BB5B08F27A3A005CB29B /* tcolor */, F966BB5C08F27A3A005CB29B /* text.tcl */, + F9099B8A0CC67D30005A9580 /* textpeer.tcl */, F966BB5D08F27A3A005CB29B /* timer */, + F9099B8B0CC67D3E005A9580 /* ttkbut.tcl */, F966BB5E08F27A3A005CB29B /* twind.tcl */, F966BB5F08F27A3A005CB29B /* unicodeout.tcl */, F966BB6008F27A3A005CB29B /* vscale.tcl */, diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index b7a2789..0f06464 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXWm.c,v 1.49.2.8 2007/10/16 04:03:54 dgp Exp $ + * RCS: @(#) $Id: tkMacOSXWm.c,v 1.49.2.9 2007/10/19 14:35:33 dgp Exp $ */ #include "tkMacOSXPrivate.h" @@ -1377,13 +1377,13 @@ WmForgetCmd(tkwin, winPtr, interp, objc, objv) int objc; /* Number of arguments. */ Tcl_Obj *CONST objv[]; /* Argument objects. */ { - register Tk_Window frameWin = (Tk_Window)winPtr; - char *oldClass = (char*)Tk_Class(frameWin); - #if 1 Tcl_AppendResult(interp, "wm forget is not yet supported", (char*)NULL); return TCL_ERROR; #else + register Tk_Window frameWin = (Tk_Window)winPtr; + char *oldClass = (char*)Tk_Class(frameWin); + if (Tk_IsTopLevel(frameWin)) { MacDrawable *macWin = (MacDrawable *) winPtr->window; CGrafPtr destPort = TkMacOSXGetDrawablePort(winPtr->window); @@ -2131,14 +2131,14 @@ WmManageCmd( int objc, /* Number of arguments. */ Tcl_Obj *CONST objv[]) /* Argument objects. */ { - register Tk_Window frameWin = (Tk_Window)winPtr; - register WmInfo *wmPtr = winPtr->wmInfoPtr; - char *oldClass = (char*)Tk_Class(frameWin); - #if 1 Tcl_AppendResult(interp, "wm manage is not yet supported", (char*)NULL); return TCL_ERROR; #else + register Tk_Window frameWin = (Tk_Window)winPtr; + register WmInfo *wmPtr = winPtr->wmInfoPtr; + char *oldClass = (char*)Tk_Class(frameWin); + if (!Tk_IsTopLevel(frameWin)) { MacDrawable *macWin = (MacDrawable *) winPtr->window; diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index 2195265..cf1672b 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -27,7 +27,7 @@ * top-level window, not to the Tk_Window. BoxToRect() * accounts for this. * - * RCS: @(#) $Id: ttkMacOSXTheme.c,v 1.7.2.2 2007/10/15 18:38:36 dgp Exp $ + * RCS: @(#) $Id: ttkMacOSXTheme.c,v 1.7.2.3 2007/10/19 14:35:34 dgp Exp $ */ #include "tkMacOSXPrivate.h" @@ -198,7 +198,7 @@ static void ButtonElementGeometry( paddingPtr->left = contentsRect.left; paddingPtr->top = contentsRect.top; paddingPtr->bottom = scratchSize - contentsRect.bottom; - paddingPtr->right = scratchSize - contentsRect.right; + paddingPtr->right = scratchSize - contentsRect.right + 1; /* Now add a little extra padding to account for drop shadows. * @@@ SHOULD: call GetThemeButtonBackgroundBounds() instead. @@ -681,7 +681,7 @@ static void SeparatorElementSize( void *clientData, void *elementRecord, Tk_Window tkwin, int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr) { - *widthPtr = *heightPtr = 2; + *widthPtr = *heightPtr = 1; } static void SeparatorElementDraw( diff --git a/win/makefile.vc b/win/makefile.vc index 279bdbf..561d9ad 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -12,7 +12,7 @@ # Copyright (c) 2001-2004 David Gravereaux. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.103.2.4 2007/10/17 14:37:05 dgp Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.103.2.5 2007/10/19 14:35:35 dgp Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -791,7 +791,8 @@ depend: set TCL_LIBRARY=$(TCL_LIBRARY) $(TCLSH) $(TCLTOOLSDIR)\mkdepend.tcl -vc32 -out:"$(OUT_DIR)\depend.mk" \ -passthru:"-DBUILD_tk $(TK_INCLUDES)" $(GENERICDIR),$$(GENERICDIR) \ - $(WINDIR),$$(WINDIR) $(TTKDIR),$$(TTKDIR) $(XLIBDIR),$$(XLIBDIR) @<< + $(WINDIR),$$(WINDIR) $(TTKDIR),$$(TTKDIR) $(XLIBDIR),$$(XLIBDIR) \ + $(BITMAPDIR),$$(BITMAPDIR) @<< $(TKOBJS) << !endif -- cgit v0.12