From 2cef89254b6055b551abf622fe895276984a59ec Mon Sep 17 00:00:00 2001 From: patthoyts Date: Thu, 15 May 2008 23:41:08 +0000 Subject: Add correct border to combobox on Vista --- ChangeLog | 4 ++++ library/ttk/xpTheme.tcl | 25 ++++++++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1495f58..f7cd6a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-05-16 Pat Thoyts + + * library/ttk/xpTheme.tcl: Add correct border to combobox on Vista + 2008-05-15 Pat Thoyts * win/makefile.vc: We should use the thread allocator for threaded diff --git a/library/ttk/xpTheme.tcl b/library/ttk/xpTheme.tcl index a82315b..d85d415 100644 --- a/library/ttk/xpTheme.tcl +++ b/library/ttk/xpTheme.tcl @@ -1,5 +1,5 @@ # -# $Id: xpTheme.tcl,v 1.7 2008/04/03 11:52:42 patthoyts Exp $ +# $Id: xpTheme.tcl,v 1.8 2008/05/15 23:41:08 patthoyts Exp $ # # Settings for 'xpnative' theme # @@ -60,5 +60,28 @@ namespace eval ttk::theme::xpnative { ; ttk::style configure Toolbutton -padding {4 4} + + # Vista requires some style modifications. There are some + # additional or different elements in use. + if {[tk windowingsystem] eq "win32" + && [info exists tcl_platform(osVersion)] + && $tcl_platform(osVersion) >= 6.0} { + + ttk::style element create Combobox.field vsapi \ + COMBOBOX 2 {{} 1} + ttk::style element create Combobox.border vsapi \ + COMBOBOX 4 {disabled 4 focus 3 active 2 {} 1} + ttk::style layout TCombobox { + Combobox.border -sticky nswe -border 0 -children { + Combobox.downarrow -side right -sticky ns + Combobox.padding -expand 1 -sticky nswe -children { + Combobox.focus -expand 1 -sticky nswe -children { + Combobox.textarea -sticky nswe + } + } + } + } + + } } } -- cgit v0.12