Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Tsw: Code cleanup. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
0f25a8799105dc37ab0d2fd02516bd71 |
User & Date: | csaba 2025-07-28 13:17:51.558 |
Context
2025-07-29
| ||
13:55 | Tsw: Made sure that tsw::toggleswitch and future ttk::toggleswitch widgets won't conflict. Leaf check-in: 79bfeabd8f user: csaba tags: trunk | |
2025-07-28
| ||
13:17 | Tsw: Code cleanup. check-in: 0f25a87991 user: csaba tags: trunk | |
2025-07-25
| ||
18:39 | Tsw: Optimized the resource management. check-in: 141f0f50ca user: csaba tags: trunk | |
Changes
Changes to modules/tsw/scripts/toggleswitch.tcl.
︙ | ︙ | |||
116 117 118 119 120 121 122 | 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 } } | | | 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | 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. } bind TswScale <Button-1> { tsw::onButton1 %W %x %y } bind TswScale <B1-Motion> { tsw::onB1Motion %W %x %y } bind TswScale <ButtonRelease-1> { tsw::onButtonRel1 %W } bind TswScale <space> { tsw::onSpace %W } } # |
︙ | ︙ | |||
636 637 638 639 640 641 642 | return "" } set curElem [$w identify element $x $y] if {[string match "*.slider" $stateArr(prevElem)] && [string match "*.trough" $curElem]} { startToggling $w | | | | 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 | return "" } set curElem [$w identify element $x $y] if {[string match "*.slider" $stateArr(prevElem)] && [string match "*.trough" $curElem]} { startToggling $w } elseif {$x < 0} { startMovingLeft $w } elseif {$x >= [winfo width $w]} { startMovingRight $w } set stateArr(prevElem) $curElem } else { variable scaled4 if {!$stateArr(dragging) && abs($x - $stateArr(startX)) > $scaled4} { |
︙ | ︙ | |||
748 749 750 751 752 753 754 | set val [expr {$val - 1}] $w set $val if {$val > [$w cget -from]} { after 10 [list tsw::moveLeft $w $val] } else { | | | 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 | set val [expr {$val - 1}] $w set $val if {$val > [$w cget -from]} { after 10 [list tsw::moveLeft $w $val] } else { $w state selected ;# restores the original selected state set win [winfo parent $w] ::$win switchstate 0 upvar ::tsw::ns${win}::data data set data(moveState) moved } } |
︙ | ︙ | |||
785 786 787 788 789 790 791 | set val [expr {$val + 1}] $w set $val if {$val < [$w cget -to]} { after 10 [list tsw::moveRight $w $val] } else { | | | 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 | set val [expr {$val + 1}] $w set $val if {$val < [$w cget -to]} { after 10 [list tsw::moveRight $w $val] } else { $w state !selected ;# restores the original !selected state set win [winfo parent $w] ::$win switchstate 1 upvar ::tsw::ns${win}::data data set data(moveState) moved } } |
︙ | ︙ |