summaryrefslogtreecommitdiffstats
path: root/app/Ui.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/Ui.hs')
-rw-r--r--app/Ui.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/Ui.hs b/app/Ui.hs
index 808c3c1..34fa101 100644
--- a/app/Ui.hs
+++ b/app/Ui.hs
@@ -97,12 +97,13 @@ layOut env@Env {..} (Ui' cs) = do
extents :: Env -> C -> IO Rect
extents Env {..} (C {..}) = do
glyphInfo <- X.xftTextExtents dpy fnt string
+ ascent <- X.xftfont_ascent fnt
pure
( Rect
- { top = 0,
- left = 0,
+ { top = X.xglyphinfo_y glyphInfo,
+ left = X.xglyphinfo_x glyphInfo,
width = X.xglyphinfo_xOff glyphInfo,
- height = X.xglyphinfo_height glyphInfo
+ height = ascent
}
)