@@ -2133,7 +2133,31 @@ proc setoptions {} {
21332133 option add *Listbox.font mainfont startupFile
21342134}
21352135
2136+ proc createttkimages {} {
2137+ global uicolor
2138+
2139+ image create bitmap img:myVerticalSash -foreground $uicolor -data {
2140+ #define xbm_width 5
2141+ #define xbm_height 47
2142+ static unsigned char xbm_bits[ ] = {
2143+ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
2144+ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x0e,
2145+ 0x00, 0x00, 0x0e, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
2146+ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 };
2147+ }
2148+
2149+ image create bitmap img:myHorizontalSash -foreground $uicolor -data {
2150+ #define xbm_width 47
2151+ #define xbm_height 5
2152+ static unsigned char xbm_bits[ ] = {
2153+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x04, 0x00, 0x00,
2154+ 0xff, 0xff, 0x93, 0xe4, 0xff, 0x7f, 0x00, 0x00, 0x90, 0x04, 0x00, 0x00,
2155+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
2156+ }
2157+ }
2158+
21362159proc setttkstyle {} {
2160+
21372161 eval font configure TkDefaultFont [ fontflags mainfont]
21382162 eval font configure TkTextFont [ fontflags textfont]
21392163 eval font configure TkHeadingFont [ fontflags mainfont]
@@ -2143,6 +2167,16 @@ proc setttkstyle {} {
21432167 eval font configure TkIconFont [ fontflags uifont]
21442168 eval font configure TkMenuFont [ fontflags uifont]
21452169 eval font configure TkSmallCaptionFont [ fontflags uifont]
2170+
2171+ createttkimages
2172+
2173+ ttk::style element create myVerticalSash image img:myVerticalSash -sticky ew
2174+
2175+ ttk::style element create myHorizontalSash image img:myHorizontalSash -sticky ns
2176+
2177+ ttk::style layout Vertical.Sash { myVerticalSash }
2178+
2179+ ttk::style layout Horizontal.Sash { myHorizontalSash }
21462180}
21472181
21482182# Make a menu and submenus.
@@ -11825,7 +11859,7 @@ proc prefspage_colors {notebook} {
1182511859 grid $page .cdisp - -sticky w -pady 10
1182611860 label $page .ui -padx 40 -relief sunk -background $uicolor
1182711861 ${NS} ::button $page .uibut -text [ mc " Interface" ] \
11828- -command [ list choosecolor uicolor {} $page .ui [mc " interface" ] setui ]
11862+ -command [ list choosecolor uicolor {} $page .ui [mc " interface" ] setui_dialog ]
1182911863 grid x $page .uibut $page .ui -sticky w
1183011864 label $page .bg -padx 40 -relief sunk -background $bgcolor
1183111865 ${NS} ::button $page .bgbut -text [ mc " Background" ] \
@@ -12006,6 +12040,14 @@ proc setui {c} {
1200612040 tk_setPalette background $c selectColor $selc
1200712041}
1200812042
12043+ proc setui_dialog {c} {
12044+ global uicolor
12045+
12046+ setui $c
12047+
12048+ createttkimages
12049+ }
12050+
1200912051proc setbg {c} {
1201012052 global bglist
1201112053
@@ -12706,8 +12748,6 @@ eval font create textfontbold [fontflags textfont 1]
1270612748parsefont uifont $uifont
1270712749eval font create uifont [ fontflags uifont]
1270812750
12709- setui $uicolor
12710-
1271112751setoptions
1271212752
1271312753# check that we can find a .git directory somewhere...
@@ -12788,6 +12828,8 @@ if {![info exists have_ttk]} {
1278812828set use_ttk [ expr {$have_ttk && $want_ttk }]
1278912829set NS [ expr {$use_ttk ? " ttk" : " " }]
1279012830
12831+ setui $uicolor
12832+
1279112833if {$use_ttk } {
1279212834 setttkstyle
1279312835}
0 commit comments