aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd/util.go
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-02-23 15:56:08 +0900
committernsfisis <nsfisis@gmail.com>2026-02-23 15:56:08 +0900
commita97d7d3d47eb8114e2847f643398991677030a55 (patch)
treedfba8a36f6ea653e759be4ddb9e51b20a1bc04f0 /cmd/util.go
parentc865d2d9d41719e56bc7f6e4eca6078ee402c291 (diff)
downloadterm-clock-a97d7d3d47eb8114e2847f643398991677030a55.tar.gz
term-clock-a97d7d3d47eb8114e2847f643398991677030a55.tar.zst
term-clock-a97d7d3d47eb8114e2847f643398991677030a55.zip
chore: use modern api; go mod tidyHEADmain
Diffstat (limited to 'cmd/util.go')
-rw-r--r--cmd/util.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/cmd/util.go b/cmd/util.go
index 93199da..0508e62 100644
--- a/cmd/util.go
+++ b/cmd/util.go
@@ -15,10 +15,7 @@ func calcSquareSize(scr *term.Screen) (int, int, int, int) {
// # # # # # # # # # |
// ### ### ### ### v
squareW := scrW / (17 + 2)
- squareH := scrH / (5 + 2)
- if squareH > squareW {
- squareH = squareW
- }
+ squareH := min(scrH/(5+2), squareW)
if squareW > squareH*3/2 {
squareW = squareH * 3 / 2
}