summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/CDrawBuffer.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-reader/CDrawBuffer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/CDrawBuffer.cpp25
1 files changed, 21 insertions, 4 deletions
diff --git a/noncore/apps/opie-reader/CDrawBuffer.cpp b/noncore/apps/opie-reader/CDrawBuffer.cpp
index bfb3027..227f0f6 100644
--- a/noncore/apps/opie-reader/CDrawBuffer.cpp
+++ b/noncore/apps/opie-reader/CDrawBuffer.cpp
@@ -366,2 +366,3 @@ int CDrawBuffer::offset(int scwidth, unsigned short _lborder, unsigned short _rb
case m_AlignLeft:
+ case m_AlignNone:
currentx = _lborder + leftMargin();
@@ -486,3 +487,3 @@ void CDrawBuffer::render(QPainter* _p, int _y, bool _bMono, int _charWidth, int
#if defined(OPIE) || !defined(USEQPE)
- _p->setPen(QPen(QColor(currentstyle.Red(), currentstyle.Green(), currentstyle.Blue()), fc->getsize(currentstyle)/100));
+ _p->setPen(QPen(QColor(currentstyle.Red(), currentstyle.Green(), currentstyle.Blue()), fc->getsize(currentstyle)/10/*0*/));
#else
@@ -660,3 +661,3 @@ CStyle CDrawBuffer::firststyle()
-linkType CDrawBuffer::getLinkType(int numchars, size_t& tgt, size_t& offset, size_t& pictgt, QImage*& img)
+linkType CDrawBuffer::getLinkType(int numchars, size_t& tgt, size_t& offset, size_t& pictgt, QImage*& img, size_t& tabletgt)
{
@@ -692,2 +693,7 @@ linkType CDrawBuffer::getLinkType(int numchars, size_t& tgt, size_t& offset, siz
}
+ if (currentstyle.isTable())
+ {
+ tabletgt = currentstyle.getTable();
+ ret |= eTable;
+ }
return ret;
@@ -718,3 +724,3 @@ void CDrawBuffer::resize(int availht)
{
-
+ int p_linespacing = 0;
for (CList<textsegment>::iterator iter = segs.begin(); iter != segs.end() && iter->start <= len; )
@@ -758,2 +764,13 @@ void CDrawBuffer::resize(int availht)
}
+ else
+ {
+ descent = (_style.getPicture()->height()-ascent)/2;
+ ascent = (_style.getPicture()->height()+ascent)/2;
+ }
+ int lineSpacing = ascent+descent;
+ if (lineSpacing > p_linespacing)
+ {
+ p_linespacing = lineSpacing;
+ }
+ extra = 0;
}
@@ -774,3 +791,3 @@ void CDrawBuffer::resize(int availht)
}
- m_showPartial = (m_lineSpacing > t_lineSpacing);
+ m_showPartial = (p_linespacing > t_lineSpacing);
int lead = fc->getlead();