aboutsummaryrefslogtreecommitdiffstats
path: root/ui.go
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2024-01-22 17:19:33 -0500
committerSam Anthony <sam@samanthony.xyz>2024-01-22 17:19:33 -0500
commit5e59867578f01fdaa5a62558cf23935b95e807ad (patch)
treea88c243d14731d569d7426fb62be41b3346aae93 /ui.go
parent4f9e220638ea62443db25d252c4e12ede2c7f9c5 (diff)
downloadpfc-5e59867578f01fdaa5a62558cf23935b95e807ad.zip
rename angle mode constants
Diffstat (limited to 'ui.go')
-rw-r--r--ui.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/ui.go b/ui.go
index d98577a..6a56bd9 100644
--- a/ui.go
+++ b/ui.go
@@ -49,7 +49,7 @@ func (ui UI) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
ui.calc.buf = ""
ui.calc.stack = ui.calc.stack[:0]
case "A":
- ui.calc.anglem = !ui.calc.anglem
+ ui.calc.angleMode = !ui.calc.angleMode
case "N":
ui.calc.negate()
case "+", "-", "*", "/", "%", "^":
@@ -81,7 +81,7 @@ func (ui UI) View() string {
width := min(ui.width, maxWidth)
// Angle mode.
- s += fmt.Sprintf("%*s\n", width-1, ui.calc.anglem)
+ s += fmt.Sprintf("%*s\n", width-1, ui.calc.angleMode)
// Stack.
top := boxTop(width)
@@ -101,11 +101,11 @@ func (ui UI) View() string {
func padding(ui UI) string {
var ( // Number of lines occupied by each ui element.
- anglem = 1
- stack = len(ui.calc.stack) + 2
- buf = 3
+ angleMode = 1
+ stack = len(ui.calc.stack) + 2
+ buf = 3
)
- padlines := ui.height - anglem - stack - buf
+ padlines := ui.height - angleMode - stack - buf
if padlines < 1 {
return ""
}