Square button corners and keyboard press feedback - #7
Conversation
When % follows any pending operator, show the running total with the percent applied as soon as % is pressed: - 200 + 10% displays 220 - 200 − 10% displays 180 - 200 × 10% displays 20 - 200 ÷ 10% displays 2000 The evaluated expression is preserved as "200 + 10%" instead of the intermediate "200 + 20", making the calculation easier to read. On its own, x% still divides by 100.
When a long number forced the display font to shrink, the Text item's implicit height shrank with it and the number crept upward. Give the display its own area below the expression, align the text to the bottom of that area, and raise the minimum pixel size from 22 to 32 so long results still look like part of the display instead of a tiny label.
Reads two optional display preferences from ~/.config/Omacom/omacalc.conf: - decimalSeparator (dot/comma) lets numbers be typed and shown with a Brazilian-style comma instead of a period. Internal parsing and math stay locale-independent; only the presented digits and the decimal key label change. - fixedDecimalPlaces rounds non-integer results to a fixed number of decimals (e.g. 10 / 3 -> 3.33), while whole-number results keep showing as plain integers. Left unset, formatting is unchanged. Chained operands and expressions reflect the same rounding as the result they came from, instead of leaking full floating-point precision.
c447131 to
d64c8e0
Compare
|
Reviewed the four commits this branch adds on top of Three things worth acting on. Squash the feedback commits. The pressed state can stick on.
Smaller: One worry that turned out not to be real, so you do not need to chase it: scaling the root Finally, a note for whoever merges rather than for you: this branch also carries PRs 1, 2 and 3, so merging it merges those as well. |
Removes rounded corners from keypad buttons and adds a visible press feedback effect that also triggers when typing on the physical keyboard, matching Omarchy's flat aesthetic.