-
Hello all, I was wondering if there's anyway to format a float in .slint markup, to avoid having to do the formatting in my rust code. I want to do something like Follow up question is, can I just insert a snippet of rust code into a slint file somehow? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Right now you can do: We do need better way to do such formatting, and i think it could be done in a locale definite way through the @tr() macro in the future. |
Beta Was this translation helpful? Give feedback.
Right now you can do:
"" + (Math.round(2.342342525 * 100) / 100)
We do need better way to do such formatting, and i think it could be done in a locale definite way through the @tr() macro in the future.
(slightly related: #3597 and #586 )