From e14bd229926234e8c6da7b0c8bf9058078dc691d Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 27 May 2006 03:17:30 +0000 Subject: [PATCH] more consistent button-region label centering svn: r3080 --- collects/games/cards/classes.ss | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/collects/games/cards/classes.ss b/collects/games/cards/classes.ss index ba8ded40a4..92e5e73222 100644 --- a/collects/games/cards/classes.ss +++ b/collects/games/cards/classes.ss @@ -147,7 +147,12 @@ (send dc draw-text text (+ dx sx (/ (- sw x) 2)) (if (region-button? region) - (+ dy sy (/ (- sh (- y d a)) 2) (- a)) + ;; Since we use size-in-pixels, the letters + ;; should really be 12 pixels high (including + ;; the descender), but the space above the letter + ;; can vary by font; center on 12, splitting + ;; the difference for the descender + (+ dy sy (/ (- sh 12) 2) (- 12 y (/ d -2))) (+ dy sy 5)))) (send dc set-font old-f)) (send dc draw-bitmap text