From: stv Date: Fri, 22 Jul 2005 05:20:44 +0000 (+0000) Subject: no message X-Git-Tag: V3_0_1~20 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0127bfb431994e38a39fab62e4315a7e57aa64df;p=modules%2Fgui.git no message --- diff --git a/src/Qtx/QtxListResourceEdit.cxx b/src/Qtx/QtxListResourceEdit.cxx index 138a77542..415248a53 100644 --- a/src/Qtx/QtxListResourceEdit.cxx +++ b/src/Qtx/QtxListResourceEdit.cxx @@ -929,14 +929,15 @@ QtxListResourceEdit::FontItem::FontItem( const QString& title, QtxResourceEdit* : PrefItem( Font, edit, pItem, parent ) { new QLabel( title, this ); - myFamilies = new QtxComboBox( true, this ); - myFamilies->lineEdit()->setReadOnly( true ); + myFamilies = new QtxComboBox( false, this ); mySizes = new QtxComboBox( true, this ); mySizes->setInsertionPolicy( QComboBox::NoInsertion ); myBold = new QCheckBox( tr( "Bold" ), this ); myItalic = new QCheckBox( tr( "Italic" ), this ); myUnderline = new QCheckBox( tr( "Underline" ), this ); - ( new QFrame( this ) )->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); + + myFamilies->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred ); + mySizes->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred ); connect( myFamilies, SIGNAL( activated( int ) ), this, SLOT( onActivateFamily( int ) ) ); @@ -1099,8 +1100,15 @@ void QtxListResourceEdit::FontItem::setFamily( const QString& f ) curtext = deffam.toString(); } - if( curtext!=family() ) - myFamilies->setCurrentText( curtext ); + int idx = -1; + for ( int i = 0; i < (int)myFamilies->count() && idx < 0; i++ ) + { + if ( myFamilies->text( i ) == curtext ) + idx = i; + } + + if ( idx >= 0 ) + myFamilies->setCurrentItem( idx ); } QString QtxListResourceEdit::FontItem::family() const