// Have lines visible
int curBottomCoord = widgetHeight - KVI_IRCVIEW_VERTICAL_BORDER;
int maxLineWidth = widgetWidth - KVI_IRCVIEW_DOUBLEBORDER_WIDTH;
- int defLeftCoord = KVI_IRCVIEW_HORIZONTAL_BORDER;
+ float defLeftCoord = KVI_IRCVIEW_HORIZONTAL_BORDER;
int lineWrapsHeight;
// if we draw an icon as a line preamble, we have to change borders geometry accordingly
bool bacWasTransp = false;
char curFore = defaultFore;
char curBack = defaultBack;
- int curLeftCoord = defLeftCoord;
+ float curLeftCoord = defLeftCoord;
curBottomCoord -= m_iFontDescent; //rise up the text...
//
#define DRAW_SELECTED_TEXT(_text_str, _text_idx, _text_len, _text_width) \
SET_PEN(KVI_OPTION_MSGTYPE(KVI_OUT_SELECT).fore(), block->pChunk ? block->pChunk->customFore : QColor()); \
{ \
- int theWdth = _text_width; \
+ float theWdth = _text_width; \
if(theWdth < 0) \
theWdth = width() - (curLeftCoord + KVI_IRCVIEW_HORIZONTAL_BORDER + scrollbarWidth); \
pa.fillRect(curLeftCoord, curBottomCoord - m_iFontLineSpacing + m_iFontDescent, theWdth, m_iFontLineSpacing, getMircColor(KVI_OPTION_MSGTYPE(KVI_OUT_SELECT).back())); \
break;
case KVI_IRCVIEW_BLOCK_SELECTION_ICON:
{
- int theWdth = block->block_width;
+ float theWdth = block->block_width;
if(theWdth < 0)
theWdth = width() - (curLeftCoord + KVI_IRCVIEW_HORIZONTAL_BORDER + scrollbarWidth);
pa.fillRect(curLeftCoord, curBottomCoord - m_iFontLineSpacing + m_iFontDescent, theWdth, m_iFontLineSpacing,
{
if(block->pChunk && block->pChunk->type == KviControlCodes::Icon)
goto no_selection_paint;
- int wdth = block->block_width;
+ float wdth = block->block_width;
if(wdth == 0)
{
// Last block before a word wrap, or a zero characters attribute block ?
no_selection_paint:
if(block->pChunk && block->pChunk->type == KviControlCodes::Icon)
{
- int wdth = block->block_width;
+ float wdth = block->block_width;
if(wdth < 0)
wdth = widgetWidth - (curLeftCoord + KVI_IRCVIEW_HORIZONTAL_BORDER);
int imageYPos = curBottomCoord - m_iRelativePixmapY;
}
else
{
- int wdth = block->block_width;
+ float wdth = block->block_width;
if(wdth < 0)
wdth = widgetWidth - (curLeftCoord + KVI_IRCVIEW_HORIZONTAL_BORDER);
ptr->uLineWraps = 0; // no line wraps yet
unsigned int curAttrBlock = 0; // Current attribute block
- int curLineWidth = 0;
+ float curLineWidth = 0;
// init the first block
ptr->pBlocks->block_start = 0;
const QChar * p = unicode + ptr->pBlocks[ptr->iBlockCount].block_start;
int curBlockLen = 0;
- int curBlockWidth = 0;
+ float curBlockWidth = 0;
if(ptr->pChunks[curAttrBlock].type == KviControlCodes::Icon)
{
if(m_pFm)
delete m_pFm;
- m_pFm = new QFontMetrics(font);
+ m_pFm = new QFontMetricsF(font);
m_iFontLineSpacing = m_pFm->lineSpacing();
int m_iFontLineSpacing;
int m_iFontLineWidth;
int m_iFontDescent;
- int m_iFontCharacterWidth[256]; //1024 bytes fixed
+ float m_iFontCharacterWidth[256];
bool m_bUseRealBold;
int m_iWrapMargin;
bool m_bPostedPaintEventPending;
std::vector<KviIrcViewLine *> m_pMessagesStoppedWhileSelecting;
KviIrcView * m_pMasterView;
- QFontMetrics * m_pFm; // assume this valid only inside a paint event (may be 0 in other circumstances)
+ QFontMetricsF * m_pFm; // assume this valid only inside a paint event (may be 0 in other circumstances)
QMouseEvent * m_pLastEvent;
qint64 m_iLastMouseClickTime;