summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordas <das>2007-10-21 14:51:47 (GMT)
committerdas <das>2007-10-21 14:51:47 (GMT)
commitfcde771f3adc5b6c6c4326d7dbedeb2e27fffa00 (patch)
treef97291f822ee1ba2bfb9f592c960b3c2fa083f8d
parent9482319ee0542df108c62ef319a28f1afbab5937 (diff)
downloadtk-fcde771f3adc5b6c6c4326d7dbedeb2e27fffa00.zip
tk-fcde771f3adc5b6c6c4326d7dbedeb2e27fffa00.tar.gz
tk-fcde771f3adc5b6c6c4326d7dbedeb2e27fffa00.tar.bz2
* library/demos/ttkmenu.tcl: Aqua GOOBE.
* library/demos/ttkpane.tcl: * library/demos/widget:
-rw-r--r--library/demos/ttkmenu.tcl3
-rw-r--r--library/demos/ttkpane.tcl46
-rw-r--r--library/demos/widget5
3 files changed, 36 insertions, 18 deletions
diff --git a/library/demos/ttkmenu.tcl b/library/demos/ttkmenu.tcl
index 6cda290..b0a42ee 100644
--- a/library/demos/ttkmenu.tcl
+++ b/library/demos/ttkmenu.tcl
@@ -3,7 +3,7 @@
# This demonstration script creates a toplevel window containing several Ttk
# menubutton widgets.
#
-# RCS: @(#) $Id: ttkmenu.tcl,v 1.1 2007/10/18 14:34:06 dkf Exp $
+# RCS: @(#) $Id: ttkmenu.tcl,v 1.2 2007/10/21 14:51:47 das Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
@@ -47,6 +47,7 @@ foreach theme [ttk::themes] {
}
pack [ttk::frame $w.f] -fill x
+pack [ttk::frame $w.f1] -fill both -expand yes
lower $w.f
grid anchor $w.f center
diff --git a/library/demos/ttkpane.tcl b/library/demos/ttkpane.tcl
index fc1d74c..ad30a42 100644
--- a/library/demos/ttkpane.tcl
+++ b/library/demos/ttkpane.tcl
@@ -2,7 +2,7 @@
#
# This demonstration script creates a Ttk pane with some content.
#
-# RCS: @(#) $Id: ttkpane.tcl,v 1.1 2007/10/18 14:34:10 dkf Exp $
+# RCS: @(#) $Id: ttkpane.tcl,v 1.2 2007/10/21 14:51:47 das Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
@@ -14,7 +14,7 @@ package require Ttk
set w .ttkpane
catch {destroy $w}
toplevel $w
-wm title $w "Ttk Menu Buttons"
+wm title $w "Themed Nested Panes"
wm iconname $w "ttkpane"
positionWindow $w
@@ -24,6 +24,9 @@ pack $w.msg [ttk::separator $w.msgSep] -side top -fill x
## See Code / Dismiss
pack [addSeeDismiss $w.seeDismiss $w] -side bottom -fill x
+ttk::frame $w.f
+pack $w.f -fill both -expand 1
+set w $w.f
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]
@@ -31,6 +34,11 @@ $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]
+if {[tk windowingsystem] eq "aqua"} {
+ foreach i [list inLeft.top inLeft.bot inRight.top inRight.bot] {
+ $w.outer.$i configure -padding 3
+ }
+}
# Fill the button pane
ttk::button $w.outer.inLeft.top.b -text "Press Me" -command {
@@ -78,18 +86,24 @@ pack $w.outer.inRight.top.progress -fill both -expand 1
$w.outer.inRight.top.progress start
# Fill the text pane
+if {[tk windowingsystem] ne "aqua"} {
+ # 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
+} else {
+ text $w.txt -wrap word -yscroll "$w.sb set" -width 30 -borderwidth 0
+ scrollbar $w.sb -orient vertical -command "$w.txt yview"
+ pack $w.sb -side right -fill y -in $w.outer.inRight.bot
+ pack $w.txt -fill both -expand 1 -in $w.outer.inRight.bot
+ pack $w.outer -fill both -expand 1 -padx 10 -pady {6 10}
+}
-# 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 ff4a0de..994189b 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.37 2007/10/18 14:34:06 dkf Exp $
+# RCS: @(#) $Id: widget,v 1.38 2007/10/21 14:51:47 das Exp $
package require Tcl 8.5
package require Tk 8.5
@@ -45,6 +45,9 @@ if {"defaultFont" ni [font names]} {
font create titleFont {*}[font configure TkDefaultFont] -weight bold
font create statusFont {*}[font configure TkDefaultFont]
font create varsFont {*}[font configure TkDefaultFont]
+ if {[tk windowingsystem] eq "aqua"} {
+ font configure titleFont -size 17
+ }
} else {
font create mainFont -family Helvetica -size 12
font create fixedFont -family Courier -size 10