Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Tsw: Minor improvements. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
a5d49dd445781f3e33c02970134bd4a1 |
User & Date: | csaba 2025-07-24 17:11:15.897 |
Context
2025-07-24
| ||
17:16 | Tsw: Corrected a typo. check-in: 8723831003 user: csaba tags: trunk | |
17:11 | Tsw: Minor improvements. check-in: a5d49dd445 user: csaba tags: trunk | |
2025-07-16
| ||
16:36 | Removed superfluous close-brace. check-in: c7ec0962c1 user: clif tags: trunk | |
Changes
Changes to modules/tsw/scripts/elements.tcl.
︙ | ︙ | |||
120 121 122 123 124 125 126 | ] } set elemInfoArr(default) 1 } #------------------------------------------------------------------------------ | | | | | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | ] } set elemInfoArr(default) 1 } #------------------------------------------------------------------------------ # tsw::createElements_defaultDark #------------------------------------------------------------------------------ proc tsw::createElements_defaultDark {} { variable elemInfoArr if {[info exists elemInfoArr(defaultDark)]} { return "" } set troughData(1) { <svg width="32" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg"> <rect x="0" y="0" width="32" height="16" rx="8" } set troughData(2) { |
︙ | ︙ | |||
233 234 235 236 237 238 239 | selected $sliderImg \ disabled $sliderOffDisabledImg \ pressed $sliderImg \ active $sliderImg \ ] } | | | 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | selected $sliderImg \ disabled $sliderOffDisabledImg \ pressed $sliderImg \ active $sliderImg \ ] } set elemInfoArr(defaultDark) 1 } #------------------------------------------------------------------------------ # tsw::createElements_clam #------------------------------------------------------------------------------ proc tsw::createElements_clam {} { set troughData(1) { |
︙ | ︙ |
Changes to modules/tsw/scripts/tclIndex.
1 2 3 4 5 6 7 8 9 10 | # Tcl autoload index file, version 2.0 # This file is generated by the "auto_mkindex" command # and sourced to set up indexing information for one or # more commands. Typically each line is a command that # sets an element in the auto_index array, where the # element name is the name of a command and the value is # a script that loads the command. set auto_index(::tsw::svgFormat) [list source [file join $dir elements.tcl]] set auto_index(::tsw::createElements_default) [list source [file join $dir elements.tcl]] | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # Tcl autoload index file, version 2.0 # This file is generated by the "auto_mkindex" command # and sourced to set up indexing information for one or # more commands. Typically each line is a command that # sets an element in the auto_index array, where the # element name is the name of a command and the value is # a script that loads the command. set auto_index(::tsw::svgFormat) [list source [file join $dir elements.tcl]] set auto_index(::tsw::createElements_default) [list source [file join $dir elements.tcl]] set auto_index(::tsw::createElements_defaultDark) [list source [file join $dir elements.tcl]] set auto_index(::tsw::createElements_clam) [list source [file join $dir elements.tcl]] set auto_index(::tsw::createElements_droid) [list source [file join $dir elements.tcl]] set auto_index(::tsw::createElements_plastik) [list source [file join $dir elements.tcl]] set auto_index(::tsw::createElements_awarc) [list source [file join $dir elements.tcl]] set auto_index(::tsw::createElements_awbreeze) [list source [file join $dir elements.tcl]] set auto_index(::tsw::createElements_awbreezedark) [list source [file join $dir elements.tcl]] set auto_index(::tsw::createElements_awlight) [list source [file join $dir elements.tcl]] |
︙ | ︙ |
Changes to modules/tsw/scripts/toggleswitch.tcl.
︙ | ︙ | |||
87 88 89 90 91 92 93 | variable theme set themeMod $theme set mod "" if {$theme eq "default"} { set fg [ttk::style lookup . -foreground] if {[mwutil::isColorLight $fg]} { | | | < < < | | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | variable theme set themeMod $theme set mod "" if {$theme eq "default"} { set fg [ttk::style lookup . -foreground] if {[mwutil::isColorLight $fg]} { set themeMod defaultDark set mod "Dark" } } variable elemInfoArr if {[info exists elemInfoArr($themeMod)]} { if {$theme eq "aqua"} { updateElements_$theme } return "" } switch $themeMod { default - defaultDark - clam - droid - plastik - awarc - awbreeze - awbreezedark - awlight - awdark - vista - aqua { createElements_$themeMod } winnative - xpnative { ttk::style theme settings vista { createElements_vista } foreach n {1 2 3} { ttk::style element create Switch$n.trough from vista ttk::style element create Switch$n.slider from vista } } default { set fg [ttk::style lookup . -foreground {} black] if {[mwutil::isColorLight $fg] || [string match -nocase *dark* $theme]} { set mod "Dark" } ttk::style theme settings default { CreateElements_default$mod } foreach n {1 2 3} { ttk::style element create ${mod}Switch$n.trough from default ttk::style element create ${mod}Switch$n.slider from default } } } set elemInfoArr($themeMod) 1 |
︙ | ︙ | |||
184 185 186 187 188 189 190 | proc tsw::createBindings {} { bind Toggleswitch <KeyPress> continue bind Toggleswitch <FocusIn> { if {[focus -lastfor %W] eq "%W"} { focus %W.scl } } | | < > > | 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | proc tsw::createBindings {} { bind Toggleswitch <KeyPress> continue bind Toggleswitch <FocusIn> { if {[focus -lastfor %W] eq "%W"} { focus %W.scl } } bind Toggleswitch <Destroy> { tsw::onDestroy %W } bindtags . [linsert [bindtags .] 1 TswMain] foreach event {<<ThemeChanged>> <<LightAqua>> <<DarkAqua>>} { bind TswMain $event { tsw::onThemeChanged %W } } # # Define the binding tag ToggleswitchKeyNav # mwutil::defineKeyNav Toggleswitch bind TswScale <<ThemeChanged>> { tsw::onThemeChanged %W } variable onAndroid if {!$onAndroid} { bind TswScale <Enter> { %W instate !disabled {%W state active} } bind TswScale <Leave> { %W state !active } } bind TswScale <B1-Leave> { # Preserves the "active" state. } |
︙ | ︙ | |||
669 670 671 672 673 674 675 | #------------------------------------------------------------------------------ proc tsw::onThemeChanged w { variable theme [ttk::style theme use] if {$w eq "."} { condMakeLayouts } else { | < | | < | | 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 | #------------------------------------------------------------------------------ proc tsw::onThemeChanged w { variable theme [ttk::style theme use] if {$w eq "."} { condMakeLayouts } else { set stateSpec [$w state !disabled] ;# needed for $w set $w set [expr {[$w instate selected] ? [$w cget -to] : [$w cget -from]}] $w state $stateSpec ;# restores the state } } #------------------------------------------------------------------------------ # tsw::onButton1 #------------------------------------------------------------------------------ proc tsw::onButton1 {w x y} { |
︙ | ︙ |