summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/ttk/ttkClamTheme.c55
-rw-r--r--generic/ttk/ttkElements.c23
-rw-r--r--library/ttk/altTheme.tcl21
-rw-r--r--library/ttk/clamTheme.tcl24
-rw-r--r--library/ttk/classicTheme.tcl21
-rw-r--r--library/ttk/defaults.tcl17
-rw-r--r--library/ttk/vistaTheme.tcl6
-rw-r--r--library/ttk/winTheme.tcl27
-rw-r--r--library/ttk/xpTheme.tcl5
9 files changed, 91 insertions, 108 deletions
diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c
index 60e9df3..807090e 100644
--- a/generic/ttk/ttkClamTheme.c
+++ b/generic/ttk/ttkClamTheme.c
@@ -495,7 +495,7 @@ static const Ttk_ElementOptionSpec GripElementOptions[] = {
offsetof(GripElement,lightColorObj), LIGHT_COLOR },
{ "-bordercolor", TK_OPTION_COLOR,
offsetof(GripElement,borderColorObj), DARKEST_COLOR },
- { "-gripcount", TK_OPTION_INT,
+ { "-gripcount", TK_OPTION_PIXELS,
offsetof(GripElement,gripCountObj), "5" },
{ NULL, TK_OPTION_BOOLEAN, 0, NULL }
};
@@ -506,15 +506,15 @@ static void GripElementSize(
{
Ttk_Orient orient = (Ttk_Orient)PTR2INT(clientData);
GripElement *grip = (GripElement *)elementRecord;
- int gripCount = 0;
- (void)tkwin;
+ int gripSize = 0;
(void)paddingPtr;
- Tcl_GetIntFromObj(NULL, grip->gripCountObj, &gripCount);
+ Tk_GetPixelsFromObj(NULL, tkwin, grip->gripCountObj, &gripSize);
+ gripSize *= 2;
if (orient == TTK_ORIENT_HORIZONTAL) {
- *widthPtr = 2*gripCount;
+ *widthPtr = gripSize;
} else {
- *heightPtr = 2*gripCount;
+ *heightPtr = gripSize;
}
}
@@ -527,25 +527,24 @@ static void GripElementDraw(
GripElement *grip = (GripElement *)elementRecord;
GC lightGC = Ttk_GCForColor(tkwin,grip->lightColorObj,d);
GC darkGC = Ttk_GCForColor(tkwin,grip->borderColorObj,d);
- int gripPad = 1, gripCount = 0;
+ int gripPad = 1, gripSize = 0;
int i;
(void)state;
- Tcl_GetIntFromObj(NULL, grip->gripCountObj, &gripCount);
+ Tk_GetPixelsFromObj(NULL, tkwin, grip->gripCountObj, &gripSize);
+ gripSize *= 2;
if (orient == TTK_ORIENT_HORIZONTAL) {
- int x = b.x + b.width / 2 - gripCount;
+ int x = b.x + (b.width - gripSize) / 2;
int y1 = b.y + gripPad, y2 = b.y + b.height - gripPad - 1 + w;
- for (i=0; i<gripCount; ++i) {
- XDrawLine(Tk_Display(tkwin), d, darkGC, x,y1, x,y2); ++x;
- XDrawLine(Tk_Display(tkwin), d, lightGC, x,y1, x,y2); ++x;
+ for (i=0; i<gripSize; ++i) {
+ XDrawLine(Tk_Display(tkwin), d, (i&1)?lightGC:darkGC, x,y1, x,y2); ++x;
}
} else {
- int y = b.y + b.height / 2 - gripCount;
+ int y = b.y + (b.height - gripSize) / 2;
int x1 = b.x + gripPad, x2 = b.x + b.width - gripPad - 1 + w;
- for (i=0; i<gripCount; ++i) {
- XDrawLine(Tk_Display(tkwin), d, darkGC, x1,y, x2,y); ++y;
- XDrawLine(Tk_Display(tkwin), d, lightGC, x1,y, x2,y); ++y;
+ for (i=0; i<gripSize; ++i) {
+ XDrawLine(Tk_Display(tkwin), d, (i&1)?lightGC:darkGC, x1,y, x2,y); ++y;
}
}
}
@@ -595,7 +594,7 @@ static const Ttk_ElementOptionSpec ScrollbarElementOptions[] = {
offsetof(ScrollbarElement,arrowColorObj), "#000000" },
{ "-arrowsize", TK_OPTION_PIXELS,
offsetof(ScrollbarElement,arrowSizeObj), STR(SCROLLBAR_THICKNESS) },
- { "-gripcount", TK_OPTION_INT,
+ { "-gripcount", TK_OPTION_PIXELS,
offsetof(ScrollbarElement,gripCountObj), "5" },
{ "-sliderlength", TK_OPTION_INT,
offsetof(ScrollbarElement,sliderlengthObj), "30" },
@@ -634,7 +633,7 @@ static void ThumbElementSize(
(void)tkwin;
(void)paddingPtr;
- Tcl_GetIntFromObj(NULL, sb->arrowSizeObj, &size);
+ Tk_GetPixelsFromObj(NULL, tkwin, sb->arrowSizeObj, &size);
*widthPtr = *heightPtr = size;
}
@@ -643,7 +642,7 @@ static void ThumbElementDraw(
Drawable d, Ttk_Box b, unsigned state)
{
ScrollbarElement *sb = (ScrollbarElement *)elementRecord;
- int gripCount = 0;
+ int gripSize = 0;
Ttk_Orient orient = TTK_ORIENT_HORIZONTAL;
GC lightGC, darkGC;
int x1, y1, x2, y2, dx, dy, i;
@@ -661,27 +660,27 @@ static void ThumbElementDraw(
* Draw grip:
*/
TtkGetOrientFromObj(NULL, sb->orientObj, &orient);
- Tcl_GetIntFromObj(NULL, sb->gripCountObj, &gripCount);
+ Tk_GetPixelsFromObj(NULL, tkwin, sb->gripCountObj, &gripSize);
+ gripSize *= 2;
lightGC = Ttk_GCForColor(tkwin,sb->lightColorObj,d);
darkGC = Ttk_GCForColor(tkwin,sb->borderColorObj,d);
if (orient == TTK_ORIENT_HORIZONTAL) {
dx = 1; dy = 0;
- x1 = x2 = b.x + b.width / 2 - gripCount;
+ x1 = x2 = b.x + (b.width - gripSize) / 2;
y1 = b.y + 2;
y2 = b.y + b.height - 3 + w;
} else {
dx = 0; dy = 1;
- y1 = y2 = b.y + b.height / 2 - gripCount;
+ y1 = y2 = b.y + (b.height - gripSize) / 2;
x1 = b.x + 2;
x2 = b.x + b.width - 3 + w;
}
- for (i=0; i<gripCount; ++i) {
- XDrawLine(Tk_Display(tkwin), d, darkGC, x1,y1, x2,y2);
- x1 += dx; x2 += dx; y1 += dy; y2 += dy;
- XDrawLine(Tk_Display(tkwin), d, lightGC, x1,y1, x2,y2);
+ for (i=0; i<gripSize; ++i) {
+ XDrawLine(Tk_Display(tkwin), d, (i&1)?lightGC:darkGC, x1,y1, x2,y2);
x1 += dx; x2 += dx; y1 += dy; y2 += dy;
+
}
}
@@ -708,7 +707,7 @@ static void SliderElementSize(
length = thickness = SCROLLBAR_THICKNESS;
TtkGetOrientFromObj(NULL, sb->orientObj, &orient);
- Tcl_GetIntFromObj(NULL, sb->arrowSizeObj, &thickness);
+ Tk_GetPixelsFromObj(NULL, tkwin, sb->arrowSizeObj, &thickness);
Tk_GetPixelsFromObj(NULL, tkwin, sb->sliderlengthObj, &length);
if (orient == TTK_ORIENT_VERTICAL) {
*heightPtr = length;
@@ -782,7 +781,7 @@ static void ArrowElementSize(
(void)tkwin;
(void)paddingPtr;
- Tcl_GetIntFromObj(NULL, sb->arrowSizeObj, &size);
+ Tk_GetPixelsFromObj(NULL, tkwin, sb->arrowSizeObj, &size);
*widthPtr = *heightPtr = size;
}
diff --git a/generic/ttk/ttkElements.c b/generic/ttk/ttkElements.c
index e2626e5..698f460 100644
--- a/generic/ttk/ttkElements.c
+++ b/generic/ttk/ttkElements.c
@@ -475,11 +475,14 @@ static const Ttk_ElementSpec SeparatorElementSpec = {
typedef struct {
Tcl_Obj *backgroundObj;
+ Tcl_Obj *gripSizeObj;
} SizegripElement;
static const Ttk_ElementOptionSpec SizegripOptions[] = {
{ "-background", TK_OPTION_BORDER,
offsetof(SizegripElement,backgroundObj), DEFAULT_BACKGROUND },
+ { "-gripsize", TK_OPTION_PIXELS,
+ offsetof(SizegripElement,gripSizeObj), "15" },
{0,TK_OPTION_BOOLEAN,0,0}
};
@@ -487,13 +490,14 @@ static void SizegripSize(
void *dummy, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
- int gripCount = 3, gripSpace = 2, gripThickness = 3;
+ SizegripElement *grip = (SizegripElement *)elementRecord;
+ int gripSize = 0;
(void)dummy;
- (void)elementRecord;
(void)tkwin;
(void)paddingPtr;
- *widthPtr = *heightPtr = gripCount * (gripSpace + gripThickness);
+ Tk_GetPixelsFromObj(NULL, tkwin, grip->gripSizeObj, &gripSize);
+ *widthPtr = *heightPtr = gripSize;
}
static void SizegripDraw(
@@ -501,7 +505,8 @@ static void SizegripDraw(
Drawable d, Ttk_Box b, Ttk_State state)
{
SizegripElement *grip = (SizegripElement *)elementRecord;
- int gripCount = 3, gripSpace = 2;
+ int gripSize = 0;
+ int gripCount = 3, gripSpace, gripThickness;
Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, grip->backgroundObj);
GC lightGC = Tk_3DBorderGC(tkwin, border, TK_3D_LIGHT_GC);
GC darkGC = Tk_3DBorderGC(tkwin, border, TK_3D_DARK_GC);
@@ -509,11 +514,15 @@ static void SizegripDraw(
(void)dummy;
(void)state;
+ Tk_GetPixelsFromObj(NULL, tkwin, grip->gripSizeObj, &gripSize);
+ gripThickness = gripSize * 3 / (gripCount * 5);
+ gripSpace = gripSize / 3 - gripThickness;
while (gripCount--) {
x1 -= gripSpace; y2 -= gripSpace;
- XDrawLine(Tk_Display(tkwin), d, darkGC, x1,y1, x2,y2); --x1; --y2;
- XDrawLine(Tk_Display(tkwin), d, darkGC, x1,y1, x2,y2); --x1; --y2;
- XDrawLine(Tk_Display(tkwin), d, lightGC, x1,y1, x2,y2); --x1; --y2;
+ for (int i = 1; i < gripThickness; i++) {
+ XDrawLine(Tk_Display(tkwin), d, darkGC, x1,y1, x2,y2); --x1; --y2;
+ }
+ XDrawLine(Tk_Display(tkwin), d, lightGC, x1,y1, x2,y2); --x1; --y2;
}
}
diff --git a/library/ttk/altTheme.tcl b/library/ttk/altTheme.tcl
index 713f0be..a9b8748 100644
--- a/library/ttk/altTheme.tcl
+++ b/library/ttk/altTheme.tcl
@@ -8,7 +8,7 @@ namespace eval ttk::theme::alt {
array set colors {
-frame "#d9d9d9"
-window "#ffffff"
- -alternate "#f0f0f0"
+ -alternate "#f0f0f0"
-darker "#c3c3c3"
-border "#414141"
-activebg "#ececec"
@@ -43,11 +43,10 @@ namespace eval ttk::theme::alt {
{active !disabled} raised
} -highlightcolor {alternate black}
- set indMargin {0 1.5p 3p 1.5p}
ttk::style configure TCheckbutton -indicatorcolor "#ffffff" \
- -indicatormargin $indMargin -padding 1.5p
+ -indicatormargin {0 1.5p 3p 1.5p} -padding 1.5p
ttk::style configure TRadiobutton -indicatorcolor "#ffffff" \
- -indicatormargin $indMargin -padding 1.5p
+ -indicatormargin {0 1.5p 3p 1.5p} -padding 1.5p
ttk::style map TCheckbutton -indicatorcolor \
[list pressed $colors(-frame) \
alternate $colors(-altindicator) \
@@ -58,7 +57,7 @@ namespace eval ttk::theme::alt {
disabled $colors(-frame)]
ttk::style configure TMenubutton \
- -width -11 -arrowsize 3.75p -padding 2.25p -relief raised
+ -width -11 -padding 2.25p -arrowsize 3.75p -relief raised
ttk::style configure TEntry -padding 1
ttk::style map TEntry -fieldbackground \
@@ -87,13 +86,12 @@ namespace eval ttk::theme::alt {
ttk::style configure TLabelframe -relief groove -borderwidth 2
- set margins {1.5p 1.5p 0.75p 0}
- ttk::style configure TNotebook -tabmargins $margins
+ ttk::style configure TNotebook -tabmargins {1.5p 1.5p 0.75p 0}
ttk::style configure TNotebook.Tab -background $colors(-darker) \
-padding {3p 1.5p}
ttk::style map TNotebook.Tab \
-background [list selected $colors(-frame)] \
- -expand [list selected $margins]
+ -expand {selected {1.5p 1.5p 0.75p 0}}
# Treeview:
ttk::style configure Heading -font TkHeadingFont -relief raised
@@ -107,15 +105,12 @@ namespace eval ttk::theme::alt {
-foreground [list disabled $colors(-disabledfg) \
selected $colors(-selectfg)]
- set thickness 11.25p
ttk::style configure TScale \
-groovewidth 3p -troughrelief sunken \
- -sliderthickness $thickness -borderwidth 2
+ -sliderthickness 11.25p -borderwidth 2
ttk::style configure TProgressbar \
-background $colors(-selectbg) -borderwidth 0 \
- -barsize 22.5p -thickness $thickness
+ -barsize 22.5p -thickness 11.25p
}
-
- unset indMargin margins thickness
}
diff --git a/library/ttk/clamTheme.tcl b/library/ttk/clamTheme.tcl
index c68b178..c0c4039 100644
--- a/library/ttk/clamTheme.tcl
+++ b/library/ttk/clamTheme.tcl
@@ -6,8 +6,6 @@
namespace eval ttk::theme::clam {
- namespace import ::tk::ScaleNum
-
variable colors
array set colors {
-disabledfg "#999999"
@@ -56,7 +54,7 @@ namespace eval ttk::theme::clam {
active $colors(-lighter)] \
-lightcolor [list pressed $colors(-darker)] \
-darkcolor [list pressed $colors(-darker)] \
- -bordercolor [list alternate "#000000"]
+ -bordercolor {alternate #000000}
ttk::style configure Toolbutton \
-anchor center -padding 1.5p -relief flat
@@ -101,8 +99,8 @@ namespace eval ttk::theme::clam {
ttk::style map TEntry \
-background [list readonly $colors(-frame)] \
-bordercolor [list focus $colors(-selectbg)] \
- -lightcolor [list focus "#6f9dc6"] \
- -darkcolor [list focus "#6f9dc6"]
+ -lightcolor {focus #6f9dc6} \
+ -darkcolor {focus #6f9dc6}
ttk::style configure TCombobox -padding 1 -insertwidth 1 \
-arrowsize 10.5p
@@ -123,7 +121,7 @@ namespace eval ttk::theme::clam {
ttk::style configure TNotebook.Tab -padding {4.5p 1.5p 4.5p 1.5p}
ttk::style map TNotebook.Tab \
- -padding [list selected {4.5p 3p 4.5p 1.5p}] \
+ -padding {selected {4.5p 3p 4.5p 1.5p}} \
-background [list selected $colors(-frame) {} $colors(-darker)] \
-lightcolor [list selected $colors(-lighter) {} $colors(-dark)]
@@ -144,19 +142,15 @@ namespace eval ttk::theme::clam {
-labeloutside true -labelmargins {0 0 0 3p} \
-borderwidth 2 -relief raised
- set gripCount [ScaleNum 5]
- ttk::style configure TScrollbar -gripcount $gripCount \
+ ttk::style configure TScrollbar -gripcount 3.75p \
-arrowsize 10.5p -width 10.5p
- set sliderLen 22.5p
- ttk::style configure TScale -gripcount $gripCount \
- -arrowsize 10.5p -sliderlength $sliderLen
+ ttk::style configure TScale -gripcount 3.75p \
+ -arrowsize 10.5p -sliderlength 22.5p
ttk::style configure TProgressbar -background $colors(-frame) \
- -arrowsize 10.5p -sliderlength $sliderLen
+ -arrowsize 10.5p -sliderlength 22.5p
- ttk::style configure Sash -sashthickness 4.5p -gripcount [ScaleNum 10]
+ ttk::style configure Sash -sashthickness 4.5p -gripcount 7.5p
}
-
- unset gripCount sliderLen
}
diff --git a/library/ttk/classicTheme.tcl b/library/ttk/classicTheme.tcl
index aae1743..dc02134 100644
--- a/library/ttk/classicTheme.tcl
+++ b/library/ttk/classicTheme.tcl
@@ -42,15 +42,14 @@ namespace eval ttk::theme::classic {
ttk::style map "." -foreground \
[list disabled $colors(-disabledfg)]
- ttk::style map "." -highlightcolor [list focus black]
+ ttk::style map "." -highlightcolor {focus black}
ttk::style configure TButton \
-anchor center -padding "3m 1m" -relief raised -shiftrelief 1
- ttk::style map TButton -relief [list {!disabled pressed} sunken]
+ ttk::style map TButton -relief {{!disabled pressed} sunken}
- set indMargin {0 1.5p 3p 1.5p}
ttk::style configure TCheckbutton -indicatorrelief raised \
- -indicatordiameter 9p -indicatormargin $indMargin
+ -indicatordiameter 9p -indicatormargin {0 1.5p 3p 1.5p}
ttk::style map TCheckbutton \
-indicatorcolor [list \
pressed $colors(-frame) \
@@ -59,7 +58,7 @@ namespace eval ttk::theme::classic {
-indicatorrelief {alternate raised selected sunken pressed sunken}
ttk::style configure TRadiobutton -indicatorrelief raised \
- -indicatordiameter 9p -indicatormargin $indMargin
+ -indicatordiameter 9p -indicatormargin {0 1.5p 3p 1.5p}
ttk::style map TRadiobutton \
-indicatorcolor [list \
pressed $colors(-frame) \
@@ -68,7 +67,7 @@ namespace eval ttk::theme::classic {
-indicatorrelief {alternate raised selected sunken pressed sunken}
ttk::style configure TMenubutton -relief raised \
- -indicatormargin {3.75p 0} -padding "3m 1m"
+ -indicatormargin {3.75p 0} -padding {3m 1m}
ttk::style configure TEntry -relief sunken -padding 1 -font TkTextFont
ttk::style map TEntry -fieldbackground \
@@ -90,13 +89,12 @@ namespace eval ttk::theme::classic {
-arrowsize 11.25p -width 11.25p
ttk::style map TScrollbar -relief {{pressed !disabled} sunken}
- set thickness 11.25p
ttk::style configure TScale -sliderrelief raised \
- -sliderlength 22.5p -sliderthickness $thickness
+ -sliderlength 22.5p -sliderthickness 11.25p
ttk::style map TScale -sliderrelief {{pressed !disabled} sunken}
ttk::style configure TProgressbar -background SteelBlue \
- -barsize 22.5p -thickness $thickness
+ -barsize 22.5p -thickness 11.25p
ttk::style configure TNotebook.Tab \
-padding {3m 1m} \
@@ -118,8 +116,7 @@ namespace eval ttk::theme::classic {
#
# Toolbar buttons:
#
- ttk::style configure Toolbutton -padding 1.5p -relief flat \
- -shiftrelief 2
+ ttk::style configure Toolbutton -padding 1.5p -relief flat -shiftrelief 2
ttk::style map Toolbutton -relief \
{disabled flat selected sunken pressed sunken active raised}
ttk::style map Toolbutton -background \
@@ -128,6 +125,4 @@ namespace eval ttk::theme::classic {
ttk::style configure Sash \
-sashthickness 4.5p -sashpad 1.5 -handlesize 6p -handlepad 6p
}
-
- unset indMargin thickness
}
diff --git a/library/ttk/defaults.tcl b/library/ttk/defaults.tcl
index 1fbd022..2cf2b54 100644
--- a/library/ttk/defaults.tcl
+++ b/library/ttk/defaults.tcl
@@ -114,11 +114,9 @@ proc ttk::theme::default::reconfigureDefaultTheme {} {
-relief raised -shiftrelief 1
ttk::style map TButton -relief [list {!disabled pressed} sunken]
- set t 1.5p; set r 3p; set b $t
- set indMargin [list 0 $t $r $b]
ttk::style configure TCheckbutton \
-indicatorcolor $colors(-window) -indicatorrelief sunken \
- -indicatordiameter 7.5p -indicatormargin $indMargin -padding 0.75p
+ -indicatordiameter 7.5p -indicatormargin {0 1.5p 3p 1.5p} -padding 0.75p
ttk::style map TCheckbutton -indicatorcolor \
[list pressed $colors(-activebg) \
{!disabled alternate} $colors(-altindicator) \
@@ -130,7 +128,7 @@ proc ttk::theme::default::reconfigureDefaultTheme {} {
ttk::style configure TRadiobutton \
-indicatorcolor $colors(-window) -indicatorrelief sunken \
- -indicatordiameter 7.5p -indicatormargin $indMargin -padding 0.75p
+ -indicatordiameter 7.5p -indicatormargin {0 1.5p 3p 1.5p} -padding 0.75p
ttk::style map TRadiobutton -indicatorcolor \
[list pressed $colors(-activebg) \
{!disabled alternate} $colors(-altindicator) \
@@ -166,16 +164,15 @@ proc ttk::theme::default::reconfigureDefaultTheme {} {
ttk::style map TScrollbar \
-arrowcolor [list disabled $colors(-disabledfg) !disabled $colors(-text)]
- set thickness 11.25p
ttk::style configure TScale \
-sliderrelief raised \
-sliderlength 22.5p \
- -sliderthickness $thickness
+ -sliderthickness 11.25p
ttk::style configure TProgressbar \
-background $colors(-selectbg) \
-barsize 22.5p \
- -thickness $thickness
+ -thickness 11.25p
ttk::style configure TNotebook.Tab \
-padding {3p 1.5p} -background $colors(-darker)
@@ -186,15 +183,15 @@ proc ttk::theme::default::reconfigureDefaultTheme {} {
#
ttk::style configure Heading -font TkHeadingFont -relief raised
ttk::style configure Treeview \
- -background $colors(-window) \
- -stripedbackground $colors(-alternate) \
+ -background $colors(-window) \
+ -stripedbackground $colors(-alternate) \
-fieldbackground $colors(-window) \
-foreground $colors(-text) ;
ttk::style configure Treeview.Separator \
-background $colors(-alternate)
ttk::style map Treeview \
-background [list disabled $colors(-frame)\
- selected $colors(-selectbg)] \
+ selected $colors(-selectbg)] \
-foreground [list disabled $colors(-disabledfg) \
selected $colors(-selectfg)]
diff --git a/library/ttk/vistaTheme.tcl b/library/ttk/vistaTheme.tcl
index dbea7fb..288ec97 100644
--- a/library/ttk/vistaTheme.tcl
+++ b/library/ttk/vistaTheme.tcl
@@ -25,7 +25,7 @@ namespace eval ttk::theme::vista {
-font TkDefaultFont
ttk::style map "." \
- -foreground [list disabled SystemGrayText]
+ -foreground {disabled SystemGrayText}
ttk::style configure TButton -anchor center -padding 0.75p -width -11
ttk::style configure TRadiobutton -padding 1.5p
@@ -39,7 +39,7 @@ namespace eval ttk::theme::vista {
ttk::style configure TNotebook -tabmargins {1.5p 1.5p 1.5p 0}
ttk::style map TNotebook.Tab \
- -expand [list selected {1.5p 1.5p 1.5p 1.5p}]
+ -expand {selected {1.5p 1.5p 1.5p 1.5p}}
# Treeview:
ttk::style configure Heading -font TkHeadingFont
@@ -49,7 +49,7 @@ namespace eval ttk::theme::vista {
-background System3dLight
ttk::style map Treeview \
-background [list disabled SystemButtonFace \
- selected SystemHighlight] \
+ selected SystemHighlight] \
-foreground [list disabled SystemGrayText \
selected SystemHighlightText]
diff --git a/library/ttk/winTheme.tcl b/library/ttk/winTheme.tcl
index 77d556b..9fe65be 100644
--- a/library/ttk/winTheme.tcl
+++ b/library/ttk/winTheme.tcl
@@ -16,16 +16,15 @@ namespace eval ttk::theme::winnative {
-troughcolor SystemScrollbar \
-font TkDefaultFont
- ttk::style map "." -foreground [list disabled SystemGrayText]
- ttk::style map "." -embossed [list disabled 1]
+ ttk::style map "." -foreground {disabled SystemGrayText}
+ ttk::style map "." -embossed {disabled 1}
ttk::style configure TButton \
-anchor center -width -11 -relief raised -shiftrelief 1
ttk::style map TButton -relief {{!disabled pressed} sunken}
- set padding {1.5p 3p}
- ttk::style configure TCheckbutton -padding $padding
- ttk::style configure TRadiobutton -padding $padding
+ ttk::style configure TCheckbutton -padding {1.5p 3p}
+ ttk::style configure TRadiobutton -padding {1.5p 3p}
ttk::style configure TMenubutton \
-padding {6p 3p} -arrowsize 2.25p -relief raised
@@ -34,9 +33,9 @@ namespace eval ttk::theme::winnative {
-padding 2 -selectborderwidth 0 -insertwidth 1
ttk::style map TEntry \
-fieldbackground \
- [list readonly SystemButtonFace disabled SystemButtonFace] \
- -selectbackground [list !focus SystemWindow] \
- -selectforeground [list !focus SystemWindowText]
+ {readonly SystemButtonFace disabled SystemButtonFace} \
+ -selectbackground {!focus SystemWindow} \
+ -selectforeground {!focus SystemWindowText}
ttk::style configure TCombobox -padding 1.5p
ttk::style map TCombobox \
@@ -49,7 +48,7 @@ namespace eval ttk::theme::winnative {
disabled SystemGrayText \
{readonly focus} SystemHighlightText \
] \
- -focusfill [list {readonly focus} SystemHighlight]
+ -focusfill {{readonly focus} SystemHighlight}
ttk::style element create ComboboxPopdownFrame.border from default
ttk::style configure ComboboxPopdownFrame \
@@ -65,11 +64,9 @@ namespace eval ttk::theme::winnative {
ttk::style configure TScale -groovewidth 3p
- set margins {1.5p 1.5p 1.5p 0}
- ttk::style configure TNotebook -tabmargins $margins
- ttk::style configure TNotebook.Tab \
- -padding {2.25p 0.75p} -borderwidth 1
- ttk::style map TNotebook.Tab -expand [list selected $margins]
+ ttk::style configure TNotebook -tabmargins {1.5p 1.5p 1.5p 0}
+ ttk::style configure TNotebook.Tab -padding {2.25p 0.75p} -borderwidth 1
+ ttk::style map TNotebook.Tab -expand {selected {1.5p 1.5p 1.5p 0}}
# Treeview:
ttk::style configure Heading -font TkHeadingFont -relief raised
@@ -85,6 +82,4 @@ namespace eval ttk::theme::winnative {
-background SystemHighlight -borderwidth 0 \
-barsize 22.5p -thickness 11.25p
}
-
- unset padding margins
}
diff --git a/library/ttk/xpTheme.tcl b/library/ttk/xpTheme.tcl
index e265284..6b4e972 100644
--- a/library/ttk/xpTheme.tcl
+++ b/library/ttk/xpTheme.tcl
@@ -17,15 +17,14 @@ namespace eval ttk::theme::xpnative {
ttk::style map "." \
-foreground [list disabled SystemGrayText]
- ttk::style configure TButton -anchor center -padding 0.75p \
- -width -11
+ ttk::style configure TButton -anchor center -padding 0.75p -width -11
ttk::style configure TRadiobutton -padding 1.5p
ttk::style configure TCheckbutton -padding 1.5p
ttk::style configure TMenubutton -padding {6p 3p}
ttk::style configure TNotebook -tabmargins {1.5p 1.5p 1.5p 0}
ttk::style map TNotebook.Tab \
- -expand [list selected {1.5p 1.5p 1.5p 1.5p}]
+ -expand {selected {1.5p 1.5p 1.5p 1.5p}}
ttk::style configure TLabelframe.Label -foreground "#0046d5"