Skip to content

Commit bdebe41

Browse files
committed
[GUI] comma char replaced thin space on html formatted balance.
1 parent fd63c44 commit bdebe41

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/qt/bitcoinunits.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ QString BitcoinUnits::formatWithUnit(int unit, const CAmount& amount, bool pluss
208208
QString BitcoinUnits::formatHtmlWithUnit(int unit, const CAmount& amount, bool plussign, SeparatorStyle separators)
209209
{
210210
QString str(formatWithUnit(unit, amount, plussign, separators));
211-
str.replace(QChar(THIN_SP_CP), QString(THIN_SP_HTML));
211+
str.replace(QChar(THIN_SP_CP), QString(COMMA_HTML));
212212
return QString("<span style='white-space: nowrap;'>%1</span>").arg(str);
213213
}
214214

@@ -235,7 +235,7 @@ QString BitcoinUnits::floorWithUnit(int unit, const CAmount& amount, bool plussi
235235
QString BitcoinUnits::floorHtmlWithUnit(int unit, const CAmount& amount, bool plussign, SeparatorStyle separators, bool cleanRemainderZeros, bool isZPIV)
236236
{
237237
QString str(floorWithUnit(unit, amount, plussign, separators, cleanRemainderZeros, isZPIV));
238-
str.replace(QChar(THIN_SP_CP), QString(THIN_SP_HTML));
238+
str.replace(QChar(THIN_SP_CP), QString(COMMA_HTML));
239239
return QString("<span style='white-space: nowrap;'>%1</span>").arg(str);
240240
}
241241

src/qt/bitcoinunits.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
#define REAL_THIN_SP_UTF8 "\xE2\x80\x89"
1818
#define REAL_THIN_SP_HTML "&thinsp;"
1919

20+
#define COMMA_CP 0x2C
21+
#define COMMA_UTF8 "\x2C"
22+
#define COMMA_HTML "&#44;"
23+
2024
// U+200A HAIR SPACE = UTF-8 E2 80 8A
2125
#define HAIR_SP_CP 0x200A
2226
#define HAIR_SP_UTF8 "\xE2\x80\x8A"

0 commit comments

Comments
 (0)