blob: 834136da67b2ee0aec8884bd0f2eaef8788d6dc2 (
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
|
#
# $Id: aquaTheme.tcl,v 1.5 2007/10/22 03:35:13 jenglish Exp $
#
# Aqua theme (OSX native look and feel)
#
namespace eval ttk::theme::aqua {
ttk::style theme settings aqua {
ttk::style configure . \
-font System \
-background White \
-foreground Black \
-selectbackground SystemHighlight \
-selectforeground SystemHighlightText \
-selectborderwidth 0 \
-insertwidth 1 \
;
ttk::style map . \
-foreground [list disabled "#a3a3a3" background "#a3a3a3"] \
-selectbackground [list background "#c3c3c3" !focus "#c3c3c3"] \
-selectforeground [list background "#a3a3a3" !focus "#000000"] \
;
# Workaround for #1100117:
# Actually, on Aqua we probably shouldn't stipple images in
# disabled buttons even if it did work...
#
ttk::style configure . -stipple {}
ttk::style configure TButton -padding {0 2} -width -6
ttk::style configure TMenubutton -anchor w
ttk::style configure Toolbutton -padding 4
# See Apple HIG figs 14-63, 14-65
ttk::style configure TNotebook -tabposition n -padding {20 12}
ttk::style configure TNotebook.Tab -padding {10 2 10 2}
# Adjust combobox post position to ensure the box is
# directly under 'entry square'
#
ttk::style configure TCombobox -postoffset {3 -2 -6 0}
# Treeview:
ttk::style configure Treeview -rowheight 18
ttk::style configure Heading -font TkHeadingFont
ttk::style map Row -background [list \
{selected background} "#c3c3c3" selected SystemHighlight] ;
ttk::style map Cell -foreground [list \
{selected background} "#000000" selected SystemHighlightText] ;
ttk::style map Item -foreground [list \
{selected background} "#000000" selected SystemHighlightText] ;
# Enable animation for ttk::progressbar widget:
ttk::style configure TProgressbar -period 100 -maxphase 255
# 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
}
#
# 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)
}
}
|