From 96acc1c542c200e30896793bff5242e20d8e71a1 Mon Sep 17 00:00:00 2001 From: David Roundy Date: Fri, 10 Aug 2007 19:37:46 +0200 Subject: center prompt text in window. darcs-hash:20070810173746-72aca-add5457dcb36c22bed178f9db5ae560229912d2d.gz --- XPrompt.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'XPrompt.hs') diff --git a/XPrompt.hs b/XPrompt.hs index c00f8d9..30b567a 100644 --- a/XPrompt.hs +++ b/XPrompt.hs @@ -380,7 +380,7 @@ printPrompt drw gc fontst = do ht = height c (fsl,psl) = (textWidth fontst f, textWidth fontst p) (_,asc,desc,_) = textExtents fontst str - y = fi $ (ht + fi (asc + desc)) `div` 2 + y = fi $ ((ht - fi (asc + desc)) `div` 2) + fi asc x = (asc + desc) `div` 2 fgcolor <- io $ initColor d $ fgColor c bgcolor <- io $ initColor d $ bgColor c -- cgit v1.2.3