summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2009-10-07 19:26:49 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2009-10-07 19:26:49 (GMT)
commita3690d234a09435755b871eef32c8df8971b5476 (patch)
tree17d288bd23a6eddc27e48e3fff41e4bc777f4728
parentf3b275a39528e851375932c49160e22acc6135c4 (diff)
downloadtk-a3690d234a09435755b871eef32c8df8971b5476.zip
tk-a3690d234a09435755b871eef32c8df8971b5476.tar.gz
tk-a3690d234a09435755b871eef32c8df8971b5476.tar.bz2
[Bug 2787164] fix size of dropdown arrow on combobox and menubutton for Windows 7.
-rw-r--r--ChangeLog5
-rw-r--r--library/ttk/vistaTheme.tcl19
2 files changed, 22 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 757a9d7..0846941 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-10-07 Pat Thoyts <patthoyts@users.sourceforge.net>
+
+ * library/ttk/vistaTheme.tcl: [Bug 2787164] fix size of dropdown
+ arrow on combobox and menubutton for Windows 7.
+
2009-10-07 Donal K. Fellows <dkf@users.sf.net>
* unix/tkUnixScrlbr.c (TkpComputeScrollbarGeometry): [Patch 2088597]:
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