Allow customization of digits grouping space size
Issue #515
closed
Originally reported on Google Code with ID 515
Hello,
thanks for making speedcrunch. So far I use web2.0calc.com, which in my opinion is
absolutely awesome, but I sometimes need an offline solution.
In my opinion, the one feature that is missing in speedcrunch is the ability to have
a (configurable) thousands separator. In addition it would be good to have the number
formatted in thousands as you type it (see web2.0calc.com for an example). Being an
investor, it is crucial for me that I get the number of zeros right (usually 10^6-10^9).
Many thanks in advance.
Kind regards,
Florian
Reported by florian.trippel
on 2014-07-30 13:23:34
Comments (13)
-
Account Deleted -
Account Deleted Hi, Florian. Maybe it's a nice addition indeed to allow 1, 2 or 3 spacings in between. I need to check whether this is actually possible, because there is actually no space in there, it's instead a special Unicode character that hints the font renderer to add spacing (that won't exist on copy/paste).
Reported by
helder.pereira.correia
on 2014-08-03 18:04:21 - Status changed:Accepted
- Labels added: Milestone-0.12 -
Account Deleted Actually, this is not a special Unicode character, but a formatting rule, like padding and margin in CSS. Customizing the space size is definitely possible with current implementation (check the groupSpacing variable in SyntaxHighlighter::groupDigits()), but replacing the space with a real character is not. The latter would require changes in the evaluator to distinguish between the digit and decimal separators (which depend on the user language).
Reported by
teyut@free.fr
on 2014-08-03 22:11:19 -
Account Deleted Thanks, Tey. I actually re-read the relevant code after my reply and saw how it was implemented. It is indeed almost trivial to configure the spacing. Customizing a string should not be a solution IMO though. Let me know if you'd like to add the feature yourself.
Reported by
helder.pereira.correia
on 2014-08-04 08:24:49 -
Account Deleted Patch attached :) Basically, the patch changes Settings::digitGrouping from bool to int, its value being the number of spaces to use to separate the digits groups (from 0 to 3). There's no compatibility issue with the content of previous version settings files as bool can be converted transparently to int by QSettings. Translations, '&' menu keys and hotkeys are missing.
Reported by
teyut@free.fr
on 2014-08-05 23:06:51<hr> * Attachment: issue515_digitGroupSpaces.patch
-
Account Deleted Tey, I'm having problems applying the patch. Can you please put it on a branch of yours and make a pull request on GitHub? Actually, please do that whenever you have a patch, it's way easier for me to review and merge it. Thanks!
Reported by
helder.pereira.correia
on 2014-08-06 11:56:57 -
Account Deleted My bad: I thought I had patched the official repository, but it was mine instead (which was not up to date). I've just posted a proper pull request on GitHub: https://github.com/speedcrunch/SpeedCrunch/pull/35
Reported by
teyut@free.fr
on 2014-08-06 20:32:30 -
Account Deleted Added in revision b75c1d6. Thanks, Tey!
Reported by
helder.pereira.correia
on 2014-08-06 20:45:41 - Status changed:Fixed
-
Account Deleted Thank you
Reported by
florian.trippel
on 2014-08-06 21:12:24 -
Account Deleted Reported by
helder.pereira.correia
on 2014-08-07 07:47:46 - Labels added: Type-Enhancement -
repo owner -
repo owner - changed status to closed
-
repo owner - changed component to userinterface
- Log in to comment
Reported by
florian.trippel
on 2014-07-30 13:29:24