diff options
author | patthoyts@users.sourceforge.net <patthoyts> | 2009-05-14 00:53:04 (GMT) |
---|---|---|
committer | patthoyts@users.sourceforge.net <patthoyts> | 2009-05-14 00:53:04 (GMT) |
commit | be55cb971281eaa623b94472612ba433afc3ba75 (patch) | |
tree | ce1858139a85cb202f0ab4ed0983c33143debec5 /library/ttk/ttk.tcl | |
parent | 4f4da9b73560c11696bd82205cc2ad3f42f9d5c7 (diff) | |
download | tk-be55cb971281eaa623b94472612ba433afc3ba75.zip tk-be55cb971281eaa623b94472612ba433afc3ba75.tar.gz tk-be55cb971281eaa623b94472612ba433afc3ba75.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.tcl | 16 |
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 } } |