Change sizing of dictionary description window in dictionaries dialog

This commit is contained in:
Abs62 2014-12-13 20:14:31 +03:00
parent 5af562caec
commit eaa8e8f270
2 changed files with 7 additions and 2 deletions

View file

@ -191,6 +191,8 @@ void OrderAndProps::disableDictionaryDescription()
ui.dictionaryDescription->clear();
ui.dictionaryDescription->setVisible( false );
ui.dictionaryDescriptionLabel->setVisible( false );
ui.infoVerticalSpacer->changeSize( 20, 5, QSizePolicy::Minimum, QSizePolicy::Expanding );
ui.infoVerticalLayout->invalidate();
}
void OrderAndProps::describeDictionary( DictListWidget * lst, QModelIndex const & idx )
@ -233,12 +235,15 @@ void OrderAndProps::describeDictionary( DictListWidget * lst, QModelIndex const
ui.dictionaryDescription->setPlainText( descText );
ui.dictionaryDescription->setVisible( true );
ui.dictionaryDescriptionLabel->setVisible( true );
ui.infoVerticalSpacer->changeSize( 0, 0, QSizePolicy::Minimum, QSizePolicy::Minimum );
}
else
{
ui.dictionaryDescription->setVisible( false );
ui.dictionaryDescriptionLabel->setVisible( false );
ui.infoVerticalSpacer->changeSize( 20, 5, QSizePolicy::Minimum, QSizePolicy::Expanding );
}
ui.infoVerticalLayout->invalidate();
}
}

View file

@ -66,7 +66,7 @@
<property name="title">
<string>Dictionary information</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<layout class="QVBoxLayout" name="infoVerticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
@ -214,7 +214,7 @@
</widget>
</item>
<item>
<spacer name="verticalSpacer_4">
<spacer name="infoVerticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>