OSDN Git Service
(root)
/
kde
/
Katie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e434e8f
)
ensure width is not affected by negative outline contours in QFontMetrics/QFontMetricsF
author
Ivailo Monev
<xakepa10@gmail.com>
Mon, 17 Jan 2022 17:00:50 +0000
(19:00 +0200)
committer
Ivailo Monev
<xakepa10@gmail.com>
Mon, 17 Jan 2022 17:00:50 +0000
(19:00 +0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/gui/text/qfontmetrics.cpp
patch
|
blob
|
history
diff --git
a/src/gui/text/qfontmetrics.cpp
b/src/gui/text/qfontmetrics.cpp
index
bba3bb3
..
edb3bb2
100644
(file)
--- a/
src/gui/text/qfontmetrics.cpp
+++ b/
src/gui/text/qfontmetrics.cpp
@@
-409,7
+409,7
@@
bool QFontMetrics::inFontUcs4(uint ucs4) const
*/
int QFontMetrics::width(const QString &text) const
{
- return boundingRect(text).width();
+ return boundingRect(
QRect(0,0,0,0), Qt::TextDontPrint,
text).width();
}
/*!
@@
-1106,7
+1106,7
@@
bool QFontMetricsF::inFontUcs4(uint ucs4) const
*/
qreal QFontMetricsF::width(const QString &text) const
{
- return boundingRect(text).width();
+ return boundingRect(
QRectF(0,0,0,0), Qt::TextDontPrint,
text).width();
}
/*!