summaryrefslogtreecommitdiff
path: root/ui/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ui/util.cpp')
-rw-r--r--ui/util.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/util.cpp b/ui/util.cpp
index 9abdf6e8..853bd91b 100644
--- a/ui/util.cpp
+++ b/ui/util.cpp
@@ -85,6 +85,16 @@ wxString FreeFileSync::formatFilesizeToShortString(const double filesize)
}
+wxString FreeFileSync::fromatPercentage(const wxLongLong& dividend, const wxLongLong& divisor)
+{
+ const double ratio = dividend.ToDouble() * 100 / divisor.ToDouble();
+ wxString output = _("%x Percent");
+ output.Replace(wxT("%x"), wxString::Format(wxT("%3.2f"), ratio), false);
+ return output;
+}
+
+
+
wxString FreeFileSync::includeNumberSeparator(const wxString& number)
{
wxString output(number);
bgstack15