|
发表于 2004-12-17 11:47:30
|
显示全部楼层
[quote:29040ded96="KanKer"]辛苦你啦,呵呵,刚又根据IE的显示将下划线下移了一个像素。补丁如下,你有时间便重新编译一下kdelibs吧:-)
[code:1]
--- kdelibs-3.3.1/khtml/rendering/font.cpp 2004-12-14 02:12:49.000000000 -0500
+++ kdelibs-3.3.1-new/khtml/rendering/font.cpp 2004-12-14 02:02:24.000000000 -0500
@@ -400,8 +400,8 @@
int thickness = fm.height() > 20 ? fm.lineWidth() : 1;
QBrush brush = pt->pen().color();
if (deco & UNDERLINE) {
- int underlineOffset = ( fm.height() + baseline ) / 2;
- if (underlineOffset <= baseline) underlineOffset = baseline+1;
+ int underlineOffset = ( fm.height() + baseline ) / 2 + 2 ;
+ if (underlineOffset <= baseline+2) underlineOffset = baseline+3;
pt->fillRect(_tx, _ty + underlineOffset, width + 1, thickness, brush );
}
--- kdelibs-3.3.1/khtml/rendering/render_line.cpp 2004-12-14 02:12:49.660125712 -0500
+++ kdelibs-3.3.1-new/khtml/rendering/render_line.cpp 2004-12-13 23:07:56.000000000 -0500
@@ -604,8 +604,8 @@
if (!parent())
object()->getTextDecorationColors(deco, underline, overline, linethrough);
if (deco & UNDERLINE) {
- int underlineOffset = ( fm.height() + m_baseline ) / 2;
- if (underlineOffset <= m_baseline) underlineOffset = m_baseline+1;
+ int underlineOffset = ( fm.height() + m_baseline ) / 2 + 2 ;
+ if (underlineOffset <= m_baseline+2) underlineOffset = m_baseline+3;
pI.p->fillRect(_tx, _ty + underlineOffset, w, thickness, underline );
}
[/code:1][/quote]
改大了,有点过,应该减回1。 |
|