Changeset 1906 for trunk


Ignore:
Timestamp:
Sep 7, 2010 8:04:11 PM (14 years ago)
Author:
mmc
Message:

Fixed the bug report dialog so that it recenters itself on the screen
after you click on "Show Details...". This makes the dialog a little
taller, and in some cases it was falling off the bottom of the screen.
It now recenters itself, and if it's too tall, it shows the buttons
on the bottom.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/bugreport.tcl

    r1904 r1906  
    8181        pack .bugreport.comments -after .bugreport.details \
    8282            -expand yes -fill both -padx 8 -pady {0 8}
     83
     84        update idletasks
     85        set w [winfo reqwidth .bugreport]
     86        set h [winfo reqheight .bugreport]
     87        set x [expr {([winfo screenwidth .bugreport]-$w)/2}]
     88        if {$x < 0} {set x "+0"} else {set x "+$x"}
     89        set y [expr {([winfo screenheight .bugreport]-$h)/2}]
     90        if {$y < 0} {set y "-0"} else {set y "+$y"}
     91
     92        wm geometry .bugreport $x$y
     93        raise .bugreport
    8394        return
    8495    }
Note: See TracChangeset for help on using the changeset viewer.