Changeset 4678 for trunk/gui/scripts/bugreport.tcl
- Timestamp:
- Nov 9, 2014, 10:11:48 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/1.3 merged: 4571
- Property svn:mergeinfo changed
-
trunk/gui/scripts/bugreport.tcl
r4660 r4678 87 87 set h [winfo reqheight .bugreport] 88 88 89 set rootx [winfo rootx .main] 90 set rooty [winfo rooty .main] 91 set mw [winfo reqwidth .main] 92 set mh [winfo reqheight .main] 93 94 set x [expr { $rootx + (($mw-$w)/2) }] 95 if {$x < 0} {set x 0} 96 set y [expr { $rooty + (($mh-$h)/2) }] 97 if {$y < 0} {set y 0} 98 89 set x [winfo rootx .main] 90 set y [winfo rooty .main] 91 92 set mw [winfo width .main] 93 if { $mw == 1 } { 94 set mw [winfo reqwidth .main] 95 } 96 set mh [winfo height .main] 97 if { $mh == 1 } { 98 set mh [winfo reqwidth .main] 99 } 100 if { $mw > $w } { 101 set x [expr { $x + (($mw-$w)/2) }] 102 } 103 if { $mh > $h } { 104 set y [expr { $y + (($mh-$h)/2) }] 105 } 99 106 wm geometry .bugreport +$x+$y 100 107 raise .bugreport … … 151 158 set h [winfo reqheight .bugreport] 152 159 153 set rootx [winfo rootx .main] 154 set rooty [winfo rooty .main] 155 set mw [winfo reqwidth .main] 156 set mh [winfo reqheight .main] 157 158 set x [expr { $rootx + (($mw-$w)/2) }] 159 if {$x < 0} {set x 0} 160 set y [expr { $rooty + (($mh-$h)/2) }] 161 if {$y < 0} {set y 0} 160 set x [winfo rootx .main] 161 set y [winfo rooty .main] 162 163 set mw [winfo width .main] 164 if { $mw == 1 } { 165 set mw [winfo reqwidth .main] 166 } 167 set mh [winfo height .main] 168 if { $mh == 1 } { 169 set mh [winfo reqwidth .main] 170 } 171 172 if { $mw > $w } { 173 set x [expr { $x + (($mw-$w)/2) }] 174 } 175 if { $mh > $h } { 176 set y [expr { $y + (($mh-$h)/2) }] 177 } 162 178 163 179 wm geometry .bugreport +$x+$y
Note: See TracChangeset
for help on using the changeset viewer.