Author: ek.kato
Date: Sun Aug 31 19:50:28 2008
New Revision: 5547
Modified:
trunk/qt4/immodule/candidatewindow.cpp
Log:
* qt4/immodule/candidatewindow.cpp (CandidateListView::sizeHint) :
Adjust the width (backport from branch 1.5).
Modified: trunk/qt4/immodule/candidatewindow.cpp
==============================================================================
--- trunk/qt4/immodule/candidatewindow.cpp (original)
+++ trunk/qt4/immodule/candidatewindow.cpp Sun Aug 31 19:50:28 2008
@@ -438,7 +438,7 @@
// 2004-08-02 Kazuki Ohta <[EMAIL PROTECTED]>
// FIXME!:
- // There may be more proper way. Now width is adjusted by
indeterminal 3 'J'.
+ // There may be more proper way. Now width is adjusted by
indeterminal 5 'J'.
int maxCharIndex = 0, maxCharCount = 0;
for ( int i = 0; i < childCount(); i++ )
{
@@ -449,7 +449,8 @@
}
}
QFontMetrics fm( font() );
- width = fm.width( itemAtIndex( maxCharIndex )->text( 0 ) + "JJJ" +
itemAtIndex( maxCharIndex )->text( 1 ) );
+ width = fm.width( itemAtIndex( maxCharIndex )->text( 0 ) + "JJJJJ" +
itemAtIndex( maxCharIndex )->text( 1 ) ) + itemMargin() * 4 + frameWidth()
* 2;
+
if ( width < MIN_CAND_WIDTH )
width = MIN_CAND_WIDTH;