diff options
author | jenglish@flightlab.com <jenglish> | 2007-11-18 19:20:24 (GMT) |
---|---|---|
committer | jenglish@flightlab.com <jenglish> | 2007-11-18 19:20:24 (GMT) |
commit | 4dc3c4a19a12f50b33fd012416ee5cb0a32910ac (patch) | |
tree | aadad427b46a83b0e4b696481aba274e50fec32d /library | |
parent | 9e48cf690f65a93411fffba5b7f896d8b60f77d0 (diff) | |
download | tk-4dc3c4a19a12f50b33fd012416ee5cb0a32910ac.zip tk-4dc3c4a19a12f50b33fd012416ee5cb0a32910ac.tar.gz tk-4dc3c4a19a12f50b33fd012416ee5cb0a32910ac.tar.bz2 |
* generic/ttk/ttkFrame.c: Use sublayout for ttk::labelframe labels
instead of single element.
* generic/ttk/ttkLabel.c: Default -anchor for text and label elements
is now "w" instead of "center". Fixes [Bug 1614540].
* library/ttk/defaults.tcl, library/ttk/*Theme.tcl: Button styles
now need explicit "-anchor center".
Diffstat (limited to 'library')
-rw-r--r-- | library/ttk/altTheme.tcl | 7 | ||||
-rw-r--r-- | library/ttk/aquaTheme.tcl | 12 | ||||
-rw-r--r-- | library/ttk/clamTheme.tcl | 10 | ||||
-rw-r--r-- | library/ttk/classicTheme.tcl | 5 | ||||
-rw-r--r-- | library/ttk/defaults.tcl | 7 | ||||
-rw-r--r-- | library/ttk/winTheme.tcl | 7 | ||||
-rw-r--r-- | library/ttk/xpTheme.tcl | 6 |
7 files changed, 28 insertions, 26 deletions
diff --git a/library/ttk/altTheme.tcl b/library/ttk/altTheme.tcl index 62a0607..bee578c 100644 --- a/library/ttk/altTheme.tcl +++ b/library/ttk/altTheme.tcl @@ -1,5 +1,5 @@ # -# $Id: altTheme.tcl,v 1.3 2006/12/18 19:33:14 jenglish Exp $ +# $Id: altTheme.tcl,v 1.4 2007/11/18 19:20:26 jenglish Exp $ # # Ttk widget set: Alternate theme # @@ -35,7 +35,8 @@ namespace eval ttk::theme::alt { style map "." -embossed [list disabled 1] ; style configure TButton \ - -width -11 -padding "1 1" -relief raised -shiftrelief 1 \ + -anchor center -width -11 -padding "1 1" \ + -relief raised -shiftrelief 1 \ -highlightthickness 1 -highlightcolor $colors(-frame) style map TButton -relief { @@ -51,7 +52,7 @@ namespace eval ttk::theme::alt { [list disabled $colors(-frame) pressed $colors(-frame)] style configure TMenubutton \ - -width -11 -padding "3 3" -relief raised -anchor w + -width -11 -padding "3 3" -relief raised style configure TEntry -padding 1 style map TEntry -fieldbackground \ diff --git a/library/ttk/aquaTheme.tcl b/library/ttk/aquaTheme.tcl index e8ece15..bf34746 100644 --- a/library/ttk/aquaTheme.tcl +++ b/library/ttk/aquaTheme.tcl @@ -1,5 +1,5 @@ # -# $Id: aquaTheme.tcl,v 1.8 2007/11/18 17:00:28 jenglish Exp $ +# $Id: aquaTheme.tcl,v 1.9 2007/11/18 19:20:26 jenglish Exp $ # # Aqua theme (OSX native look and feel) # @@ -28,8 +28,7 @@ namespace eval ttk::theme::aqua { # ttk::style configure . -stipple {} - ttk::style configure TButton -width -6 - ttk::style configure TMenubutton -anchor w + ttk::style configure TButton -anchor center -width -6 ttk::style configure Toolbutton -padding 4 # See Apple HIG figs 14-63, 14-65 ttk::style configure TNotebook -tabposition n -padding {20 12} @@ -54,12 +53,9 @@ namespace eval ttk::theme::aqua { # Modify the the default Labelframe layout to use generic text element # instead of Labelframe.text; the latter erases the window background # (@@@ this still isn't right... want to fill with background pattern) - - ttk::style layout TLabelframe { - Labelframe.border - text - } # + ttk::style layout TLabelframe.Label { text } + # For Aqua, labelframe labels should appear outside the border, # with a 14 pixel inset and 4 pixels spacing between border and label # (ref: Apple Human Interface Guidelines / Controls / Grouping Controls) diff --git a/library/ttk/clamTheme.tcl b/library/ttk/clamTheme.tcl index 930ec97..c519eab 100644 --- a/library/ttk/clamTheme.tcl +++ b/library/ttk/clamTheme.tcl @@ -1,5 +1,5 @@ # -# $Id: clamTheme.tcl,v 1.4 2006/12/18 19:33:14 jenglish Exp $ +# $Id: clamTheme.tcl,v 1.5 2007/11/18 19:20:26 jenglish Exp $ # # "Clam" theme. # @@ -45,7 +45,8 @@ namespace eval ttk::theme::clam { ; # -selectbackground [list !focus "#847d73"] - ttk::style configure TButton -width -11 -padding 5 -relief raised + ttk::style configure TButton \ + -anchor center -width -11 -padding 5 -relief raised ttk::style map TButton \ -background [list \ disabled $colors(-frame) \ @@ -56,7 +57,8 @@ namespace eval ttk::theme::clam { -bordercolor [list alternate "#000000"] \ ; - ttk::style configure Toolbutton -padding 2 -relief flat + ttk::style configure Toolbutton \ + -anchor center -padding 2 -relief flat ttk::style map Toolbutton \ -relief [list \ disabled flat \ @@ -85,7 +87,7 @@ namespace eval ttk::theme::clam { [list disabled $colors(-frame) pressed $colors(-frame)] ttk::style configure TMenubutton \ - -width -11 -padding 5 -relief raised -anchor w + -width -11 -padding 5 -relief raised ttk::style configure TEntry -padding 1 -insertwidth 1 ttk::style map TEntry \ diff --git a/library/ttk/classicTheme.tcl b/library/ttk/classicTheme.tcl index 2061b4e..38dc845 100644 --- a/library/ttk/classicTheme.tcl +++ b/library/ttk/classicTheme.tcl @@ -1,5 +1,5 @@ # -# $Id: classicTheme.tcl,v 1.3 2006/12/18 19:33:14 jenglish Exp $ +# $Id: classicTheme.tcl,v 1.4 2007/11/18 19:20:26 jenglish Exp $ # # "classic" Tk theme. # @@ -45,7 +45,8 @@ namespace eval ttk::theme::classic { style map "." -highlightcolor [list focus black] - style configure TButton -padding "3m 1m" -relief raised -shiftrelief 1 + style configure TButton \ + -anchor center -padding "3m 1m" -relief raised -shiftrelief 1 style map TButton -relief [list {!disabled pressed} sunken] style configure TCheckbutton -indicatorrelief raised diff --git a/library/ttk/defaults.tcl b/library/ttk/defaults.tcl index d076d8e..be106b1 100644 --- a/library/ttk/defaults.tcl +++ b/library/ttk/defaults.tcl @@ -1,5 +1,5 @@ # -# $Id: defaults.tcl,v 1.4 2006/12/18 19:33:14 jenglish Exp $ +# $Id: defaults.tcl,v 1.5 2007/11/18 19:20:26 jenglish Exp $ # # Settings for default theme. # @@ -38,7 +38,8 @@ namespace eval ttk::theme::default { [list disabled $colors(-disabledfg)] ttk::style configure TButton \ - -padding "3 3" -width -9 -relief raised -shiftrelief 1 + -anchor center -padding "3 3" -width -9 \ + -relief raised -shiftrelief 1 ttk::style map TButton -relief [list {!disabled pressed} sunken] ttk::style configure TCheckbutton \ @@ -52,7 +53,7 @@ namespace eval ttk::theme::default { [list pressed $colors(-activebg) selected $colors(-indicator)] ttk::style configure TMenubutton \ - -relief raised -padding "10 3" -anchor w + -relief raised -padding "10 3" ttk::style configure TEntry \ -relief sunken -fieldbackground white -padding 1 diff --git a/library/ttk/winTheme.tcl b/library/ttk/winTheme.tcl index bd9696b..b39ecb5 100644 --- a/library/ttk/winTheme.tcl +++ b/library/ttk/winTheme.tcl @@ -1,5 +1,5 @@ # -# $Id: winTheme.tcl,v 1.4 2007/10/16 21:00:15 jenglish Exp $ +# $Id: winTheme.tcl,v 1.5 2007/11/18 19:20:26 jenglish Exp $ # # Settings for 'winnative' theme. # @@ -19,11 +19,12 @@ namespace eval ttk::theme::winnative { ttk::style map "." -foreground [list disabled SystemGrayText] ; ttk::style map "." -embossed [list disabled 1] ; - ttk::style configure TButton -width -11 -relief raised -shiftrelief 1 + ttk::style configure TButton \ + -anchor center -width -11 -relief raised -shiftrelief 1 ttk::style configure TCheckbutton -padding "2 4" ttk::style configure TRadiobutton -padding "2 4" ttk::style configure TMenubutton \ - -padding "8 4" -arrowsize 3 -relief raised -anchor w + -padding "8 4" -arrowsize 3 -relief raised ttk::style map TButton -relief {{!disabled pressed} sunken} diff --git a/library/ttk/xpTheme.tcl b/library/ttk/xpTheme.tcl index 44a5087..3884f06 100644 --- a/library/ttk/xpTheme.tcl +++ b/library/ttk/xpTheme.tcl @@ -1,5 +1,5 @@ # -# $Id: xpTheme.tcl,v 1.4 2007/10/16 21:00:15 jenglish Exp $ +# $Id: xpTheme.tcl,v 1.5 2007/11/18 19:20:26 jenglish Exp $ # # Settings for 'xpnative' theme # @@ -20,10 +20,10 @@ namespace eval ttk::theme::xpnative { -foreground [list disabled SystemGrayText] \ ; - ttk::style configure TButton -padding {1 1} -width -11 + ttk::style configure TButton -anchor center -padding {1 1} -width -11 ttk::style configure TRadiobutton -padding 2 ttk::style configure TCheckbutton -padding 2 - ttk::style configure TMenubutton -padding {8 4} -anchor w + ttk::style configure TMenubutton -padding {8 4} ttk::style configure TNotebook -tabmargins {2 2 2 0} ttk::style map TNotebook.Tab \ |