summaryrefslogtreecommitdiffstats
path: root/library/ttk/ttk.tcl
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2009-05-14 00:53:04 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2009-05-14 00:53:04 (GMT)
commitd6ae9ac6b68ade20d79d00780b721ba419701f0b (patch)
treece1858139a85cb202f0ab4ed0983c33143debec5 /library/ttk/ttk.tcl
parenta49b9d01cc58374d6882839ff6e9ca8c14c88c0a (diff)
downloadtk-d6ae9ac6b68ade20d79d00780b721ba419701f0b.zip
tk-d6ae9ac6b68ade20d79d00780b721ba419701f0b.tar.gz
tk-d6ae9ac6b68ade20d79d00780b721ba419701f0b.tar.bz2
Backported support for the Vista theme.
This requires the vsapi element engine, the hover state and the theme script definition.
Diffstat (limited to 'library/ttk/ttk.tcl')
-rw-r--r--library/ttk/ttk.tcl16
1 files changed, 9 insertions, 7 deletions
diff --git a/library/ttk/ttk.tcl b/library/ttk/ttk.tcl
index c4d0ff1..70e5121 100644
--- a/library/ttk/ttk.tcl
+++ b/library/ttk/ttk.tcl
@@ -1,5 +1,5 @@
#
-# $Id: ttk.tcl,v 1.8 2007/12/13 15:27:08 dgp Exp $
+# $Id: ttk.tcl,v 1.8.2.1 2009/05/14 00:53:04 patthoyts Exp $
#
# Ttk widget set initialization script.
#
@@ -123,16 +123,18 @@ proc ttk::LoadThemes {} {
uplevel #0 [list source [file join $library defaults.tcl]]
set builtinThemes [style theme names]
- foreach {theme script} {
+ foreach {theme scripts} {
classic classicTheme.tcl
alt altTheme.tcl
clam clamTheme.tcl
winnative winTheme.tcl
- xpnative xpTheme.tcl
+ xpnative {xpTheme.tcl vistaTheme.tcl}
aqua aquaTheme.tcl
} {
if {[lsearch -exact $builtinThemes $theme] >= 0} {
- uplevel #0 [list source [file join $library $script]]
+ foreach script $scripts {
+ uplevel #0 [list source [file join $library $script]]
+ }
}
}
}
@@ -150,17 +152,17 @@ ttk::LoadThemes; rename ::ttk::LoadThemes {}
#
proc ttk::DefaultTheme {} {
- set preferred [list aqua xpnative winnative]
+ set preferred [list aqua vista xpnative winnative]
set userTheme [option get . tkTheme TkTheme]
- if {$userTheme != {} && ![catch {
+ if {$userTheme ne {} && ![catch {
uplevel #0 [list package require ttk::theme::$userTheme]
}]} {
return $userTheme
}
foreach theme $preferred {
- if {[package provide ttk::theme::$theme] != ""} {
+ if {[package provide ttk::theme::$theme] ne ""} {
return $theme
}
}