arcadia 0.12.2 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +25 -14
- data/conf/LC/en-UK.LANG +3 -1
- data/conf/arcadia.conf +10 -0
- data/conf/arcadia.res.rb +29 -1
- data/ext/ae-editor/ae-editor.rb +239 -48
- data/ext/ae-file-history/ae-file-history.conf +11 -1
- data/ext/ae-file-history/ae-file-history.rb +120 -2
- data/ext/ae-ruby-debug/ae-ruby-debug.rb +6 -5
- data/ext/ae-subprocess-inspector/ae-subprocess-inspector.rb +7 -3
- data/ext/ae-term/ae-term.rb +1 -1
- data/lib/a-commons.rb +72 -56
- data/lib/a-contracts.rb +23 -1
- data/lib/a-core.rb +136 -41
- data/lib/a-tkcommons.rb +127 -36
- data/tcl/fsdialog/fsdialog.tcl +2 -2
- data/tcl/ptwidgets-1.1.0/COPYRIGHT +10 -0
- data/tcl/ptwidgets-1.1.0/ChangeLog +194 -0
- data/tcl/ptwidgets-1.1.0/README +50 -0
- data/tcl/ptwidgets-1.1.0/common/stacktrace.tcl +29 -0
- data/tcl/ptwidgets-1.1.0/common/tokenframe.tcl +200 -0
- data/tcl/ptwidgets-1.1.0/doc/img/toggleswitch_off.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/toggleswitch_on.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/tokenentry.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/tokensearch_popup_example.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/tokensearch_popup_example2.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/wmarkentry.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/toggleswitch.html +402 -0
- data/tcl/ptwidgets-1.1.0/doc/tokenentry.html +1366 -0
- data/tcl/ptwidgets-1.1.0/doc/tokensearch.html +1549 -0
- data/tcl/ptwidgets-1.1.0/doc/wmarkentry.html +634 -0
- data/tcl/ptwidgets-1.1.0/library/toggleswitch.tcl +432 -0
- data/tcl/ptwidgets-1.1.0/library/tokenentry.tcl +2208 -0
- data/tcl/ptwidgets-1.1.0/library/tokensearch.tcl +2488 -0
- data/tcl/ptwidgets-1.1.0/library/wmarkentry.tcl +630 -0
- data/tcl/ptwidgets-1.1.0/pkgIndex.tcl +10 -0
- data/tcl/ptwidgets-1.1.0/test/Makefile +3 -0
- data/tcl/ptwidgets-1.1.0/test/run.tcl +3 -0
- data/tcl/ptwidgets-1.1.0/test/test.tcl +89 -0
- data/tcl/ptwidgets-1.1.0/test/toggleswitch.test +562 -0
- data/tcl/ptwidgets-1.1.0/test/tokenentry.test +1023 -0
- data/tcl/ptwidgets-1.1.0/test/tokensearch.test +1023 -0
- data/tcl/ptwidgets-1.1.0/test/wmarkentry.test +1325 -0
- data/tcl/themes/altTheme.tcl +101 -0
- data/tcl/themes/aquaTheme.tcl +59 -0
- data/tcl/themes/clamTheme.tcl +140 -0
- data/tcl/themes/classicTheme.tcl +108 -0
- data/tcl/themes/pkgIndex.tcl +3 -0
- data/tcl/themes/ttk.tcl +176 -0
- data/tcl/themes/vistaTheme.tcl +224 -0
- data/tcl/themes/winTheme.tcl +80 -0
- data/tcl/themes/xpTheme.tcl +65 -0
- data/tcl/tkfbox/folder.gif +0 -0
- data/tcl/tkfbox/textfile.gif +0 -0
- data/tcl/tkfbox/tkfbox.tcl +1 -0
- data/tcl/tkfbox/tkfbox.tcl~ +1 -0
- data/tcl/tkfbox/updir.xbm +1 -0
- metadata +43 -2
@@ -0,0 +1,101 @@
|
|
1
|
+
#
|
2
|
+
# Ttk widget set: Alternate theme
|
3
|
+
#
|
4
|
+
|
5
|
+
namespace eval ttk::theme::alt {
|
6
|
+
|
7
|
+
variable colors
|
8
|
+
array set colors {
|
9
|
+
-frame "#d9d9d9"
|
10
|
+
-window "#ffffff"
|
11
|
+
-darker "#c3c3c3"
|
12
|
+
-border "#414141"
|
13
|
+
-activebg "#ececec"
|
14
|
+
-disabledfg "#a3a3a3"
|
15
|
+
-selectbg "#4a6984"
|
16
|
+
-selectfg "#ffffff"
|
17
|
+
}
|
18
|
+
|
19
|
+
ttk::style theme settings alt {
|
20
|
+
|
21
|
+
ttk::style configure "." \
|
22
|
+
-background $colors(-frame) \
|
23
|
+
-foreground black \
|
24
|
+
-troughcolor $colors(-darker) \
|
25
|
+
-bordercolor $colors(-border) \
|
26
|
+
-selectbackground $colors(-selectbg) \
|
27
|
+
-selectforeground $colors(-selectfg) \
|
28
|
+
-font TkDefaultFont \
|
29
|
+
;
|
30
|
+
|
31
|
+
ttk::style map "." -background \
|
32
|
+
[list disabled $colors(-frame) active $colors(-activebg)] ;
|
33
|
+
ttk::style map "." -foreground [list disabled $colors(-disabledfg)] ;
|
34
|
+
ttk::style map "." -embossed [list disabled 1] ;
|
35
|
+
|
36
|
+
ttk::style configure TButton \
|
37
|
+
-anchor center -width -11 -padding "1 1" \
|
38
|
+
-relief raised -shiftrelief 1 \
|
39
|
+
-highlightthickness 1 -highlightcolor $colors(-frame)
|
40
|
+
|
41
|
+
ttk::style map TButton -relief {
|
42
|
+
{pressed !disabled} sunken
|
43
|
+
{active !disabled} raised
|
44
|
+
} -highlightcolor {alternate black}
|
45
|
+
|
46
|
+
ttk::style configure TCheckbutton -indicatorcolor "#ffffff" -padding 2
|
47
|
+
ttk::style configure TRadiobutton -indicatorcolor "#ffffff" -padding 2
|
48
|
+
ttk::style map TCheckbutton -indicatorcolor \
|
49
|
+
[list disabled $colors(-frame) pressed $colors(-frame)]
|
50
|
+
ttk::style map TRadiobutton -indicatorcolor \
|
51
|
+
[list disabled $colors(-frame) pressed $colors(-frame)]
|
52
|
+
|
53
|
+
ttk::style configure TMenubutton \
|
54
|
+
-width -11 -padding "3 3" -relief raised
|
55
|
+
|
56
|
+
ttk::style configure TEntry -padding 1
|
57
|
+
ttk::style map TEntry -fieldbackground \
|
58
|
+
[list readonly $colors(-frame) disabled $colors(-frame)]
|
59
|
+
ttk::style configure TCombobox -padding 1
|
60
|
+
ttk::style map TCombobox -fieldbackground \
|
61
|
+
[list readonly $colors(-frame) disabled $colors(-frame)]
|
62
|
+
ttk::style configure ComboboxPopdownFrame \
|
63
|
+
-relief solid -borderwidth 1
|
64
|
+
|
65
|
+
ttk::style configure TSpinbox -arrowsize 10 -padding {2 0 10 0}
|
66
|
+
ttk::style map TSpinbox -fieldbackground \
|
67
|
+
[list readonly $colors(-frame) disabled $colors(-frame)] \
|
68
|
+
-arrowcolor [list disabled $colors(-disabledfg)]
|
69
|
+
|
70
|
+
ttk::style configure Toolbutton -relief flat -padding 2
|
71
|
+
ttk::style map Toolbutton -relief \
|
72
|
+
{disabled flat selected sunken pressed sunken active raised}
|
73
|
+
ttk::style map Toolbutton -background \
|
74
|
+
[list pressed $colors(-darker) active $colors(-activebg)]
|
75
|
+
|
76
|
+
ttk::style configure TScrollbar -relief raised
|
77
|
+
|
78
|
+
ttk::style configure TLabelframe -relief groove -borderwidth 2
|
79
|
+
|
80
|
+
ttk::style configure TNotebook -tabmargins {2 2 1 0}
|
81
|
+
ttk::style configure TNotebook.Tab \
|
82
|
+
-padding {4 2} -background $colors(-darker)
|
83
|
+
ttk::style map TNotebook.Tab \
|
84
|
+
-background [list selected $colors(-frame)] \
|
85
|
+
-expand [list selected {2 2 1 0}] \
|
86
|
+
;
|
87
|
+
|
88
|
+
# Treeview:
|
89
|
+
ttk::style configure Heading -font TkHeadingFont -relief raised
|
90
|
+
ttk::style configure Treeview -background $colors(-window)
|
91
|
+
ttk::style map Treeview \
|
92
|
+
-background [list selected $colors(-selectbg)] \
|
93
|
+
-foreground [list selected $colors(-selectfg)] ;
|
94
|
+
|
95
|
+
ttk::style configure TScale \
|
96
|
+
-groovewidth 4 -troughrelief sunken \
|
97
|
+
-sliderwidth raised -borderwidth 2
|
98
|
+
ttk::style configure TProgressbar \
|
99
|
+
-background $colors(-selectbg) -borderwidth 0
|
100
|
+
}
|
101
|
+
}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
#
|
2
|
+
# Aqua theme (OSX native look and feel)
|
3
|
+
#
|
4
|
+
|
5
|
+
namespace eval ttk::theme::aqua {
|
6
|
+
ttk::style theme settings aqua {
|
7
|
+
|
8
|
+
ttk::style configure . \
|
9
|
+
-font TkDefaultFont \
|
10
|
+
-background systemWindowBody \
|
11
|
+
-foreground systemModelessDialogActiveText \
|
12
|
+
-selectbackground systemHighlight \
|
13
|
+
-selectforeground systemModelessDialogActiveText \
|
14
|
+
-selectborderwidth 0 \
|
15
|
+
-insertwidth 1
|
16
|
+
|
17
|
+
ttk::style map . \
|
18
|
+
-foreground {disabled systemModelessDialogInactiveText
|
19
|
+
background systemModelessDialogInactiveText} \
|
20
|
+
-selectbackground {background systemHighlightSecondary
|
21
|
+
!focus systemHighlightSecondary} \
|
22
|
+
-selectforeground {background systemModelessDialogInactiveText
|
23
|
+
!focus systemDialogActiveText}
|
24
|
+
|
25
|
+
# Workaround for #1100117:
|
26
|
+
# Actually, on Aqua we probably shouldn't stipple images in
|
27
|
+
# disabled buttons even if it did work...
|
28
|
+
ttk::style configure . -stipple {}
|
29
|
+
|
30
|
+
ttk::style configure TButton -anchor center -width -6
|
31
|
+
ttk::style configure Toolbutton -padding 4
|
32
|
+
|
33
|
+
ttk::style configure TNotebook -tabmargins {10 0} -tabposition n
|
34
|
+
ttk::style configure TNotebook -padding {18 8 18 17}
|
35
|
+
ttk::style configure TNotebook.Tab -padding {12 3 12 2}
|
36
|
+
|
37
|
+
# Combobox:
|
38
|
+
ttk::style configure TCombobox -postoffset {5 -2 -10 0}
|
39
|
+
|
40
|
+
# Treeview:
|
41
|
+
ttk::style configure Heading -font TkHeadingFont
|
42
|
+
ttk::style configure Treeview -rowheight 18 -background White
|
43
|
+
ttk::style map Treeview \
|
44
|
+
-background {{selected background} systemHighlightSecondary
|
45
|
+
selected systemHighlight}
|
46
|
+
|
47
|
+
# Enable animation for ttk::progressbar widget:
|
48
|
+
ttk::style configure TProgressbar -period 100 -maxphase 255
|
49
|
+
|
50
|
+
# For Aqua, labelframe labels should appear outside the border,
|
51
|
+
# with a 14 pixel inset and 4 pixels spacing between border and label
|
52
|
+
# (ref: Apple Human Interface Guidelines / Controls / Grouping Controls)
|
53
|
+
#
|
54
|
+
ttk::style configure TLabelframe \
|
55
|
+
-labeloutside true -labelmargins {14 0 14 4}
|
56
|
+
|
57
|
+
# TODO: panedwindow sashes should be 9 pixels (HIG:Controls:Split Views)
|
58
|
+
}
|
59
|
+
}
|
@@ -0,0 +1,140 @@
|
|
1
|
+
#
|
2
|
+
# "Clam" theme.
|
3
|
+
#
|
4
|
+
# Inspired by the XFCE family of Gnome themes.
|
5
|
+
#
|
6
|
+
|
7
|
+
namespace eval ttk::theme::clam {
|
8
|
+
variable colors
|
9
|
+
array set colors {
|
10
|
+
-disabledfg "#000000"
|
11
|
+
-frame "#000000"
|
12
|
+
-window "#000000"
|
13
|
+
-dark "#000000"
|
14
|
+
-darker "#000000"
|
15
|
+
-darkest "#000000"
|
16
|
+
-lighter "#000000"
|
17
|
+
-lightest "#000000"
|
18
|
+
-selectbg "#000000"
|
19
|
+
-selectfg "#000000"
|
20
|
+
}
|
21
|
+
|
22
|
+
ttk::style theme settings clam {
|
23
|
+
|
24
|
+
ttk::style configure "." \
|
25
|
+
-background $colors(-frame) \
|
26
|
+
-foreground black \
|
27
|
+
-bordercolor $colors(-darkest) \
|
28
|
+
-darkcolor $colors(-dark) \
|
29
|
+
-lightcolor $colors(-lighter) \
|
30
|
+
-troughcolor $colors(-darker) \
|
31
|
+
-selectbackground $colors(-selectbg) \
|
32
|
+
-selectforeground $colors(-selectfg) \
|
33
|
+
-selectborderwidth 0 \
|
34
|
+
-font TkDefaultFont \
|
35
|
+
;
|
36
|
+
|
37
|
+
ttk::style map "." \
|
38
|
+
-background [list disabled $colors(-frame) \
|
39
|
+
active $colors(-lighter)] \
|
40
|
+
-foreground [list disabled $colors(-disabledfg)] \
|
41
|
+
-selectbackground [list !focus $colors(-darkest)] \
|
42
|
+
-selectforeground [list !focus black] \
|
43
|
+
;
|
44
|
+
# -selectbackground [list !focus "#847d73"]
|
45
|
+
|
46
|
+
ttk::style configure TButton \
|
47
|
+
-anchor center -width -11 -padding 5 -relief raised
|
48
|
+
ttk::style map TButton \
|
49
|
+
-background [list \
|
50
|
+
disabled $colors(-frame) \
|
51
|
+
pressed $colors(-darker) \
|
52
|
+
active $colors(-lighter)] \
|
53
|
+
-lightcolor [list pressed $colors(-darker)] \
|
54
|
+
-darkcolor [list pressed $colors(-darker)] \
|
55
|
+
-bordercolor [list alternate "#000000"] \
|
56
|
+
;
|
57
|
+
|
58
|
+
ttk::style configure Toolbutton \
|
59
|
+
-anchor center -padding 2 -relief flat
|
60
|
+
ttk::style map Toolbutton \
|
61
|
+
-relief [list \
|
62
|
+
disabled flat \
|
63
|
+
selected sunken \
|
64
|
+
pressed sunken \
|
65
|
+
active raised] \
|
66
|
+
-background [list \
|
67
|
+
disabled $colors(-frame) \
|
68
|
+
pressed $colors(-darker) \
|
69
|
+
active $colors(-lighter)] \
|
70
|
+
-lightcolor [list pressed $colors(-darker)] \
|
71
|
+
-darkcolor [list pressed $colors(-darker)] \
|
72
|
+
;
|
73
|
+
|
74
|
+
ttk::style configure TCheckbutton \
|
75
|
+
-indicatorbackground "#000000" \
|
76
|
+
-indicatormargin {1 1 4 1} \
|
77
|
+
-padding 2 ;
|
78
|
+
ttk::style configure TRadiobutton \
|
79
|
+
-indicatorbackground "#000000" \
|
80
|
+
-indicatormargin {1 1 4 1} \
|
81
|
+
-padding 2 ;
|
82
|
+
ttk::style map TCheckbutton -indicatorbackground \
|
83
|
+
[list disabled $colors(-frame) pressed $colors(-frame)]
|
84
|
+
ttk::style map TRadiobutton -indicatorbackground \
|
85
|
+
[list disabled $colors(-frame) pressed $colors(-frame)]
|
86
|
+
|
87
|
+
ttk::style configure TMenubutton \
|
88
|
+
-width -11 -padding 5 -relief raised
|
89
|
+
|
90
|
+
ttk::style configure TEntry -padding 1 -insertwidth 1
|
91
|
+
ttk::style map TEntry \
|
92
|
+
-background [list readonly $colors(-frame)] \
|
93
|
+
-bordercolor [list focus $colors(-selectbg)] \
|
94
|
+
-lightcolor [list focus "#000000"] \
|
95
|
+
-darkcolor [list focus "#000000"] \
|
96
|
+
;
|
97
|
+
|
98
|
+
ttk::style configure TCombobox -padding 1 -insertwidth 1
|
99
|
+
ttk::style map TCombobox \
|
100
|
+
-background [list active $colors(-lighter) \
|
101
|
+
pressed $colors(-lighter)] \
|
102
|
+
-fieldbackground [list {readonly focus} $colors(-selectbg) \
|
103
|
+
readonly $colors(-frame)] \
|
104
|
+
-foreground [list {readonly focus} $colors(-selectfg)] \
|
105
|
+
;
|
106
|
+
ttk::style configure ComboboxPopdownFrame \
|
107
|
+
-relief solid -borderwidth 1
|
108
|
+
|
109
|
+
ttk::style configure TSpinbox -arrowsize 10 -padding {2 0 10 0}
|
110
|
+
ttk::style map TSpinbox \
|
111
|
+
-background [list readonly $colors(-frame)] \
|
112
|
+
-arrowcolor [list disabled $colors(-disabledfg)]
|
113
|
+
|
114
|
+
ttk::style configure TNotebook.Tab -padding {6 2 6 2}
|
115
|
+
ttk::style map TNotebook.Tab \
|
116
|
+
-padding [list selected {6 4 6 2}] \
|
117
|
+
-background [list selected $colors(-frame) {} $colors(-darker)] \
|
118
|
+
-lightcolor [list selected $colors(-lighter) {} $colors(-dark)] \
|
119
|
+
;
|
120
|
+
|
121
|
+
# Treeview:
|
122
|
+
ttk::style configure Heading \
|
123
|
+
-font TkHeadingFont -relief raised -padding {3} \
|
124
|
+
-background [list selected $colors(-selectbg)]
|
125
|
+
|
126
|
+
ttk::style configure Treeview -background $colors(-window)
|
127
|
+
ttk::style map Treeview \
|
128
|
+
-background [list selected $colors(-selectbg)] \
|
129
|
+
-foreground [list selected $colors(-selectfg)] ;
|
130
|
+
|
131
|
+
ttk::style configure TLabelframe \
|
132
|
+
-labeloutside true -labelmargins {0 0 0 4} \
|
133
|
+
-background [list selected $colors(-selectbg)] \
|
134
|
+
-borderwidth 2 -relief raised
|
135
|
+
|
136
|
+
ttk::style configure TProgressbar -background $colors(-frame)
|
137
|
+
|
138
|
+
ttk::style configure Sash -sashthickness 6 -gripcount 10
|
139
|
+
}
|
140
|
+
}
|
@@ -0,0 +1,108 @@
|
|
1
|
+
#
|
2
|
+
# "classic" Tk theme.
|
3
|
+
#
|
4
|
+
# Implements Tk's traditional Motif-like look and feel.
|
5
|
+
#
|
6
|
+
|
7
|
+
namespace eval ttk::theme::classic {
|
8
|
+
|
9
|
+
variable colors; array set colors {
|
10
|
+
-frame "#d9d9d9"
|
11
|
+
-window "#ffffff"
|
12
|
+
-activebg "#ececec"
|
13
|
+
-troughbg "#c3c3c3"
|
14
|
+
-selectbg "#c3c3c3"
|
15
|
+
-selectfg "#000000"
|
16
|
+
-disabledfg "#a3a3a3"
|
17
|
+
-indicator "#b03060"
|
18
|
+
}
|
19
|
+
|
20
|
+
ttk::style theme settings classic {
|
21
|
+
ttk::style configure "." \
|
22
|
+
-font TkDefaultFont \
|
23
|
+
-background $colors(-frame) \
|
24
|
+
-foreground black \
|
25
|
+
-selectbackground $colors(-selectbg) \
|
26
|
+
-selectforeground $colors(-selectfg) \
|
27
|
+
-troughcolor $colors(-troughbg) \
|
28
|
+
-indicatorcolor $colors(-frame) \
|
29
|
+
-highlightcolor $colors(-frame) \
|
30
|
+
-highlightthickness 1 \
|
31
|
+
-selectborderwidth 1 \
|
32
|
+
-insertwidth 2 \
|
33
|
+
;
|
34
|
+
|
35
|
+
# To match pre-Xft X11 appearance, use:
|
36
|
+
# ttk::style configure . -font {Helvetica 12 bold}
|
37
|
+
|
38
|
+
ttk::style map "." -background \
|
39
|
+
[list disabled $colors(-frame) active $colors(-activebg)]
|
40
|
+
ttk::style map "." -foreground \
|
41
|
+
[list disabled $colors(-disabledfg)]
|
42
|
+
|
43
|
+
ttk::style map "." -highlightcolor [list focus black]
|
44
|
+
|
45
|
+
ttk::style configure TButton \
|
46
|
+
-anchor center -padding "3m 1m" -relief raised -shiftrelief 1
|
47
|
+
ttk::style map TButton -relief [list {!disabled pressed} sunken]
|
48
|
+
|
49
|
+
ttk::style configure TCheckbutton -indicatorrelief raised
|
50
|
+
ttk::style map TCheckbutton \
|
51
|
+
-indicatorcolor [list \
|
52
|
+
pressed $colors(-frame) selected $colors(-indicator)] \
|
53
|
+
-indicatorrelief {selected sunken pressed sunken} \
|
54
|
+
;
|
55
|
+
|
56
|
+
ttk::style configure TRadiobutton -indicatorrelief raised
|
57
|
+
ttk::style map TRadiobutton \
|
58
|
+
-indicatorcolor [list \
|
59
|
+
pressed $colors(-frame) selected $colors(-indicator)] \
|
60
|
+
-indicatorrelief {selected sunken pressed sunken} \
|
61
|
+
;
|
62
|
+
|
63
|
+
ttk::style configure TMenubutton -relief raised -padding "3m 1m"
|
64
|
+
|
65
|
+
ttk::style configure TEntry -relief sunken -padding 1 -font TkTextFont
|
66
|
+
ttk::style map TEntry -fieldbackground \
|
67
|
+
[list readonly $colors(-frame) disabled $colors(-frame)]
|
68
|
+
ttk::style configure TCombobox -padding 1
|
69
|
+
ttk::style map TCombobox -fieldbackground \
|
70
|
+
[list readonly $colors(-frame) disabled $colors(-frame)]
|
71
|
+
ttk::style configure ComboboxPopdownFrame \
|
72
|
+
-relief solid -borderwidth 1
|
73
|
+
|
74
|
+
ttk::style configure TSpinbox -arrowsize 10 -padding {2 0 10 0}
|
75
|
+
ttk::style map TSpinbox -fieldbackground \
|
76
|
+
[list readonly $colors(-frame) disabled $colors(-frame)]
|
77
|
+
|
78
|
+
ttk::style configure TLabelframe -borderwidth 2 -relief groove
|
79
|
+
|
80
|
+
ttk::style configure TScrollbar -relief raised
|
81
|
+
ttk::style map TScrollbar -relief {{pressed !disabled} sunken}
|
82
|
+
|
83
|
+
ttk::style configure TScale -sliderrelief raised
|
84
|
+
ttk::style map TScale -sliderrelief {{pressed !disabled} sunken}
|
85
|
+
|
86
|
+
ttk::style configure TProgressbar -background SteelBlue
|
87
|
+
ttk::style configure TNotebook.Tab \
|
88
|
+
-padding {3m 1m} \
|
89
|
+
-background $colors(-troughbg)
|
90
|
+
ttk::style map TNotebook.Tab -background [list selected $colors(-frame)]
|
91
|
+
|
92
|
+
# Treeview:
|
93
|
+
ttk::style configure Heading -font TkHeadingFont -relief raised
|
94
|
+
ttk::style configure Treeview -background $colors(-window)
|
95
|
+
ttk::style map Treeview \
|
96
|
+
-background [list selected $colors(-selectbg)] \
|
97
|
+
-foreground [list selected $colors(-selectfg)] ;
|
98
|
+
|
99
|
+
#
|
100
|
+
# Toolbar buttons:
|
101
|
+
#
|
102
|
+
ttk::style configure Toolbutton -padding 2 -relief flat -shiftrelief 2
|
103
|
+
ttk::style map Toolbutton -relief \
|
104
|
+
{disabled flat selected sunken pressed sunken active raised}
|
105
|
+
ttk::style map Toolbutton -background \
|
106
|
+
[list pressed $colors(-troughbg) active $colors(-activebg)]
|
107
|
+
}
|
108
|
+
}
|
data/tcl/themes/ttk.tcl
ADDED
@@ -0,0 +1,176 @@
|
|
1
|
+
#
|
2
|
+
# Ttk widget set initialization script.
|
3
|
+
#
|
4
|
+
|
5
|
+
### Source library scripts.
|
6
|
+
#
|
7
|
+
|
8
|
+
namespace eval ::ttk {
|
9
|
+
variable library
|
10
|
+
if {![info exists library]} {
|
11
|
+
set library [file dirname [info script]]
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
source [file join $::ttk::library fonts.tcl]
|
16
|
+
source [file join $::ttk::library cursors.tcl]
|
17
|
+
source [file join $::ttk::library utils.tcl]
|
18
|
+
|
19
|
+
## ttk::deprecated $old $new --
|
20
|
+
# Define $old command as a deprecated alias for $new command
|
21
|
+
# $old and $new must be fully namespace-qualified.
|
22
|
+
#
|
23
|
+
proc ttk::deprecated {old new} {
|
24
|
+
interp alias {} $old {} ttk::do'deprecate $old $new
|
25
|
+
}
|
26
|
+
## do'deprecate --
|
27
|
+
# Implementation procedure for deprecated commands --
|
28
|
+
# issue a warning (once), then re-alias old to new.
|
29
|
+
#
|
30
|
+
proc ttk::do'deprecate {old new args} {
|
31
|
+
deprecated'warning $old $new
|
32
|
+
interp alias {} $old {} $new
|
33
|
+
uplevel 1 [linsert $args 0 $new]
|
34
|
+
}
|
35
|
+
|
36
|
+
## deprecated'warning --
|
37
|
+
# Gripe about use of deprecated commands.
|
38
|
+
#
|
39
|
+
proc ttk::deprecated'warning {old new} {
|
40
|
+
puts stderr "$old deprecated -- use $new instead"
|
41
|
+
}
|
42
|
+
|
43
|
+
### Backward-compatibility.
|
44
|
+
#
|
45
|
+
#
|
46
|
+
# Make [package require tile] an effective no-op;
|
47
|
+
# see SF#3016598 for discussion.
|
48
|
+
#
|
49
|
+
package ifneeded tile 0.8.6 { package provide tile 0.8.6 }
|
50
|
+
|
51
|
+
# ttk::panedwindow used to be named ttk::paned. Keep the alias for now.
|
52
|
+
#
|
53
|
+
::ttk::deprecated ::ttk::paned ::ttk::panedwindow
|
54
|
+
|
55
|
+
### ::ttk::ThemeChanged --
|
56
|
+
# Called from [::ttk::style theme use].
|
57
|
+
# Sends a <<ThemeChanged>> virtual event to all widgets.
|
58
|
+
#
|
59
|
+
proc ::ttk::ThemeChanged {} {
|
60
|
+
set Q .
|
61
|
+
while {[llength $Q]} {
|
62
|
+
set QN [list]
|
63
|
+
foreach w $Q {
|
64
|
+
event generate $w <<ThemeChanged>>
|
65
|
+
foreach child [winfo children $w] {
|
66
|
+
lappend QN $child
|
67
|
+
}
|
68
|
+
}
|
69
|
+
set Q $QN
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
### Public API.
|
74
|
+
#
|
75
|
+
|
76
|
+
proc ::ttk::themes {{ptn *}} {
|
77
|
+
set themes [list]
|
78
|
+
|
79
|
+
foreach pkg [lsearch -inline -all -glob [package names] ttk::theme::$ptn] {
|
80
|
+
lappend themes [namespace tail $pkg]
|
81
|
+
}
|
82
|
+
|
83
|
+
return $themes
|
84
|
+
}
|
85
|
+
|
86
|
+
## ttk::setTheme $theme --
|
87
|
+
# Set the current theme to $theme, loading it if necessary.
|
88
|
+
#
|
89
|
+
proc ::ttk::setTheme {theme} {
|
90
|
+
variable currentTheme ;# @@@ Temp -- [::ttk::style theme use] doesn't work
|
91
|
+
if {$theme ni [::ttk::style theme names]} {
|
92
|
+
package require ttk::theme::$theme
|
93
|
+
}
|
94
|
+
::ttk::style theme use $theme
|
95
|
+
set currentTheme $theme
|
96
|
+
}
|
97
|
+
|
98
|
+
### Load widget bindings.
|
99
|
+
#
|
100
|
+
source [file join $::ttk::library button.tcl]
|
101
|
+
source [file join $::ttk::library menubutton.tcl]
|
102
|
+
source [file join $::ttk::library scrollbar.tcl]
|
103
|
+
source [file join $::ttk::library scale.tcl]
|
104
|
+
source [file join $::ttk::library progress.tcl]
|
105
|
+
source [file join $::ttk::library notebook.tcl]
|
106
|
+
source [file join $::ttk::library panedwindow.tcl]
|
107
|
+
source [file join $::ttk::library entry.tcl]
|
108
|
+
source [file join $::ttk::library combobox.tcl] ;# dependency: entry.tcl
|
109
|
+
source [file join $::ttk::library spinbox.tcl] ;# dependency: entry.tcl
|
110
|
+
source [file join $::ttk::library treeview.tcl]
|
111
|
+
source [file join $::ttk::library sizegrip.tcl]
|
112
|
+
|
113
|
+
## Label and Labelframe bindings:
|
114
|
+
# (not enough to justify their own file...)
|
115
|
+
#
|
116
|
+
bind TLabelframe <<Invoke>> { tk::TabToWindow [tk_focusNext %W] }
|
117
|
+
bind TLabel <<Invoke>> { tk::TabToWindow [tk_focusNext %W] }
|
118
|
+
|
119
|
+
### Load settings for built-in themes:
|
120
|
+
#
|
121
|
+
proc ttk::LoadThemes {} {
|
122
|
+
variable library
|
123
|
+
|
124
|
+
# "default" always present:
|
125
|
+
uplevel #0 [list source [file join $library defaults.tcl]]
|
126
|
+
|
127
|
+
set builtinThemes [style theme names]
|
128
|
+
foreach {theme scripts} {
|
129
|
+
classic classicTheme.tcl
|
130
|
+
alt altTheme.tcl
|
131
|
+
clam clamTheme.tcl
|
132
|
+
winnative winTheme.tcl
|
133
|
+
xpnative {xpTheme.tcl vistaTheme.tcl}
|
134
|
+
aqua aquaTheme.tcl
|
135
|
+
} {
|
136
|
+
if {[lsearch -exact $builtinThemes $theme] >= 0} {
|
137
|
+
foreach script $scripts {
|
138
|
+
uplevel #0 [list source [file join $library $script]]
|
139
|
+
}
|
140
|
+
}
|
141
|
+
}
|
142
|
+
}
|
143
|
+
|
144
|
+
ttk::LoadThemes; rename ::ttk::LoadThemes {}
|
145
|
+
|
146
|
+
### Select platform-specific default theme:
|
147
|
+
#
|
148
|
+
# Notes:
|
149
|
+
# + On OSX, aqua theme is the default
|
150
|
+
# + On Windows, xpnative takes precedence over winnative if available.
|
151
|
+
# + On X11, users can use the X resource database to
|
152
|
+
# specify a preferred theme (*TkTheme: themeName);
|
153
|
+
# otherwise "default" is used.
|
154
|
+
#
|
155
|
+
|
156
|
+
proc ttk::DefaultTheme {} {
|
157
|
+
set preferred [list aqua vista xpnative winnative]
|
158
|
+
|
159
|
+
set userTheme [option get . tkTheme TkTheme]
|
160
|
+
if {$userTheme ne {} && ![catch {
|
161
|
+
uplevel #0 [list package require ttk::theme::$userTheme]
|
162
|
+
}]} {
|
163
|
+
return $userTheme
|
164
|
+
}
|
165
|
+
|
166
|
+
foreach theme $preferred {
|
167
|
+
if {[package provide ttk::theme::$theme] ne ""} {
|
168
|
+
return $theme
|
169
|
+
}
|
170
|
+
}
|
171
|
+
return "default"
|
172
|
+
}
|
173
|
+
|
174
|
+
ttk::setTheme [ttk::DefaultTheme] ; rename ttk::DefaultTheme {}
|
175
|
+
|
176
|
+
#*EOF*
|