diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2009-10-07 19:42:41 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2009-10-07 19:42:41 (GMT) |
commit | 15c3f793c7601f371d8fd1c65c0fe763a0560bda (patch) | |
tree | 21a0727c4a955b8455fe24c8e3ca7a544abdc8ea /library/ttk | |
parent | fd8eb7674fdce0f78d84575ffaa855da197abe8c (diff) | |
download | tk-15c3f793c7601f371d8fd1c65c0fe763a0560bda.zip tk-15c3f793c7601f371d8fd1c65c0fe763a0560bda.tar.gz tk-15c3f793c7601f371d8fd1c65c0fe763a0560bda.tar.bz2 |
[Bug 2787164] fix size of dropdown arrow on combobox and menubutton for Windows 7.
Diffstat (limited to 'library/ttk')
-rw-r--r-- | library/ttk/vistaTheme.tcl | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/library/ttk/vistaTheme.tcl b/library/ttk/vistaTheme.tcl index 76f3e3e..107f227 100644 --- a/library/ttk/vistaTheme.tcl +++ b/library/ttk/vistaTheme.tcl @@ -16,6 +16,14 @@ namespace eval ttk::theme::vista { ttk::style theme settings vista { + # We should ask the system for these, but for now... + set SM { + SM_CXVSCROLL 17 SM_CYVSCROLL 0 + SM_CXHSCROLL 0 SM_CYHSCROLL 17 + } + set cx [expr {[dict get $SM SM_CXVSCROLL] / 2}] + set cy [expr {[dict get $SM SM_CYVSCROLL] / 2}] + ttk::style configure . \ -background SystemButtonFace \ -foreground SystemWindowText \ @@ -33,6 +41,11 @@ namespace eval ttk::theme::vista { ttk::style configure TCheckbutton -padding 2 ttk::style configure TMenubutton -padding {8 4} + ttk::style element create Menubutton.dropdown vsapi \ + TOOLBAR 4 {{selected active} 6 {selected !active} 5 + disabled 4 pressed 3 active 2 {} 1} \ + -padding [list $cx $cy] + ttk::style configure TNotebook -tabmargins {2 2 2 0} ttk::style map TNotebook.Tab \ -expand [list selected {2 2 2 2}] @@ -56,7 +69,8 @@ namespace eval ttk::theme::vista { ttk::style element create Combobox.border vsapi \ COMBOBOX 4 {disabled 4 focus 3 active 2 hover 2 {} 1} ttk::style element create Combobox.rightdownarrow vsapi \ - COMBOBOX 6 {disabled 4 pressed 3 active 2 {} 1} + COMBOBOX 6 {disabled 4 pressed 3 active 2 {} 1} \ + -padding [list $cx $cy] ttk::style layout TCombobox { Combobox.border -sticky nswe -border 0 -children { Combobox.rightdownarrow -side right -sticky ns @@ -200,7 +214,8 @@ namespace eval ttk::theme::vista { # Treeview ttk::style configure Item -padding {4 0 0 0} - + + unset -nocomplain cx cy package provide ttk::theme::vista 1.0 } -}
\ No newline at end of file +} |