diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2009-10-07 19:26:49 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2009-10-07 19:26:49 (GMT) |
commit | a3690d234a09435755b871eef32c8df8971b5476 (patch) | |
tree | 17d288bd23a6eddc27e48e3fff41e4bc777f4728 /library/ttk | |
parent | f3b275a39528e851375932c49160e22acc6135c4 (diff) | |
download | tk-a3690d234a09435755b871eef32c8df8971b5476.zip tk-a3690d234a09435755b871eef32c8df8971b5476.tar.gz tk-a3690d234a09435755b871eef32c8df8971b5476.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 | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/library/ttk/vistaTheme.tcl b/library/ttk/vistaTheme.tcl index 76f3e3e..b96f4a7 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 |