Skip to content

Commit

Permalink
feat: Add horizontal padding to section titles
Browse files Browse the repository at this point in the history
  • Loading branch information
eslam-allam committed Apr 10, 2024
1 parent 6cb9842 commit 9e1e444
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion models/overlay/overlay.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package overlay

import (
"bytes"
"fmt"
"math"
"strings"

Expand Down Expand Up @@ -180,5 +181,5 @@ func PlaceTitle(title, body string, positionX, positionY float64, padding ...int

titlePosX := int(math.Floor(float64(bodyWidth)*positionX)) + px
titlePosY := int(math.Floor(float64(bodyHeight)*positionY)) + py
return PlaceOverlay(titlePosX, titlePosY, title, body)
return PlaceOverlay(titlePosX, titlePosY, fmt.Sprintf(" %s ", title), body)
}

0 comments on commit 9e1e444

Please sign in to comment.