blob: 53436711828f2676391ee567fca067a150efe270 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
#
# Aqua theme (OSX native look and feel)
#
namespace eval ttk::theme::aqua {
ttk::style theme settings aqua {
ttk::style configure . \
-font TkDefaultFont \
-background systemWindowBody \
-foreground systemLabelColor \
-selectbackground systemHighlight \
-selectforeground systemLabelColor \
-selectborderwidth 0 \
-insertwidth 1
ttk::style map . \
-foreground {
disabled systemLabelColor
background systemLabelColor} \
-selectbackground {
background systemHighlight
!focus systemHighlightSecondary} \
-selectforeground {
background systemLabelColor
!focus systemDialogActiveText}
# Buttons
# ttk::style configure TButton -anchor center -width -6 \
ttk::style configure TButton -anchor center \
-foreground systemControlTextColor
ttk::style map TButton \
-foreground {
disabled systemDisabledControlTextColor}
ttk::style map TCheckbutton \
-foreground {
disabled systemDisabledControlTextColor}
ttk::style map TRadiobutton \
-foreground {
disabled systemDisabledControlTextColor}
ttk::style map Toolbutton \
-foreground {
disabled systemDisabledControlTextColor
}
# Workaround for #1100117:
# Actually, on Aqua we probably shouldn't stipple images in
# disabled buttons even if it did work...
ttk::style configure . -stipple {}
# Notebook
ttk::style configure TNotebook -tabmargins {10 0} -tabposition n
ttk::style configure TNotebook -padding {18 8 18 17}
ttk::style configure TNotebook.Tab -padding {12 3 12 2}
ttk::style configure TNotebook.Tab -foreground white
ttk::style map TNotebook.Tab \
-foreground {
{background !disabled !selected} systemControlTextColor
{background selected} black
disabled systemDisabledControlTextColor
!selected systemControlTextColor}
# Combobox:
ttk::style configure TCombobox -postoffset {5 -2 -10 0}
# Treeview:
ttk::style configure Heading -font TkHeadingFont
ttk::style configure Treeview -rowheight 18 -background White \
-foreground black
ttk::style map Treeview \
-background {
disabled systemDialogBackgroundInactive
{selected background} systemHighlightSecondary
selected systemHighlight} \
-foreground {
!active black
}
# Enable animation for ttk::progressbar widget:
ttk::style configure TProgressbar -period 100 -maxphase 255
# 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)
#
ttk::style configure TLabelframe \
-labeloutside true -labelmargins {14 0 14 4}
# TODO: panedwindow sashes should be 9 pixels (HIG:Controls:Split Views)
}
}
|