commit 3c47257395be99d5eff67dc6bfb11ac3f06b377d
parent 1327b81ec14fc81ecf086fafc2851d89346ce010
Author: Ryan Culpepper <ryanc@racket-lang.org>
Date: Mon, 11 Sep 2006 01:02:19 +0000
Fixed width calculation
svn: r4301
original commit: 407339e9353558e3428289d3dc99ad4dfd0ed8d9
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/collects/macro-debugger/syntax-browser/widget.ss b/collects/macro-debugger/syntax-browser/widget.ss
@@ -31,7 +31,6 @@
(define -props-panel (new horizontal-panel% (parent -split-panel)))
(define props (new properties-view% (parent -props-panel)))
(define -saved-panel-percentages #f)
- (define canvas-width #f)
(define controller
(new syntax-controller%
@@ -129,7 +128,8 @@
(define style-list (send -text get-style-list))
(define standard (send style-list find-named-style "Standard"))
(define char-width (send standard get-text-width (send -ecanvas get-dc)))
- (inexact->exact (floor (/ (send -ecanvas get-width) char-width))))
+ (define-values (canvas-w canvas-h) (send -ecanvas get-client-size))
+ (sub1 (inexact->exact (floor (/ canvas-w char-width)))))
(super-new)))