summaryrefslogtreecommitdiff
path: root/internal/display/tooltip.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-18 10:10:39 +0200
committerPaul Buetow <paul@buetow.org>2026-02-18 10:10:39 +0200
commit69f5017434298f1ffd4cdc30c30b95d0f4bd344f (patch)
treec41a378bc8c4c7338f392cde7a4185658d4dfb12 /internal/display/tooltip.go
parentf1951f2ee1e83d802030c257d4a1df099ec08976 (diff)
refactor: enforce Go best practices (function size, ordering, formatting)
- config: split set() (62L) into setSizeAndTuning() + setDisplayFlags() - collector: split Run() (70L) into Run + startLocalScanner + startRemoteScanner + parseCollectorStream + dispatchCollectorLine; each <30L - collector: remove unused script_embed.go (RemoteScript was dead code) - display: move newRunState constructor before Run() per constructor-first rule - display: replace loadPeak IIFE with a plain initLoadPeak variable - display: split handleKey() (114L) into handleToggleKeys + handleAdjustAndSave + handleResizeKeys; add nil guard in handleResizeKeys for test safety - display: split drawNetBarSmoothed() (75L) into drawNetBarSmoothed + smoothNetUtilization + drawNetHalves; each <30L - all: gofmt -w to fix formatting drift in display and config files All tests pass (go test ./...). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/display/tooltip.go')
-rw-r--r--internal/display/tooltip.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/display/tooltip.go b/internal/display/tooltip.go
index 77ee365..e612b2c 100644
--- a/internal/display/tooltip.go
+++ b/internal/display/tooltip.go
@@ -16,9 +16,9 @@ import (
const mouseIdleTimeout = 3 * time.Second
const (
- tooltipScale int32 = 2 // pixel scale for bitmap font
- tooltipPadX int32 = 6 // horizontal padding inside tooltip box
- tooltipPadY int32 = 4 // vertical padding inside tooltip box
+ tooltipScale int32 = 2 // pixel scale for bitmap font
+ tooltipPadX int32 = 6 // horizontal padding inside tooltip box
+ tooltipPadY int32 = 4 // vertical padding inside tooltip box
tooltipOffsetX int32 = 12 // offset from cursor to tooltip
tooltipOffsetY int32 = 12
)