Tk Library Source Code

Check-in [c7ec0962c1]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Removed superfluous close-brace.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: c7ec0962c167840257c736db71887839c61c9fe8f5657a99152df31987485a17
User & Date: clif 2025-07-16 16:36:42.832
Context
2025-07-24
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
11:16
Tsw: Added/updated a few comments in toggleswitch.tcl. check-in: 9282d3aaae user: csaba tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to modules/controlwidget/vertical_meter.tcl.
58
59
60
61
62
63
64
65

66
67
68
69
70
71
72
#    -width       - Width of the meter.                                 (static)
#    -variable    - Variable the meter will track.                      (dynamic)
#    -majorticks  - Interval between major (labelled) ticks.            (dynamic)
#    -minorticks  - Number of minor ticks drawn between major ticks.    (dynamic)
#    -log         - True if should be log scale                         (dynamic).
#
# Methods:
#    set value    - Set the meter to a specific value (if -variable is defined it is modified).

#    get          - Returns the current value of the meter.

package provide meter 1.0
package require Tk
package require snit
package require bindDown








|
>







58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#    -width       - Width of the meter.                                 (static)
#    -variable    - Variable the meter will track.                      (dynamic)
#    -majorticks  - Interval between major (labelled) ticks.            (dynamic)
#    -minorticks  - Number of minor ticks drawn between major ticks.    (dynamic)
#    -log         - True if should be log scale                         (dynamic).
#
# Methods:
#    set value    - Set the meter to a specific value 
#                   (if -variable is defined it is modified).
#    get          - Returns the current value of the meter.

package provide meter 1.0
package require Tk
package require snit
package require bindDown

626
627
628
629
630
631
632
633
634

635
636
637
638
639
640
641

        set needleWidth   [expr {3*($meterRight - $meterLeft)/4}]
        set needleHeight  [$axis computeHeight   \
                             [expr {($to + $from)/2}]]
        set needleLeft   [expr $options(-width) - $needleWidth]

        set needleId [$win.c create line $needleLeft $needleHeight      \
                                         $options(-width) $needleHeight -tags {needle arrow} \
                                        -arrow first -fill $options(-arrowcolor) -width $options(-arrowthickness)]]


        set needleHalo [$win.c create rectangle $needleLeft [expr {$needleHeight-3}]      \
                                                $options(-width) [expr {$needleHeight+3}] -fill $options(-background) \
                                                -outline $options(-background) -tags needle]
        $win.c lower $needleHalo









|
|
>







627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643

        set needleWidth   [expr {3*($meterRight - $meterLeft)/4}]
        set needleHeight  [$axis computeHeight   \
                             [expr {($to + $from)/2}]]
        set needleLeft   [expr $options(-width) - $needleWidth]

        set needleId [$win.c create line $needleLeft $needleHeight      \
                    $options(-width) $needleHeight -tags {needle arrow} \
                    -arrow first -fill $options(-arrowcolor) \
		    -width $options(-arrowthickness)]

        set needleHalo [$win.c create rectangle $needleLeft [expr {$needleHeight-3}]      \
                                                $options(-width) [expr {$needleHeight+3}] -fill $options(-background) \
                                                -outline $options(-background) -tags needle]
        $win.c lower $needleHalo