calculator: append '...' to truncated numbers

pull/3562/head
Flaparoo 2024-09-11 07:08:22 +08:00
parent dbeeee980f
commit 6bf66d5fa2
2 changed files with 2 additions and 2 deletions

View File

@ -5,4 +5,4 @@
0.05: Grid positioning and swipe controls to switch between numbers, operators and special (for Bangle.js 2)
0.06: Bangle.js 2: Exit with a short press of the physical button
0.07: Bangle.js 2: Exit by pressing upper left corner of the screen
0.08: truncate long numbers (and append '-' to displayed value)
0.08: truncate long numbers (and append '...' to displayed value)

View File

@ -233,7 +233,7 @@ function displayOutput(num) {
num = num.replace("-","- "); // fix padding for '-'
g.setFont('7x11Numeric7Seg', 2);
if (num.length > RESULT_MAX_LEN) {
num = num.substr(0, RESULT_MAX_LEN - 1)+'-';
num = num.substr(0, RESULT_MAX_LEN - 1)+'...';
}
}
g.setFontAlign(1,0);