Eskil

Diff
Login

Differences From Artifact [b5442090c4]:

To Artifact [d100cd6397]:


116
117
118
119
120
121
122









123
124
125
126
127
128
129
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
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}} {
    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}]