diff options
| author | 2008-04-08 15:04:36 +0000 | |
|---|---|---|
| committer | 2008-04-08 15:04:36 +0000 | |
| commit | b54ae7cdf619b1c987d732293b9c4a69b5e74c57 (patch) | |
| tree | 395c26af652530d98a22bae8fa3ddebb9a453f10 /src/modules/actioneditor/actioneditor.cpp | |
| parent | ported actioneditor module, code clean (diff) | |
| download | KVIrc-b54ae7cdf619b1c987d732293b9c4a69b5e74c57.tar.gz KVIrc-b54ae7cdf619b1c987d732293b9c4a69b5e74c57.tar.bz2 KVIrc-b54ae7cdf619b1c987d732293b9c4a69b5e74c57.zip | |
Fix actioneditor gui
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@1426 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/actioneditor/actioneditor.cpp')
| -rw-r--r-- | src/modules/actioneditor/actioneditor.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/modules/actioneditor/actioneditor.cpp b/src/modules/actioneditor/actioneditor.cpp index 2576ac0ef..27c739bf9 100644 --- a/src/modules/actioneditor/actioneditor.cpp +++ b/src/modules/actioneditor/actioneditor.cpp @@ -89,7 +89,6 @@ void KviActionEditorListViewItem::setupForActionData() QString t = "<b>" + m_pActionData->m_szName + "</b>"; t += "<br><font color=\"#808080\" size=\"-1\">" + m_pActionData->m_szVisibleName + "</font>"; m_szKey = m_pActionData->m_szName.upper(); - //m_pText = new QSimpleRichText(t,m_pListView->font()); m_pText = new QTextDocument(); m_pText->setHtml(t); m_pText->setDefaultFont(m_pListView->font()); @@ -115,8 +114,6 @@ void KviActionEditorListViewItem::setup() int iWidth = m_pListView->visibleWidth(); if(iWidth < LVI_MINIMUM_CELL_WIDTH)iWidth = LVI_MINIMUM_CELL_WIDTH; iWidth -= LVI_BORDER + LVI_ICON_SIZE + LVI_SPACING + LVI_BORDER; - m_pText->setTextWidth(iWidth); - int iHeight = m_pText->pageSize().height() + (2 * LVI_BORDER); if(iHeight < (LVI_ICON_SIZE + (2 * LVI_BORDER)))iHeight = LVI_ICON_SIZE + (2 * LVI_BORDER); setHeight(iHeight); @@ -128,8 +125,9 @@ void KviActionEditorListViewItem::paintCell(QPainter * p,const QColorGroup & cg, p->drawPixmap(LVI_BORDER,LVI_BORDER,*m_pIcon); int afterIcon = LVI_BORDER + LVI_ICON_SIZE + LVI_SPACING; int www = m_pListView->visibleWidth() - (afterIcon + LVI_BORDER); - m_pText->setTextWidth(www); - m_pText->drawContents(p,QRect(afterIcon,LVI_BORDER,www,height() - (LVI_BORDER * 2))); + p->translate(afterIcon,LVI_BORDER);
+ m_pText->setPageSize(QSizeF(www,height() - (LVI_BORDER * 2)));
+ m_pText->drawContents(p); } |
