summaryrefslogtreecommitdiffstats
path: root/library/ttk
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2007-10-16 21:00:15 (GMT)
committerjenglish <jenglish@flightlab.com>2007-10-16 21:00:15 (GMT)
commit6dbeff0aa909a860b3a8fbccfd36982606687cdc (patch)
tree4228cceb8243d11841acb88c5f77be316285cf0c /library/ttk
parentaafe96567a57b1ec47f8e9b90a1aa5d2b27d02a1 (diff)
downloadtk-6dbeff0aa909a860b3a8fbccfd36982606687cdc.zip
tk-6dbeff0aa909a860b3a8fbccfd36982606687cdc.tar.gz
tk-6dbeff0aa909a860b3a8fbccfd36982606687cdc.tar.bz2
s/style/ttk::style/
Diffstat (limited to 'library/ttk')
-rw-r--r--library/ttk/winTheme.tcl62
-rw-r--r--library/ttk/xpTheme.tcl49
2 files changed, 55 insertions, 56 deletions
diff --git a/library/ttk/winTheme.tcl b/library/ttk/winTheme.tcl
index 34a6bc3..bd9696b 100644
--- a/library/ttk/winTheme.tcl
+++ b/library/ttk/winTheme.tcl
@@ -1,14 +1,13 @@
#
-# $Id: winTheme.tcl,v 1.3 2006/12/18 19:33:14 jenglish Exp $
+# $Id: winTheme.tcl,v 1.4 2007/10/16 21:00:15 jenglish Exp $
#
-# Ttk widget set: Windows Native theme
+# Settings for 'winnative' theme.
#
-namespace eval ttk {
+namespace eval ttk::theme::winnative {
+ ttk::style theme settings winnative {
- style theme settings winnative {
-
- style configure "." \
+ ttk::style configure "." \
-background SystemButtonFace \
-foreground SystemWindowText \
-selectforeground SystemHighlightText \
@@ -17,60 +16,61 @@ namespace eval ttk {
-font TkDefaultFont \
;
- style map "." -foreground [list disabled SystemGrayText] ;
- style map "." -embossed [list disabled 1] ;
+ ttk::style map "." -foreground [list disabled SystemGrayText] ;
+ ttk::style map "." -embossed [list disabled 1] ;
- style configure TButton -width -11 -relief raised -shiftrelief 1
- style configure TCheckbutton -padding "2 4"
- style configure TRadiobutton -padding "2 4"
- style configure TMenubutton \
+ ttk::style configure TButton -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
- style map TButton -relief {{!disabled pressed} sunken}
+ ttk::style map TButton -relief {{!disabled pressed} sunken}
- style configure TEntry \
+ ttk::style configure TEntry \
-padding 2 -selectborderwidth 0 -insertwidth 1
- style map TEntry \
+ ttk::style map TEntry \
-fieldbackground \
[list readonly SystemButtonFace disabled SystemButtonFace] \
-selectbackground [list !focus SystemWindow] \
-selectforeground [list !focus SystemWindowText] \
;
- style configure TCombobox -padding 2
- style map TCombobox \
+ ttk::style configure TCombobox -padding 2
+ ttk::style map TCombobox \
-selectbackground [list !focus SystemWindow] \
-selectforeground [list !focus SystemWindowText] \
-foreground [list {readonly focus} SystemHighlightText] \
-focusfill [list {readonly focus} SystemHighlight] \
;
- style configure TLabelframe -borderwidth 2 -relief groove
+ ttk::style configure TLabelframe -borderwidth 2 -relief groove
- style configure Toolbutton -relief flat -padding {8 4}
- style map Toolbutton -relief \
+ ttk::style configure Toolbutton -relief flat -padding {8 4}
+ ttk::style map Toolbutton -relief \
{disabled flat selected sunken pressed sunken active raised}
- style configure TScale -groovewidth 4
+ ttk::style configure TScale -groovewidth 4
- style configure TNotebook -tabmargins {2 2 2 0}
- style configure TNotebook.Tab -padding {3 1} -borderwidth 1
- style map TNotebook.Tab -expand [list selected {2 2 2 0}]
+ ttk::style configure TNotebook -tabmargins {2 2 2 0}
+ ttk::style configure TNotebook.Tab -padding {3 1} -borderwidth 1
+ ttk::style map TNotebook.Tab -expand [list selected {2 2 2 0}]
# Treeview:
- style configure Heading -font TkHeadingFont -relief raised
- style configure Row -background SystemWindow
- style configure Cell -background SystemWindow
- style map Row \
+ ttk::style configure Heading -font TkHeadingFont -relief raised
+ ttk::style configure Row -background SystemWindow
+ ttk::style configure Cell -background SystemWindow
+ ttk::style map Row \
-background [list selected SystemHighlight] \
-foreground [list selected SystemHighlightText] ;
- style map Cell \
+ ttk::style map Cell \
-background [list selected SystemHighlight] \
-foreground [list selected SystemHighlightText] ;
- style map Item \
+ ttk::style map Item \
-background [list selected SystemHighlight] \
-foreground [list selected SystemHighlightText] ;
- style configure TProgressbar -borderwidth 0 -background SystemHighlight
+ ttk::style configure TProgressbar \
+ -background SystemHighlight -borderwidth 0 ;
}
}
diff --git a/library/ttk/xpTheme.tcl b/library/ttk/xpTheme.tcl
index 5320b85..44a5087 100644
--- a/library/ttk/xpTheme.tcl
+++ b/library/ttk/xpTheme.tcl
@@ -1,15 +1,14 @@
#
-# $Id: xpTheme.tcl,v 1.3 2006/12/18 19:33:14 jenglish Exp $
+# $Id: xpTheme.tcl,v 1.4 2007/10/16 21:00:15 jenglish Exp $
#
-# Ttk widget set: XP Native theme
+# Settings for 'xpnative' theme
#
-# @@@ todo: spacing and padding needs tweaking
-namespace eval ttk {
+namespace eval ttk::theme::xpnative {
- style theme settings xpnative {
+ ttk::style theme settings xpnative {
- style configure . \
+ ttk::style configure . \
-background SystemButtonFace \
-foreground SystemWindowText \
-selectforeground SystemHighlightText \
@@ -17,49 +16,49 @@ namespace eval ttk {
-font TkDefaultFont \
;
- style map "." \
+ ttk::style map "." \
-foreground [list disabled SystemGrayText] \
;
- style configure TButton -padding {1 1} -width -11
- style configure TRadiobutton -padding 2
- style configure TCheckbutton -padding 2
- style configure TMenubutton -padding {8 4} -anchor w
+ ttk::style configure TButton -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
- style configure TNotebook -tabmargins {2 2 2 0}
- style map TNotebook.Tab \
+ ttk::style configure TNotebook -tabmargins {2 2 2 0}
+ ttk::style map TNotebook.Tab \
-expand [list selected {2 2 2 2}]
# Treeview:
- style configure Heading -font TkHeadingFont
- style configure Row -background SystemWindow
- style configure Cell -background SystemWindow
- style map Row \
+ ttk::style configure Heading -font TkHeadingFont
+ ttk::style configure Row -background SystemWindow
+ ttk::style configure Cell -background SystemWindow
+ ttk::style map Row \
-background [list selected SystemHighlight] \
-foreground [list selected SystemHighlightText] ;
- style map Cell \
+ ttk::style map Cell \
-background [list selected SystemHighlight] \
-foreground [list selected SystemHighlightText] ;
- style map Item \
+ ttk::style map Item \
-background [list selected SystemHighlight] \
-foreground [list selected SystemHighlightText] ;
- style configure TLabelframe -foreground "#0046d5"
+ ttk::style configure TLabelframe -foreground "#0046d5"
# OR: -padding {3 3 3 6}, which some apps seem to use.
- style configure TEntry -padding {2 2 2 4}
- style map TEntry \
+ ttk::style configure TEntry -padding {2 2 2 4}
+ ttk::style map TEntry \
-selectbackground [list !focus SystemWindow] \
-selectforeground [list !focus SystemWindowText] \
;
- style configure TCombobox -padding 2
- style map TCombobox \
+ ttk::style configure TCombobox -padding 2
+ ttk::style map TCombobox \
-selectbackground [list !focus SystemWindow] \
-selectforeground [list !focus SystemWindowText] \
-foreground [list {readonly focus} SystemHighlightText] \
-focusfill [list {readonly focus} SystemHighlight] \
;
- style configure Toolbutton -padding {4 4}
+ ttk::style configure Toolbutton -padding {4 4}
}
}