mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 00:14:06 +00:00
Change sizing of dictionary description window in dictionaries dialog
This commit is contained in:
parent
5af562caec
commit
eaa8e8f270
|
@ -191,6 +191,8 @@ void OrderAndProps::disableDictionaryDescription()
|
||||||
ui.dictionaryDescription->clear();
|
ui.dictionaryDescription->clear();
|
||||||
ui.dictionaryDescription->setVisible( false );
|
ui.dictionaryDescription->setVisible( false );
|
||||||
ui.dictionaryDescriptionLabel->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 )
|
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->setPlainText( descText );
|
||||||
ui.dictionaryDescription->setVisible( true );
|
ui.dictionaryDescription->setVisible( true );
|
||||||
ui.dictionaryDescriptionLabel->setVisible( true );
|
ui.dictionaryDescriptionLabel->setVisible( true );
|
||||||
|
ui.infoVerticalSpacer->changeSize( 0, 0, QSizePolicy::Minimum, QSizePolicy::Minimum );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ui.dictionaryDescription->setVisible( false );
|
ui.dictionaryDescription->setVisible( false );
|
||||||
ui.dictionaryDescriptionLabel->setVisible( false );
|
ui.dictionaryDescriptionLabel->setVisible( false );
|
||||||
|
ui.infoVerticalSpacer->changeSize( 20, 5, QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||||
}
|
}
|
||||||
|
ui.infoVerticalLayout->invalidate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Dictionary information</string>
|
<string>Dictionary information</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
<layout class="QVBoxLayout" name="infoVerticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
|
@ -214,7 +214,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer_4">
|
<spacer name="infoVerticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
|
|
Loading…
Reference in a new issue