1# themeutils.tcl --- 2# ---------------------------------------------------------------------------- 3# Purpose: 4# This file is a contribution to the Unifix BWidget Toolkit. 5# An approach to re-vitalize the package and to take advantage of tile! 6# Author: Johann dot Oberdorfer at Googlemail dot com 7# 8# $Id: themeutils.tcl,v 1.04 2009/11/01 20:20:50 oberdorfer Exp $ 9# ---------------------------------------------------------------------------- 10# Index of commands: 11# - BWidget::use 12# - BWidget::using 13# - BWidget::wrap 14# - BWidget::set_themedefaults 15# - BWidget::getAvailableThemes 16# - BWidget::default_Color 17# - BWidget::[themename]_Color 18# - BWidget::_get_colordcls 19# - BWidget::_getSystemDefaultStyle 20# - BWidget::_read_ttk_current_theme 21# - BWidget::_getDefaultClassOpt 22# - BWidget::_read_ttkstylecolors 23# - BWidget::_themechanged 24# ---------------------------------------------------------------------------- 25# color mapping: 26# SystemWindow -background 27# SystemWindowFrame -background 28# SystemWindowText -foreground 29# SystemButtonText -activeforeground 30# SystemButtonFace -activebackground 31# SystemDisabledText -disabledforeground 32# SystemHighlight -selectbackground 33# SystemHighlightText -selectforeground 34# SystemMenu -background 35# SystemMenuText -foreground 36# SystemScrollbar -troughcolor 37# ---------------------------------------------------------------------------- 38 39# Notes: 40# 41# - Themed color declarations and names do not follow a strict rule, 42# so -most likely- there might be differences from theme to theme. 43# As a consequece of this fact, we have to support a minimum set 44# of color declarations which needs to be declared for most common 45# themes. Unsupported themes 'll fall back to the "default" color scheme. 46# 47# Further explanations: 48# - In respect of color settings, BW basically runs in 2 different modes: 49# 50# - without tile: 51# the standard initialization sequence (as usual) is: 52# "package require BWidget" 53# in this case, color codes are set according to the OS 54# currently running on and acc. to a predefined color scheme, 55# which is a "best guess" of what might look good for most of the 56# users ... 57# 58# - With tile - "themed": 59# See notes above. 60# In addition to the standard initialization sequence, 61# the following line must be present in order to activate theming: 62# "BWidget::usepackage ttk" 63# and within the code: 64# "BWidget::using ttk" 65# might be used to distinguish between the 2 different modes. 66# 67# - As themes are not support within the BW distribution (except some 68# themes found in the demo), a programmer needs to support prefered 69# theme packages separately. 70# A typical initialization code block might look like: 71# ... 72# lappend auto_path [where to find specific theme package] 73# set ctheme winxpblue 74# package require ttk::theme::${ctheme} 75# ttk::setTheme $ctheme 76# ... 77# 78# - In addition, a separate procedure must be provided, to manage 79# and control standard tk "widgets", which needs to be re-colorized 80# as well, when a <<ThemeChanged>> virtual event arises. 81# See code below, how a "BWidget::<mythemeName>_Color" procedure 82# looks like! 83#------------------------------------------------------------------------------ 84#------------------------------------------------------------------------------ 85 86namespace eval ::BWidget:: { 87 variable colors 88 variable _properties 89 90 set colors(style) default 91 92 array set _properties \ 93 [list \ 94 package "" \ 95 style "default" \ 96 setoptdb "no" \ 97 themedirs {} \ 98 ] 99} 100 101 102# BWidget::use 103# Argument usage: 104# -package ttk 105# | 106# specify a package name to be initialized, currently 107# support for the following packages is implemented: 108# ttk ... try to use tile'd widget set (if available) 109# 110# -style default / native / myFavoriteStyleName 111# | | | 112# | | specify a valid style name, 113# | | use "BWidget::_get_colordcls" which gives 114# | | you a list of what's avaliable for tk 115# | | 116# | if specified, BW tries to emulate OS color scheme, 117# | a specific color schema associated to each individual 118# | operationg system is going to be used 119# | 120# same behaviour as before, stay compatible 121# with previous releases 122# 123# -setoptdb [no=default|0|yes|1] 124# | 125# maintain the option database 126# if you need a dynamic behavior when changing 127# the underlying style, activate this option! 128# 129# -themedirs {} = default / a list of valid directory names, 130# to specifing additional ttk theme packages 131 132proc ::BWidget::use { args } { 133 variable _properties 134 135 # argument processing: 136 array set p { -package "" -style "" -setoptdb 0 -themedirs "" } 137 138 foreach {key value} $args { 139 if { ![info exists p($key)] } { 140 return -code error "[namespace current] - bad option: '$key'" 141 } 142 set p($key) $value 143 } 144 145 # -- package: 146 set package $p(-package) 147 if { [string length $package] > 0 && 148 ![info exists _properties($package)] } { 149 150 # each package supported to enhance BWidgets is setup here. 151 switch -- $package { 152 "ttk" { 153 154 # attempt to load tile package (with the required version) 155 # if { [catch {package present tile 0.8}] != 0 } { 156 # return -code error "Tile 0.8 is not available!" 157 # } 158 159 if { [catch {uplevel "#0" package require tile 0.8}] != 0 } { 160 set _properties($package) 0 161 } else { set _properties($package) 1 } 162 } 163 default { 164 return -code error \ 165 "[namespace current] bad option: '$package'" 166 } 167 } 168 } 169 170 # -- style: 171 if { [string length $p(-style)] > 0 } { 172 173 set _properties(style) $p(-style) 174 175 if { [string compare $p(-style) "native"] == 0 } { 176 set _properties(style) [_getSystemDefaultStyle] 177 } 178 } 179 180 # -- setoptdb: 181 if { [string length $p(-setoptdb)] > 0 } { 182 set _properties(setoptdb) \ 183 [regexp -nocase {^(1|yes|true|on)$} $p(-setoptdb)] 184 } 185 186 # -- themedirs: 187 if { [llength $p(-themedirs)] > 0 } { 188 foreach themedir $p(-themedirs) { 189 if { [file isdirectory $themedir] && 190 [lsearch $_properties(themedirs) $themedir] == -1 } { 191 192 # maintain auto_path for further usage of theme'd packages 193 if { [lsearch -exact ::auto_path $themedir] == -1 } { 194 lappend ::auto_path $themedir 195 } 196 197 lappend _properties(themedirs) $themedir 198 } 199 } 200 } 201 202 # perform required initializations 203 set_themedefaults $_properties(style) 204 205 # theme related bindings: 206 if { $_properties(setoptdb) != 0 } { 207 if {[lsearch [bindtags .] BWThemeChanged] < 0} { 208 bindtags . [linsert [bindtags .] 1 BWThemeChanged] 209 bind BWThemeChanged <<ThemeChanged>> \ 210 "+ [namespace current]::_themechanged" 211 } 212 } 213} 214 215 216proc ::BWidget::using { optName } { 217 variable _properties 218 219 if {[info exists _properties($optName)]} { 220 return $_properties($optName) 221 } 222 return 0 223} 224 225 226# a simple wrapper to distinguish between tk and ttk 227proc ::BWidget::wrap {wtype wpath args} { 228 229 set _ttkunsupported_opt \ 230 { -font -fg -foreground -background 231 -highlightthickness -bd -borderwidth 232 -padx -pady -anchor 233 -relief -selectforeground -selectbackground } 234 235 if { [using ttk] } { 236 # filter out (ttk-)unsupported (tk-)options: 237 foreach opt $$_ttkunsupported_opt { 238 set args [Widget::getArgument $args $opt tmp] 239 } 240 241 return [eval ttk::${wtype} $wpath $args] 242 } else { 243 return [eval $wtype $wpath $args] 244 } 245} 246 247 248# returns a list of themes, which are are declared as well for both: tk and ttk, 249# all other ttk themes, that might be available down below the given theme dir's 250# are skipped! 251 252proc ::BWidget::getAvailableThemes {} { 253 variable _properties 254 255 set themes [list default] 256 set tk_colordcls [_get_colordcls] 257 258 if { [BWidget::using ttk] } { 259 260 foreach themedir $_properties(themedirs) { 261 if { [file isdirectory $themedir] } { 262 foreach dir [glob -nocomplain [file join $themedir "*"]] { 263 set themeName [file tail $dir] 264 # check, if there is a corresponding color declaration available 265 if { [file isdirectory $dir] && 266 [lsearch $tk_colordcls $themeName] != -1 } { 267 lappend themes $themeName 268 }} 269 } 270 } 271 272 } else { 273 foreach dcls $tk_colordcls { 274 if { [lsearch $themes $dcls] == -1 } { 275 lappend themes $dcls 276 }} 277 } 278 279 return $themes 280} 281 282 283# returns the system default theme 284 285proc ::BWidget::_getSystemDefaultStyle {} { 286 287 if {$::tcl_version >= 8.4} { 288 set plat [tk windowingsystem] 289 if { $plat == "x11" } { 290 switch -- $::tcl_platform(os) { 291 "AIX" { set plat "AIX" } 292 "Darwin" { set plat "Darwin" } 293 } 294 } 295 } else { 296 set plat $::tcl_platform(platform) 297 } 298 299 switch -glob -- $plat { 300 "classic" - "aqua" - "Darwin" \ 301 { set style "aquativo" } 302 "win*" { set style "winxpblue" } 303 "AIX" { set style "grey" } 304 "x11" - 305 default { set style "default" } 306 } 307 308 return $style 309} 310 311 312proc ::BWidget::_read_ttk_current_theme {} { 313 314 if { [using ttk] } { 315 # future version: "return [ttk::style theme use]" 316 return $ttk::currentTheme 317 } 318 return "" 319} 320 321 322# arguments: 323# cname = a valid class name 324# e.g.: "foreground", "background", "font"... 325# return value: the desired option or an empty string 326# example call: 327# set fg [_getDefaultClassOpt "foreground" "nocache"] 328 329proc ::BWidget::_getDefaultClassOpt {cname {mode ""}} { 330 variable _class_options 331 332 # should we use the cached list? 333 if { $mode != "" || 334 ![info exists _class_options] || 335 [llength $_class_options] == 0 } { 336 337 # retrieve options from the listbox 338 339 set tmpWidget ".__tmp__" 340 set count 0 341 while {[winfo exists $tmpWidget] == 1} { 342 set tmpWidget ".__tmp__$count" 343 incr count 344 } 345 346 label $tmpWidget 347 set _class_options [$tmpWidget configure] 348 destroy $tmpWidget 349 } 350 351 # and now, we retrieve the option ... 352 # foreach c [lsort -dictionary $_class_options] { puts $c } 353 354 foreach opt $_class_options { 355 356 if {[llength $opt] == 5} { 357 set option [lindex $opt 1] 358 set value [lindex $opt 4] 359 360 if {$cname == $option} { 361 return $value 362 } 363 } 364 } 365 366 return "" 367} 368 369 370# this function is a replacement for [ttk::style configure .] 371# and takes as well the style decl's from the "default" style into account 372 373proc ::BWidget::_read_ttkstylecolors {} { 374 375 # default style comes 1st: 376 # temporarily sets the current theme to themeName, 377 # evaluate script, then restore the previous theme. 378 379 ttk::style theme settings "default" { 380 set cargs [ttk::style configure .] 381 } 382 383 # superseed color defaults with values from currently active theme: 384 foreach {opt val} [ttk::style configure .] { 385 if { [set idx [lsearch $cargs $opt]] == -1 } { 386 lappend cargs $opt $val 387 } else { 388 incr idx 389 if { ![string equal [lindex $cargs $idx] $val] } { 390 set cargs [lreplace $cargs $idx $idx $val] 391 } 392 } 393 } 394 395 return $cargs 396} 397 398 399proc ::BWidget::_createOrUpdateButtonStyles {} { 400 401 if { ![using ttk] } { return } 402 403 # create a new element for each available theme... 404 foreach themeName [ttk::style theme names] { 405 406 # temporarily sets the current theme to themeName, 407 # evaluate script, then restore the previous theme. 408 409 ttk::style theme settings $themeName { 410 411 # emulate tk behavior, referenced later on such like: 412 # -style "${relief}BW.Toolbutton" 413 414 ::ttk::style configure BWraised.Toolbutton -relief raised 415 ::ttk::style configure BWsunken.Toolbutton -relief sunken 416 ::ttk::style configure BWflat.Toolbutton -relief flat 417 ::ttk::style configure BWsolid.Toolbutton -relief solid 418 ::ttk::style configure BWgroove.Toolbutton -relief groove 419 ::ttk::style configure BWlink.Toolbutton -relief flat -bd 2 420 421 ::ttk::style map BWlink.Toolbutton \ 422 -relief [list {selected !disabled} sunken] 423 424 ::ttk::style configure BWSlim.Toolbutton -relief flat -bd 2 425 ::ttk::style map BWSlim.Toolbutton \ 426 -relief [list {selected !disabled} sunken] 427 } 428 } 429} 430 431 432# Purpose: 433# Sets the current style + default ttk (tyled) theme, 434# ensure, color related array: "BWidget::colors" is updated as well 435# 436# This procedure is called under the following conditions: 437# - When initializing the package, to make sure, that the default 438# style is set (which basically establishes a color array with 439# predefined colors). 440# - In any case a style has changed, if a ttk theme driven style is 441# changed, the virtual event <<ThemeChanged>> is fired, which in turn 442# causes this function to be called. 443 444proc ::BWidget::set_themedefaults { {styleName ""} } { 445 variable colors 446 variable _properties 447 variable _previous_style 448 449 if { $styleName != "" } { 450 set cstyle $styleName 451 } else { 452 set cstyle $colors(style) 453 } 454 455 # determine, it style has changed in the meantime... 456 if { [info exists _previous_style] && 457 [string compare $_previous_style $cstyle] == 0 } { 458 return 459 } 460 set _previous_style $cstyle 461 462 # style name available ? 463 if { [lsearch [_get_colordcls] $cstyle] == -1 } { 464 return -code error \ 465 "specified style '$cstyle' is not available!" 466 } 467 468 # evaluate procedure where the naming matches the currently active theme: 469 if { [catch { "${cstyle}_Color" }] != 0 } { 470 default_Color 471 } 472 473 if { ![using ttk] } { 474 if { $_properties(setoptdb) != 0 } { 475 event generate . <<ThemeChanged>> 476 } 477 478 return 479 } 480 481 # if not already set, try to set specified ttk style as well 482 if { [string compare [_read_ttk_current_theme] $cstyle] != 0 } { 483 484 uplevel "#0" package require ttk::theme::${cstyle} 485 ttk::setTheme $cstyle 486 } 487 488 # superseed color options from the ones provided by ttk theme (if available), 489 # to fit as close as possible with the curent style, if one of the refered 490 # option is not provided (which is most likely the case), we take the ones 491 # which are declared by our own! 492 493 # "-selectbackground" { set colors(SystemHighlight) $val } 494 # "-selectforeground" { set colors(SystemHighlightText) $val } 495 496 foreach {opt val} [BWidget::_read_ttkstylecolors] { 497 switch -- $opt { 498 "-foreground" { set colors(SystemWindowText) $val } 499 "-background" { set colors(SystemWindowFrame) $val } 500 "-troughcolor" { set colors(SystemScrollbar) $val } 501 } 502 } 503 504 _createOrUpdateButtonStyles 505} 506 507 508proc ::BWidget::_themechanged {} { 509 variable _properties 510 511 set_themedefaults 512 513 # proceed in case the user really want's this behaviour - might cause some 514 # side effects - as the option settings are affecting almost everything... 515 if { $_properties(setoptdb) == 0 } { 516 return 517 } 518 519 # -- propagate new color settings: 520 # note: 521 # modifying the option database doesn't affect existing widgets, 522 # only new widgets 'll be taken into account 523 # 524 # Priorities: 525 # widgetDefault: 20 / userDefault: 60 526 # startupFile: 40 / interactive: 80 (D) 527 set prio "userDefault" 528 529 option add *background $BWidget::colors(SystemWindowFrame) $prio 530 option add *foreground $BWidget::colors(SystemWindowText) $prio 531 option add *selectbackground $BWidget::colors(SystemHighlight) $prio 532 option add *selectforeground $BWidget::colors(SystemHighlightText) $prio 533 534 option add *Entry.highlightColor $BWidget::colors(SystemHighlight) $prio 535 option add *Entry.highlightThickness 2 $prio 536 537 option add *Text.background $BWidget::colors(SystemWindow) $prio 538 option add *Text.foreground $BWidget::colors(SystemWindowText) $prio 539 option add *Text.highlightBackground \ 540 $BWidget::colors(SystemHighlight) $prio 541 542 # -- modify existing tk widgts... 543 set standard_dcls [list \ 544 [list -background $BWidget::colors(SystemWindowFrame)] \ 545 [list -foreground $BWidget::colors(SystemWindowText)] \ 546 [list -highlightColor $BWidget::colors(SystemHighlight)] \ 547 [list -highlightBackground $BWidget::colors(SystemHighlight)] \ 548 [list -selectbackground $BWidget::colors(SystemHighlight)] \ 549 [list -selectforeground $BWidget::colors(SystemHighlightText)] \ 550 ] 551 552 set menu_dcls [list \ 553 [list -background $BWidget::colors(SystemMenu)] \ 554 [list -foreground $BWidget::colors(SystemMenuText)] \ 555 [list -activebackground $BWidget::colors(SystemHighlight)] \ 556 [list -activeforeground $BWidget::colors(SystemHighlightText)] \ 557 ] 558 559 # filter out: 560 # - ttk witdgets, which do not support a "-style" argument, 561 # - as well as custom widgets 562 # widgets which fail to have an argument list at all are skipped 563 564 set custom_classes { 565 ComboBox ListBox MainFrame ScrollableFrame Tree 566 ScrolledWindow PanedWindow LabelFrame TitleFrame NoteBook 567 DragSite DropSite Listbox SelectFont ButtonBox DynamicHelp 568 ArrowButton LabelEntry SpinBox Separator 569 TLabel TFrame ProgressBar ComboboxPopdown 570 Canvas Entry Text 571 } 572 573 set widget_list {} 574 foreach w [Widget::getallwidgets .] { 575 set nostyle 0 576 if { [lsearch $custom_classes [winfo class $w]] == -1 && 577 [catch {$w configure} cargs] == 0 } { 578 foreach item $cargs { 579 if { [string compare [lindex $item 0] "-style"] != 0 } { 580 set nostyle 1 581 break 582 } 583 } 584 } 585 if { $nostyle == 1 } { lappend widget_list $w } 586 } 587 588 # o.k now for processing the color adjustment... 589 590 foreach child $widget_list { 591 set wclass [winfo class $child] 592 593 switch -- $wclass { 594 "Menu" { set col_dcls [lrange $menu_dcls 0 end] } 595 default { set col_dcls [lrange $standard_dcls 0 end] } 596 } 597 foreach citem $col_dcls { 598 set copt [lindex $citem 0] 599 set cval [lindex $citem 1] 600 601 foreach optitem [$child configure] { 602 if { [lsearch $optitem $copt] != -1 } { 603 catch { $child configure $copt $cval } 604 } 605 } 606 } 607 } 608} 609 610 611#------------------------------------------------------------------------------ 612# color declarations and related functions 613#------------------------------------------------------------------------------ 614 615proc ::BWidget::_get_colordcls { } { 616 set stylelist {} 617 set keyword "_Color" 618 foreach name [info proc] { 619 if { [regexp -all -- $keyword $name] } { 620 set nlen [string length $name] 621 set klen [string length $keyword] 622 set stylename [string range $name 0 [expr {$nlen - $klen - 1}]] 623 # ![regexp -nocase -- "default" $stylename] 624 lappend stylelist $stylename 625 } 626 } 627 return [lsort -dictionary $stylelist] 628} 629 630 631proc ::BWidget::default_Color { } { 632 variable colors 633 set colors(style) "default" 634 635 # !!! doesn't work on winxp64 636 # + starpacked executable from equi4 637 # if {[string equal $::tcl_platform(platform) "---windows---"]} { 638 # array set colors { 639 # SystemWindow SystemWindow 640 # SystemWindowFrame SystemWindowFrame 641 # SystemWindowText SystemWindowText 642 # SystemButtonFace SystemButtonFace 643 # SystemButtonText SystemButtonText 644 # SystemDisabledText SystemDisabledText 645 # SystemHighlight SystemHighlight 646 # SystemHighlightText SystemHighlightText 647 # SystemMenu SystemMenu 648 # SystemMenuText SystemMenuText 649 # SystemScrollbar SystemScrollbar 650 # } 651 # } 652 653 # try to stay compatible as much as possible, 654 # therefor we try to map tk option database with the color array: 655 656 array set colors { 657 SystemWindow "Black" 658 SystemWindowFrame "#d9d9d9" 659 SystemWindowText "Black" 660 SystemButtonFace "#d9d9d9" 661 SystemButtonText "Black" 662 SystemDisabledText "#a3a3a3" 663 SystemHighlight "#c3c3c3" 664 SystemHighlightText "White" 665 SystemMenu "#d9d9d9" 666 SystemMenuText "Black" 667 SystemScrollbar "#d9d9d9" 668 } 669 670 # override our own defaults with 671 # colors from the option database (if available): 672 673 foreach {colSynonym colOptName} \ 674 { SystemWindow background 675 SystemWindowFrame background 676 SystemWindowText foreground 677 SystemButtonText activeForeground 678 SystemButtonFace activeBackground 679 SystemDisabledText disabledForeground 680 SystemHighlight selectBackground 681 SystemHighlightText selectForeground 682 SystemMenu background 683 SystemMenuText foreground 684 SystemScrollbar troughcolor } { 685 686 set opt [_getDefaultClassOpt $colOptName] 687 688 if { [string length $opt] > 0 } { 689 # puts "$colSynonym : $colOptName : $opt" 690 set colors($colSynonym) $opt 691 } 692 } 693} 694 695 696proc ::BWidget::grey_Color { } { 697 variable colors 698 set colors(style) "grey" 699 700 array set colors { 701 SystemWindow "#6e7c94" 702 SystemWindowFrame "#788c9c" 703 SystemWindowText "White" 704 SystemButtonFace "#6e7c94" 705 SystemButtonText "Black" 706 SystemDisabledText "#aaaaaa" 707 SystemHighlight "DarkGrey" 708 SystemHighlightText "White" 709 SystemMenu "#6e7c94" 710 SystemMenuText "White" 711 SystemScrollbar "#788c9c" 712 } 713 714 option add *highlightThickness 1 715 option add *HighlightColor $colors(SystemHighlight) 716 option add *highlightBackground $colors(SystemWindowFrame) 717} 718 719 720proc ::BWidget::winxpblue_Color { } { 721 variable colors 722 set colors(style) "winxpblue" 723 724 array set colors { 725 Style "winxpblue" 726 SystemWindow "White" 727 SystemWindowFrame "#ece9d8" 728 SystemWindowText "Black" 729 SystemButtonFace "#d9d9d9" 730 SystemButtonText "Black" 731 SystemDisabledText "#a3a3a3" 732 SystemHighlight "#c1d2ee" 733 SystemHighlightText "Black" 734 SystemMenu "LightGrey" 735 SystemMenuText "Black" 736 SystemScrollbar "#d9d9d9" 737 } 738} 739 740proc ::BWidget::plastik_Color { } { 741 variable colors 742 set colors(style) "plastik" 743 744 array set colors { 745 SystemWindow "LightGrey" 746 SystemWindowFrame "#efefef" 747 SystemWindowText "Black" 748 SystemButtonFace "#efefef" 749 SystemButtonText "Black" 750 SystemDisabledText "#aaaaaa" 751 SystemHighlight "#c3c3c3" 752 SystemHighlightText "Black" 753 SystemMenu "LightGrey" 754 SystemMenuText "Black" 755 SystemScrollbar "#efefef" 756 } 757} 758 759proc ::BWidget::keramik_Color { } { 760 variable colors 761 set colors(style) "keramik" 762 763 array set colors { 764 SystemWindow "#ffffff" 765 SystemWindowFrame "#dddddd" 766 SystemWindowText "Black" 767 SystemButtonFace "#efefef" 768 SystemButtonText "Black" 769 SystemDisabledText "#aaaaaa" 770 SystemHighlight "#eeeeee" 771 SystemHighlightText "Black" 772 SystemMenu "LightGrey" 773 SystemMenuText "Black" 774 SystemScrollbar "#efefef" 775 } 776} 777 778proc ::BWidget::keramik_alt_Color { } { 779 keramik_Color 780 set colors(style) "keramik_alt" 781 782} 783 784proc ::BWidget::black_Color { } { 785 variable colors 786 set colors(style) "black" 787 788 array set colors { 789 SystemWindow "#424242" 790 SystemWindowFrame "#424242" 791 SystemWindowText "Black" 792 SystemButtonFace "#efefef" 793 SystemButtonText "Black" 794 SystemDisabledText "DarkGrey" 795 SystemHighlight "Black" 796 SystemHighlightText "LightGrey" 797 SystemMenu "#222222" 798 SystemMenuText "#ffffff" 799 SystemScrollbar "#626262" 800 } 801} 802 803 804proc ::BWidget::aquativo_Color { } { 805 variable colors 806 set colors(style) "aquativo" 807 808 array set colors { 809 SystemWindow "#EDF3FE" 810 SystemWindowFrame "White" 811 SystemWindowText "Black" 812 SystemButtonFace "#fafafa" 813 SystemButtonText "Black" 814 SystemDisabledText "#fafafa" 815 SystemHighlight "RoyalBlue" 816 SystemHighlightText "White" 817 SystemMenu "LightGrey" 818 SystemMenuText "Black" 819 SystemScrollbar "White" 820 } 821} 822 823