Eskil

Check-in [5d5fdb0972]
Login

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

Overview
Comment:Allow deleting of balloon. Handle Notebook balloon.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5d5fdb0972eb6c96daa62ca243ebe5438c5ecd2544e48b47456893fa84864387
User & Date: peter 2024-03-07 22:05:53.943
Context
2024-03-07
22:06
Ignore short unknowns on command line check-in: a9aaeae7c7 user: peter tags: trunk
22:05
Allow deleting of balloon. Handle Notebook balloon. check-in: 5d5fdb0972 user: peter tags: trunk
21:29
Added -nospace option to sort plugin. check-in: 08aa583d40 user: peter tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to eskil.vfs/lib/psballoon/psballoon.tcl.
116
117
118
119
120
121
122









123
124
125
126
127
128
129

    set c [winfo class $W]
    if {$msg == "" && $c != "Listbox" && $c != "Label"} {
        error "Missing message to balloon for $W ($c)"
    }
    set balloon(msg,$W) $msg
    set balloon(frame,$W) $frame









    bind $W <Enter> {
        set ::psballoon::balloon(pending) 1
        set ::psballoon::balloon(created) 0
        set ::psballoon::balloon(lastX) %X
        set ::psballoon::balloon(lastY) %Y
        set ::psballoon::balloon(id) [after 500 {psballoon::createBalloon %W %x %y}]
    }







>
>
>
>
>
>
>
>
>







116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138

    set c [winfo class $W]
    if {$msg == "" && $c != "Listbox" && $c != "Label"} {
        error "Missing message to balloon for $W ($c)"
    }
    set balloon(msg,$W) $msg
    set balloon(frame,$W) $frame

    if {$msg eq "_"} {
        bind $W <Enter> ""
        bind $W <Button> ""
        bind $W <Leave> ""
        bind $W <Motion> ""
        return
    }

    bind $W <Enter> {
        set ::psballoon::balloon(pending) 1
        set ::psballoon::balloon(created) 0
        set ::psballoon::balloon(lastX) %X
        set ::psballoon::balloon(lastY) %Y
        set ::psballoon::balloon(id) [after 500 {psballoon::createBalloon %W %x %y}]
    }
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
    if {$font eq ""} {
        set font TkDefaultFont
    }

    # Widget Geometry
    set wWidth [winfo width $W]
    set wHeight [winfo height $W]
    if {[winfo class $W] in {TLabelframe Labelframe}} {
        # Put it below the label, not the entire widget.
        # 1.5 font heights is a reasonable guess
        set fontHeight [font metrics $font -linespace]
        set wHeight [expr {$fontHeight * 3 /2 }]
        # Below cursor at least
        if {$wHeight <= $mouseY} {
            set wHeight [expr {$mouseY + 5}]







|







235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
    if {$font eq ""} {
        set font TkDefaultFont
    }

    # Widget Geometry
    set wWidth [winfo width $W]
    set wHeight [winfo height $W]
    if {[winfo class $W] in {TLabelframe Labelframe TNotebook}} {
        # Put it below the label, not the entire widget.
        # 1.5 font heights is a reasonable guess
        set fontHeight [font metrics $font -linespace]
        set wHeight [expr {$fontHeight * 3 /2 }]
        # Below cursor at least
        if {$wHeight <= $mouseY} {
            set wHeight [expr {$mouseY + 5}]